Browse Source

feat: 提现记录根据状态筛选

lihao
nili 6 months ago
parent
commit
cc588d68d6
  1. 2
      dist/_umi_route_preload_helper.f270acf5.js
  2. 4
      dist/index.html
  3. 2
      dist/p__AdvRecordListV2.e4a2e08b.async.js
  4. 1
      dist/p__App__AppManagement.a12680df.async.js
  5. 1
      dist/p__App__AppManagement.dd12ff21.async.js
  6. 1
      dist/p__MoneyManagement.104db416.async.js
  7. 1
      dist/p__MoneyManagement.27e1a086.async.js
  8. 1
      dist/p__SuperAdmin.aaa0f8d9.async.js
  9. 1
      dist/p__SuperAdmin.bbb0991c.async.js
  10. 1
      dist/p__UserManagement.2c68b70b.async.js
  11. 1
      dist/p__UserManagement.8cf2aa91.async.js
  12. 2
      dist/umi.872ad573.js
  13. 45
      src/pages/MoneyManagement.tsx
  14. 2
      src/pages/UserManagement.tsx
  15. 1
      src/services/matrix/typings.d.ts
  16. 27
      src/utils/commonUtil.ts
  17. 8
      src/utils/numberUtils.ts

2
dist/_umi_route_preload_helper.8fe02674.js → dist/_umi_route_preload_helper.f270acf5.js

@ -1 +1 @@
!function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"ant-design-pro","b":"webpack","f":[["51.a2ea1b3b.async.js",51],["63.86ff1d28.async.js",63],["134.6fc81d91.async.js",134],["169.57647c7d.async.js",169],["p__Welcome.61596037.async.js",185],["p__MoneyManagement.27e1a086.async.js",190],["247.3fe8fb10.async.js",247],["t__plugin-layout__Layout.6cae69f5.chunk.css",301],["t__plugin-layout__Layout.4594a64b.async.js",301],["p__User__Login__index.9d3ab92e.async.js",366],["p__DeviceOwnerApp.ec53e5c4.async.js",371],["390.41467286.async.js",390],["393.38316f72.async.js",393],["397.fb5f72c1.async.js",397],["427.f16a2970.async.js",427],["p__SuperAdmin.aaa0f8d9.async.js",455],["531.3d4ec55a.async.js",531],["539.49b7b156.async.js",539],["p__AdvRecordListV2.52c0941e.async.js",542],["p__Bind.b6ee068f.async.js",557],["559.016bfdbb.async.js",559],["p__404.0c100574.async.js",571],["635.20e45f05.async.js",635],["p__App__AppManagement.a12680df.async.js",731],["804.139cd916.async.js",804],["p__AdminManagement.123d40ec.async.js",816],["841.614ef4c0.async.js",841],["p__AdvRecordList.8e5ef22c.async.js",857],["p__UserManagement.2c68b70b.async.js",903],["905.6e225d1b.async.js",905],["930.fca7adbf.async.js",930]],"r":{"/*":[21,29],"/":[2,7,8,20,22,29],"/welcome":[2,3,4,12,20,30,7,8,22,29],"/super":[0,1,2,3,6,14,15,30,7,8,20,22,29],"/adminList":[0,3,14,24,25,2,7,8,20,22,29],"/bind":[2,3,12,13,19,20,30,7,8,22,29],"/appList":[0,1,2,3,6,13,14,16,17,23,24,29,30,7,8,20,22],"/advList/:code":[0,1,2,3,14,16,17,20,24,26,27,29,30,7,8,22],"/advListV2/:code":[0,1,2,3,14,16,17,18,20,24,26,29,30,7,8,22],"/user/:code":[0,1,2,3,14,16,17,24,28,29,30,7,8,20,22],"/money/:code":[0,1,2,3,5,14,16,17,24,29,30,7,8,20,22],"/app/:code":[0,1,2,3,10,14,16,17,20,24,26,29,30,7,8,22],"/user/login":[1,2,3,9,14,16,24]}},{publicPath:"/"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}();
!function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"ant-design-pro","b":"webpack","f":[["51.a2ea1b3b.async.js",51],["63.86ff1d28.async.js",63],["134.6fc81d91.async.js",134],["169.57647c7d.async.js",169],["p__Welcome.61596037.async.js",185],["p__MoneyManagement.104db416.async.js",190],["247.3fe8fb10.async.js",247],["t__plugin-layout__Layout.6cae69f5.chunk.css",301],["t__plugin-layout__Layout.4594a64b.async.js",301],["p__User__Login__index.9d3ab92e.async.js",366],["p__DeviceOwnerApp.ec53e5c4.async.js",371],["390.41467286.async.js",390],["393.38316f72.async.js",393],["397.fb5f72c1.async.js",397],["427.f16a2970.async.js",427],["p__SuperAdmin.bbb0991c.async.js",455],["531.3d4ec55a.async.js",531],["539.49b7b156.async.js",539],["p__AdvRecordListV2.e4a2e08b.async.js",542],["p__Bind.b6ee068f.async.js",557],["559.016bfdbb.async.js",559],["p__404.0c100574.async.js",571],["635.20e45f05.async.js",635],["p__App__AppManagement.dd12ff21.async.js",731],["804.139cd916.async.js",804],["p__AdminManagement.123d40ec.async.js",816],["841.614ef4c0.async.js",841],["p__AdvRecordList.8e5ef22c.async.js",857],["p__UserManagement.8cf2aa91.async.js",903],["905.6e225d1b.async.js",905],["930.fca7adbf.async.js",930]],"r":{"/*":[21,29],"/":[2,7,8,20,22,29],"/welcome":[2,3,4,12,20,30,7,8,22,29],"/super":[0,1,2,3,6,14,15,30,7,8,20,22,29],"/adminList":[0,3,14,24,25,2,7,8,20,22,29],"/bind":[2,3,12,13,19,20,30,7,8,22,29],"/appList":[0,1,2,3,6,13,14,16,17,23,24,29,30,7,8,20,22],"/advList/:code":[0,1,2,3,14,16,17,20,24,26,27,29,30,7,8,22],"/advListV2/:code":[0,1,2,3,14,16,17,18,20,24,26,29,30,7,8,22],"/user/:code":[0,1,2,3,14,16,17,24,28,29,30,7,8,20,22],"/money/:code":[0,1,2,3,5,14,16,17,24,29,30,7,8,20,22],"/app/:code":[0,1,2,3,10,14,16,17,20,24,26,29,30,7,8,22],"/user/login":[1,2,3,9,14,16,24]}},{publicPath:"/"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}();

