This commit is contained in:
PC-202306242200\Administrator
2024-09-21 17:21:32 +08:00
parent 3211af2247
commit 414440b6d1
10 changed files with 144 additions and 8 deletions

View File

@@ -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
View File

@@ -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>

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

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
View 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;

View File

@@ -9,3 +9,13 @@ 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 || {},
});
}