提交 1a0645ac 作者: 龚洪江

修复:提现列表筛选问题,提现状态显示问题

上级 bc80d52f
...@@ -6,7 +6,7 @@ export type listPageWithdrawalApplyType = InterListFunction< ...@@ -6,7 +6,7 @@ export type listPageWithdrawalApplyType = InterListFunction<
/** /**
* 状态: 0提现申请中 1提现成功 2提现失败 * 状态: 0提现申请中 1提现成功 2提现失败
*/ */
applyStatus?: number; tradeStatus?: string;
/** /**
* 结束时间 * 结束时间
*/ */
...@@ -73,6 +73,7 @@ export type listPageWithdrawalApplyType = InterListFunction< ...@@ -73,6 +73,7 @@ export type listPageWithdrawalApplyType = InterListFunction<
* 处理信息 * 处理信息
*/ */
tradeResult?: string; tradeResult?: string;
tradeStatus: string;
/** /**
* 申请人的用户ID * 申请人的用户ID
*/ */
......
...@@ -8,27 +8,12 @@ import { InterListType, PaginationProps } from '~/api/interface'; ...@@ -8,27 +8,12 @@ import { InterListType, PaginationProps } from '~/api/interface';
import { listPageWithdrawalApplyType } from '~/api/interface/depleteManageType'; import { listPageWithdrawalApplyType } from '~/api/interface/depleteManageType';
import { filterObjAttr } from '~/utils'; import { filterObjAttr } from '~/utils';
import ApplyStatusModal from '~/pages/depleteManage/withDrawList/components/applyStatusModal'; import ApplyStatusModal from '~/pages/depleteManage/withDrawList/components/applyStatusModal';
import { withdrawStatusList } from '~/utils/dictionary';
// 提现列表返回类型 // 提现列表返回类型
type withdrawalApplyType = InterListType<listPageWithdrawalApplyType>; type withdrawalApplyType = InterListType<listPageWithdrawalApplyType>;
// 提现列表请求类型 // 提现列表请求类型
type withdrawalApplyParameterType = InterListType<listPageWithdrawalApplyType>; type withdrawalApplyParameterType = InterListType<listPageWithdrawalApplyType>;
// 状态字典
const applyStatusDic = [
{
label: '提现申请中',
value: 0,
},
{
label: '提现成功',
value: 1,
},
{
label: '提现失败',
value: 2,
},
];
// 提现方式字典 // 提现方式字典
const settleTypeDic = [ const settleTypeDic = [
{ {
...@@ -56,9 +41,9 @@ const WithDrawManage = () => { ...@@ -56,9 +41,9 @@ const WithDrawManage = () => {
{ {
label: '状态', label: '状态',
placeholder: '请选择状态', placeholder: '请选择状态',
name: 'applyStatus', name: 'tradeStatus',
type: 'Select', type: 'Select',
options: applyStatusDic, options: withdrawStatusList,
}, },
{ {
label: '提现方式', label: '提现方式',
...@@ -89,6 +74,7 @@ const WithDrawManage = () => { ...@@ -89,6 +74,7 @@ const WithDrawManage = () => {
title: '金额', title: '金额',
align: 'center', align: 'center',
dataIndex: 'applyAmt', dataIndex: 'applyAmt',
render: (text: number) => text.toFixed(2).toLocaleString(),
}, },
{ {
title: '提现方式', title: '提现方式',
...@@ -109,8 +95,8 @@ const WithDrawManage = () => { ...@@ -109,8 +95,8 @@ const WithDrawManage = () => {
{ {
title: '状态', title: '状态',
align: 'center', align: 'center',
dataIndex: 'applyStatus', dataIndex: 'tradeStatus',
render: (text: number) => applyStatusDic.find((v) => v.value === text)?.label || '', render: (text: string) => withdrawStatusList.find((v) => v.value === text)?.label || '',
}, },
{ {
title: '处理信息', title: '处理信息',
......
import { Button, Descriptions, Table } from 'antd';
import { useNavigate } from 'react-router-dom';
const ProcurementOrderDetail = () => { const ProcurementOrderDetail = () => {
return <div className='procurement-order-detail'>采购详情</div>; const navigate = useNavigate();
const backRoute = () => {
navigate(-1);
};
return (
<div className='procurement-order-detail'>
<Descriptions
title='供应商'
bordered
extra={
<Button type='primary' onClick={backRoute}>
返回
</Button>
}
>
<Descriptions.Item label='供应商名称:'>供应商名称:</Descriptions.Item>
<Descriptions.Item label='供应商电话:'>供应商电话:</Descriptions.Item>
<Descriptions.Item label='Live'>Hangzhou, Zhejiang</Descriptions.Item>
</Descriptions>
<Descriptions title='订单' style={{ marginTop: '10px' }} column={3}>
<Descriptions.Item label='订单编号:'>1</Descriptions.Item>
<Descriptions.Item label='创建时间:'>2</Descriptions.Item>
<Descriptions.Item label='合同编号:'>3</Descriptions.Item>
<Descriptions.Item span={3}>
<Table bordered style={{ width: '100%' }} />
</Descriptions.Item>
</Descriptions>
<Descriptions title='物流' bordered style={{ marginTop: '10px' }}>
<Descriptions.Item label='收货人:'>供应商名称:</Descriptions.Item>
<Descriptions.Item label='手机号:'>供应商电话:</Descriptions.Item>
<Descriptions.Item label='收货地址:'>Hangzhou, Zhejiang</Descriptions.Item>
<Descriptions.Item label='物流单号:'>Hangzhou, Zhejiang</Descriptions.Item>
<Descriptions.Item label='物流进度:'>Hangzhou, Zhejiang</Descriptions.Item>
</Descriptions>
<Descriptions title='凭证' bordered style={{ marginTop: '10px' }}>
<Descriptions.Item label='付款凭证:'>供应商名称:</Descriptions.Item>
<Descriptions.Item label='验收商品:'>供应商电话:</Descriptions.Item>
<Descriptions.Item label='合同信息:'>Hangzhou, Zhejiang</Descriptions.Item>
</Descriptions>
</div>
);
}; };
export default ProcurementOrderDetail; export default ProcurementOrderDetail;
...@@ -3,8 +3,11 @@ import { Button, Table } from 'antd'; ...@@ -3,8 +3,11 @@ import { Button, Table } from 'antd';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { OrderManageAPI } from '~/api'; import { OrderManageAPI } from '~/api';
import { ColumnsType } from 'antd/es/table/InternalTable'; import { ColumnsType } from 'antd/es/table/InternalTable';
import { useNavigate } from 'react-router-dom';
const ProcurementOrderList = () => { const ProcurementOrderList = () => {
const navigate = useNavigate();
// 订单状态 // 订单状态
const [orderStatusList, setOrderStatusList] = useState<{ value: number; label: string }[]>([]); const [orderStatusList, setOrderStatusList] = useState<{ value: number; label: string }[]>([]);
// 订单状态搜索列表 // 订单状态搜索列表
...@@ -14,6 +17,8 @@ const ProcurementOrderList = () => { ...@@ -14,6 +17,8 @@ const ProcurementOrderList = () => {
// 当前选择的是第几个按钮 // 当前选择的是第几个按钮
const [statusCodeButtonIndex, setStatusCodeButtonIndex] = useState<number>(0); const [statusCodeButtonIndex, setStatusCodeButtonIndex] = useState<number>(0);
// 表格数据
const [tableData, setTableData] = useState<any>([{ id: 1 }]);
const tableColumns: ColumnsType<any> = [ const tableColumns: ColumnsType<any> = [
{ {
title: '商品', title: '商品',
...@@ -50,6 +55,11 @@ const ProcurementOrderList = () => { ...@@ -50,6 +55,11 @@ const ProcurementOrderList = () => {
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
render: () => (
<Button type='link' onClick={toProcurementOrderDetail}>
详情
</Button>
),
}, },
]; ];
...@@ -72,6 +82,10 @@ const ProcurementOrderList = () => { ...@@ -72,6 +82,10 @@ const ProcurementOrderList = () => {
setStatusCodeButtonIndex(i); setStatusCodeButtonIndex(i);
} }
}; };
// 采购订单详情
const toProcurementOrderDetail = () => {
navigate('/orderManage/procurementOrder/detail');
};
useEffect(() => { useEffect(() => {
getOrderStatus(); getOrderStatus();
...@@ -116,7 +130,7 @@ const ProcurementOrderList = () => { ...@@ -116,7 +130,7 @@ const ProcurementOrderList = () => {
</> </>
} }
/> />
<Table bordered columns={tableColumns} /> <Table bordered columns={tableColumns} dataSource={tableData} />
</div> </div>
); );
}; };
......
...@@ -68,3 +68,27 @@ export const orderLevelList = [ ...@@ -68,3 +68,27 @@ export const orderLevelList = [
{ label: '加急单', value: 100, code: 'RUSH_ORDER' }, { label: '加急单', value: 100, code: 'RUSH_ORDER' },
{ label: '置顶单', value: 300, code: 'TOP_ORDER' }, { label: '置顶单', value: 300, code: 'TOP_ORDER' },
]; ];
// 提现状态字典
// "apply 提现申请 await待发放 handle交易中 success 交易成功 failure 交易失败")
export const withdrawStatusList = [
{
label: '提现申请',
value: 'apply',
},
{
label: '待发放',
value: 'await',
},
{
label: '交易中',
value: 'handle',
},
{
label: '交易成功',
value: 'success',
},
{
label: '交易失败',
value: 'failure',
},
];
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论