4
dist/index.html

@ -7,10 +7,10 @@
<title>Ant Design Pro</title>
<link rel="stylesheet" href="/umi.1ca9308c.css">
<script async src="/scripts/loading.js"></script>
<script src="/_umi_route_preload_helper.8fe02674.js"></script>
<script src="/_umi_route_preload_helper.f270acf5.js"></script>
</head>
<body>
<div id="root"></div>
<script src="/umi.eb50940d.js"></script>
<script src="/umi.872ad573.js"></script>
</body>
</html>

2
dist/p__AdvRecordListV2.52c0941e.async.js → dist/p__AdvRecordListV2.e4a2e08b.async.js

File diff suppressed because one or more lines are too long

1
dist/p__App__AppManagement.a12680df.async.js

File diff suppressed because one or more lines are too long

1
dist/p__App__AppManagement.dd12ff21.async.js

File diff suppressed because one or more lines are too long

1
dist/p__MoneyManagement.104db416.async.js

File diff suppressed because one or more lines are too long

1
dist/p__MoneyManagement.27e1a086.async.js

File diff suppressed because one or more lines are too long

1
dist/p__SuperAdmin.aaa0f8d9.async.js

File diff suppressed because one or more lines are too long

1
dist/p__SuperAdmin.bbb0991c.async.js

File diff suppressed because one or more lines are too long

1
dist/p__UserManagement.2c68b70b.async.js

File diff suppressed because one or more lines are too long

1
dist/p__UserManagement.8cf2aa91.async.js

File diff suppressed because one or more lines are too long

2
dist/umi.eb50940d.js → dist/umi.872ad573.js

File diff suppressed because one or more lines are too long

45
src/pages/MoneyManagement.tsx

