1
This commit is contained in:
@@ -84,8 +84,8 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
define: {
|
define: {
|
||||||
'process.env': {
|
'process.env': {
|
||||||
// API_URL: "https://iadminapi.zhongshuai2023.com",
|
API_URL: "https://iadminapi.zhongshuai2023.com",
|
||||||
API_URL: "http://192.168.1.63:1002",
|
// API_URL: "http://192.168.1.63:1002",
|
||||||
WS_URL: "ws://lv.com",
|
WS_URL: "ws://lv.com",
|
||||||
STATIC_URL: "http://lv.com",
|
STATIC_URL: "http://lv.com",
|
||||||
WEMAP_KEY: 'ZFDBZ-YUTWB-353UZ-NYKEY-JTVIZ-Q3F6X'
|
WEMAP_KEY: 'ZFDBZ-YUTWB-353UZ-NYKEY-JTVIZ-Q3F6X'
|
||||||
|
|||||||
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -8,6 +8,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script src="/umi.2a43d856.js"></script>
|
<script src="/umi.a43f4fc6.js"></script>
|
||||||
|
|
||||||
</body></html>
|
</body></html>
|
||||||
1
dist/src__pages__payment__index.7c14afdc.async.js
vendored
Normal file
1
dist/src__pages__payment__index.7c14afdc.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
dist/src__pages__refund__index.4aff1bb0.async.js
vendored
Normal file
1
dist/src__pages__refund__index.4aff1bb0.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
dist/umi.2a43d856.js → dist/umi.a43f4fc6.js
vendored
4
dist/umi.2a43d856.js → dist/umi.a43f4fc6.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
123
src/pages/refund/index.tsx
Normal file
123
src/pages/refund/index.tsx
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
import { paymentrefundPage } from '@/services/payment';
|
||||||
|
|
||||||
|
|
||||||
|
import React, { useRef, useEffect } from 'react';
|
||||||
|
import { useIntl, useAccess } from '@umijs/max';
|
||||||
|
import { message, Tag, Image, Button, Select } from 'antd';
|
||||||
|
import { ActionType, PageContainer, ProTable } from '@ant-design/pro-components';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const LogTableList: React.FC = () => {
|
||||||
|
const actionRef = useRef<ActionType>();
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: '支付ID',
|
||||||
|
dataIndex: 'paymentId',
|
||||||
|
valueType: 'text',
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '退款金额',
|
||||||
|
dataIndex: 'refundAmount',
|
||||||
|
valueType: 'text',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '退款单号',
|
||||||
|
dataIndex: 'refundNo',
|
||||||
|
valueType: 'text',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '平台',
|
||||||
|
dataIndex: 'platformId',
|
||||||
|
valueType: 'text',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '退款完成时间',
|
||||||
|
dataIndex: 'completeTime',
|
||||||
|
valueType: 'text',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
valueType: 'text',
|
||||||
|
search: true,
|
||||||
|
render: (_: any, record: any) => {
|
||||||
|
let colors = ['gold', 'green', 'volcano', 'red', 'magenta']
|
||||||
|
return <Tag color={colors[record.status]}>{record.status == 0 ? '提交退款' : record.status == 1 ? '处理中' : record.status == 2 ? '退款完成' : record.status == -1 ? '退款失败' : ''}</Tag>
|
||||||
|
},
|
||||||
|
renderFormItem: (
|
||||||
|
_,
|
||||||
|
{ type, defaultRender, formItemProps, fieldProps, ...rest },
|
||||||
|
form,
|
||||||
|
) => {
|
||||||
|
const statusMap = [
|
||||||
|
{ label: '提交退款', value: 0 },
|
||||||
|
{ label: '处理中', value: 1 },
|
||||||
|
{ label: '退款完成', value: 2 },
|
||||||
|
{ label: '退款失败', value: -1 },
|
||||||
|
]
|
||||||
|
return <Select
|
||||||
|
{...fieldProps}
|
||||||
|
allowClear
|
||||||
|
style={{ width: "100%" }}
|
||||||
|
filterOption={false}
|
||||||
|
fieldNames={{
|
||||||
|
label: "label",
|
||||||
|
value: "value"
|
||||||
|
}}
|
||||||
|
options={statusMap}
|
||||||
|
/>
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '备注',
|
||||||
|
dataIndex: 'remarks',
|
||||||
|
valueType: 'text',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作人',
|
||||||
|
dataIndex: 'operatorUser',
|
||||||
|
valueType: 'text',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
dataIndex: 'createTime',
|
||||||
|
valueType: 'text',
|
||||||
|
search: false,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<PageContainer>
|
||||||
|
<div style={{ width: '100%', float: 'right' }}>
|
||||||
|
<ProTable
|
||||||
|
actionRef={actionRef}
|
||||||
|
rowKey="id"
|
||||||
|
key="logList"
|
||||||
|
search={{
|
||||||
|
labelWidth: 120,
|
||||||
|
}}
|
||||||
|
request={async (params, sorter, filter) => {
|
||||||
|
let { data } = await paymentrefundPage(params)
|
||||||
|
return {
|
||||||
|
data: data?.records || [],
|
||||||
|
total: data?.total,
|
||||||
|
};
|
||||||
|
}}
|
||||||
|
columns={columns}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</PageContainer>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default LogTableList;
|
||||||
@@ -8,4 +8,14 @@ export async function paymentPage(body) {
|
|||||||
},
|
},
|
||||||
data: body || {},
|
data: body || {},
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function paymentrefundPage(body) {
|
||||||
|
return request('/api/paymentrefund/page', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
|
},
|
||||||
|
data: body || {},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user