@ -2,9 +2,9 @@ import { audit, moneyApplyList } from '@/services/matrix/matrixMoneyController';
import { cent2Yuan } from '@/utils/numberUtils';
import { ActionType, PageContainer, ProColumns, ProTable } from '@ant-design/pro-components';
import { useParams } from '@umijs/max';
import { Avatar, Button, Flex, Popconfirm, Row } from 'antd';
import { Avatar, Button, Flex, Popconfirm, Row, Tag } from 'antd';
import { useEffect, useRef } from 'react';
import { moneyStatus } from '../utils/commonUtil';
import { moneyStatus, prefixInteger, timestamp2Num } from '../utils/commonUtil';
const MoneyManagement: React.FC = () => {
const { code } = useParams();
@ -19,21 +19,30 @@ const MoneyManagement: React.FC = () => {
title: 'id',
dataIndex: 'id',
valueType: 'textarea',
ellipsis: true,
copyable: true,
hideInSearch: true,
renderText: (_, r: API.MoneyBo) => {
return timestamp2Num(r.createdAt || 0) + prefixInteger(r.id || 0, 6);
},
},
{
title: '用户',
hideInSearch: true,
dataIndex: 'user',
valueType: 'textarea',
width: 180,
renderText: (_, r: API.MoneyBo) => {
if (!r.user) {
return;
}
return (
<Row>
<Avatar src={r.user?.avatar} />
<Avatar
src={
r.user?.avatar ||
'https://apks.bzgames.cn/matrix/fc3fca88a8b28ff602e7a38d8164938b.png'
}
/>
<p style={{ fontSize: 12, marginLeft: 10 }}>
id:{r.user.id}
<br />
@ -55,33 +64,54 @@ const MoneyManagement: React.FC = () => {
{
title: '支付宝名称',
dataIndex: 'name',
hideInSearch: true,
},
{
title: '支付宝账号',
dataIndex: 'aliPayAccount',
hideInSearch: true,
},
{
title: '订单号',
dataIndex: 'orderId',
hideInSearch: true,
},
{
title: '转账时间',
dataIndex: 'transDate',
hideInSearch: true,
},
{
title: '状态',
dataIndex: 'status',
hideInSearch: true,
renderText: (status: number) => {
const statusList = moneyStatus();
const matched = statusList.find((x) => x.value === status + '');
return matched ? matched.label : '未知';
const label = matched ? matched.label : '未知';
return <Tag color={matched?.color}>{label}</Tag>;
},
},
{
title: '提现申请时间',
title: '状态',
dataIndex: 'status',
hideInTable: true,
valueType: 'select',
fieldProps: {
options: moneyStatus(),
},
},
// {
// title: '提现申请时间',
// hideInTable: true,
// dataIndex: 'createdAt',
// valueType: 'dateRange',
// },
{
title: '申请时间',
dataIndex: 'createdAt',
valueType: 'dateRange',
valueType: 'dateTime',
hideInSearch: true,
},
{
title: '操作',
@ -125,7 +155,6 @@ const MoneyManagement: React.FC = () => {
return (
<PageContainer>
<ProTable<API.MoneyBo, API.MoneyQuery>
search={false}
actionRef={actionRef}
request={async (params: API.MoneyQuery) => {
const res = await moneyApplyList({ ...params, appCode: code });

2
src/pages/UserManagement.tsx

@ -69,7 +69,7 @@ const UserManagement: React.FC = () => {
},
{
title: '已提现(元)',
dataIndex: 'money',
dataIndex: 'realMoney',
renderText: (r: number) => {
return cent2Yuan(r);
},

1
src/services/matrix/typings.d.ts

@ -448,6 +448,7 @@ declare namespace API {
nickname?: string;
avatar?: string;
money?: number;
realMoney?: number;
aliPayAccount?: string;
income?: number;
goldCoin?: number;

27
src/utils/commonUtil.ts

@ -7,13 +7,26 @@ const channelList = () => {
const moneyStatus = () => {
return [
{ label: '待审批', value: '0' },
{ label: '审批通过', value: '1' },
{ label: '转账中', value: '2' },
{ label: '转账成功', value: '3' },
{ label: '转账失败', value: '-1' },
{ label: '审批拒绝', value: '-2' },
{ label: '待审批', value: '0', color: 'orange' },
{ label: '审批通过', value: '1', color: 'green' },
{ label: '转账中', value: '2', color: 'orange' },
{ label: '转账成功', value: '3', color: 'green' },
{ label: '转账失败', value: '-1', color: 'red' },
{ label: '审批拒绝', value: '-2', color: 'red' },
];
};
export { channelList, moneyStatus };
const timestamp2Num = (t: number) => {
let time = new Date(t);
let year = time.getFullYear().toString().padStart(4, '0');
let month = (time.getMonth() + 1).toString().padStart(2, '0');
let day = time.getDate().toString().padStart(2, '0');
return year + month + day;
};
const prefixInteger = (num: number, length: number) => {
let str = num.toString();
return str.padStart(length, '0');
};
export { channelList, moneyStatus, prefixInteger, timestamp2Num };

8
src/utils/numberUtils.ts

@ -1,15 +1,15 @@
const formatIncome = (v: number | undefined) => {
if (!v) {
return 0;
return '0.00';
}
return parseFloat((v / 1000_00).toFixed(2));
return (v / 1000_00).toFixed(2);
};
const cent2Yuan = (v: number | undefined) => {
if (!v) {
return 0;
return '0.00';
}
return parseFloat((v / 100).toFixed(2));
return (v / 100).toFixed(2);
};
export { cent2Yuan, formatIncome };

Loading…
Cancel
Save