xujing 5 年前
父节点
当前提交
2fe774fc13

+ 1
- 1
src/pages/fundManagement/AccountDetail.jsx 查看文件

111
                             <Button htmlType="submit" type="primary" style={{ marginRight: '10%' }}>
111
                             <Button htmlType="submit" type="primary" style={{ marginRight: '10%' }}>
112
                                 <Recharge orgId={newsData.orgId || ''} onClick={() => getDetail(orgId)} accountId={newsData.accountId || ''} />
112
                                 <Recharge orgId={newsData.orgId || ''} onClick={() => getDetail(orgId)} accountId={newsData.accountId || ''} />
113
                             </Button>
113
                             </Button>
114
-                            <Button >返回</Button>
114
+                            <Button onClick={() => router.go(-1)}>返回</Button>
115
                         </div>
115
                         </div>
116
                     </div>
116
                     </div>
117
                 }
117
                 }

+ 2
- 2
src/pages/fundManagement/AccountManagement.jsx 查看文件

107
             width: '120px',
107
             width: '120px',
108
             render: (x, row) => (
108
             render: (x, row) => (
109
                 <>
109
                 <>
110
-                    <span style={{ color: '#FF925C', cursor: 'pointer', marginRight: '16px', display: 'inline-block' }}><Recharge onClick={() => getList({ pageNum: 1, pageSize: 10 })} orgId={row.orgId} accountId={row.accountId} /></span>
110
+                    <span style={{ color: '#FF925C', cursor: 'pointer', marginRight: '16px', display: 'inline-block' }}><Recharge onClick={handleReset} orgId={row.orgId} accountId={row.accountId} /></span>
111
                     <span style={{ color: '#FF925C', cursor: 'pointer', display: 'inline-block' }} >
111
                     <span style={{ color: '#FF925C', cursor: 'pointer', display: 'inline-block' }} >
112
-                        <Refund orgId={row.orgId} accountId={row.accountId} onClick={() => getList({ pageNum: 1, pageSize: 10 })} realBalance={row.realBalance || '0'} />
112
+                        <Refund orgId={row.orgId} accountId={row.accountId} onClick={handleReset} realBalance={row.realBalance || '0'} />
113
                     </span>
113
                     </span>
114
                 </>
114
                 </>
115
             ),
115
             ),

+ 1
- 1
src/pages/fundManagement/ConsumeOrder.jsx 查看文件

148
             submitValue.startDate = null
148
             submitValue.startDate = null
149
             submitValue.endDate = null
149
             submitValue.endDate = null
150
         }
150
         }
151
-        request({ ...apis.fund.consumeOrderExport, params: { itemType: 'redPacket', orgId, ...submitValue } }).then(data => {
151
+        request({ ...apis.fund.consumeOrderExport, params: { orderType: 'redPacket', orgId, ...submitValue } }).then(data => {
152
             if (!data) {
152
             if (!data) {
153
                 return
153
                 return
154
             }
154
             }

+ 1
- 1
src/pages/fundManagement/RechargeOrder.jsx 查看文件

141
             submitValue.startDate = null
141
             submitValue.startDate = null
142
             submitValue.endDate = null
142
             submitValue.endDate = null
143
         }
143
         }
144
-        request({ ...apis.fund.rechargeOrderExport, params: { itemType: 'recharge', orgId, ...submitValue } }).then(data => {
144
+        request({ ...apis.fund.rechargeOrderExport, params: { orderType: 'recharge', orgId, ...submitValue } }).then(data => {
145
             if (!data) {
145
             if (!data) {
146
                 return
146
                 return
147
             }
147
             }

+ 3
- 3
src/pages/fundManagement/RefundOrder.jsx 查看文件

117
             dataIndex: 'tradingStatus',
117
             dataIndex: 'tradingStatus',
118
             key: 'tradingStatus',
118
             key: 'tradingStatus',
119
             align: 'center',
119
             align: 'center',
120
-            render: (x, row) => <><span>{row.tradingStatus == '0' ? '已申请' : row.tradingStatus == '1' ? '已退款' : '已驳回'}</span></>
120
+            render: (x, row) => <><span>{row.tradingStatus == 'processing' ? '已申请' : row.tradingStatus == 'success' ? '已退款' : row.tradingStatus == 'fail' ? '已驳回' : ''}</span></>
121
         },
121
         },
122
         {
122
         {
123
             title: '驳回原因',
123
             title: '驳回原因',
124
             dataIndex: 'auditResult',
124
             dataIndex: 'auditResult',
125
             key: 'auditResult',
125
             key: 'auditResult',
126
             align: 'center',
126
             align: 'center',
127
-            render: (x, row) => <>{row.tradingStatus == '2' && <span>{row.auditResult}</span>}</>
127
+            render: (x, row) => <>{row.tradingStatus == 'fail' && <span>{row.auditResult}</span>}</>
128
         },
128
         },
129
         {
129
         {
130
             title: '退款凭证',
130
             title: '退款凭证',
244
             submitValue.startDate = null
244
             submitValue.startDate = null
245
             submitValue.endDate = null
245
             submitValue.endDate = null
246
         }
246
         }
247
-        request({ ...apis.fund.refundOrderExport, params: { itemType: 'refund', orgId, ...submitValue } }).then(data => {
247
+        request({ ...apis.fund.refundOrderExport, params: { orderType: 'refund', orgId, ...submitValue } }).then(data => {
248
             if (!data) {
248
             if (!data) {
249
                 return
249
                 return
250
             }
250
             }

+ 10
- 2
src/pages/fundManagement/components/Recharge.jsx 查看文件

34
     const handleOk = (e) => {
34
     const handleOk = (e) => {
35
         props.form.validateFieldsAndScroll((err, values) => {
35
         props.form.validateFieldsAndScroll((err, values) => {
36
             console.log(values, "valuesvaluesvaluesvaluesvaluesvaluesvalues")
36
             console.log(values, "valuesvaluesvaluesvaluesvaluesvaluesvalues")
37
-            
37
+
38
             if (!err) {
38
             if (!err) {
39
                 request({ ...apis.fund.recharge, urlData: { id: props.accountId || '' }, data: { ...values, orgId: props.orgId } }).then((data) => {
39
                 request({ ...apis.fund.recharge, urlData: { id: props.accountId || '' }, data: { ...values, orgId: props.orgId } }).then((data) => {
40
                     message.info("操作成功")
40
                     message.info("操作成功")
48
     }
48
     }
49
 
49
 
50
     const { getFieldDecorator } = props.form;
50
     const { getFieldDecorator } = props.form;
51
+    const regMoney = /^(\d+|\d+\.\d{1,2})$/;
51
     return (
52
     return (
52
         <div>
53
         <div>
53
             <span onClick={() => setVisible(true)}>{group.groupName}</span>
54
             <span onClick={() => setVisible(true)}>{group.groupName}</span>
68
 
69
 
69
                         <Form.Item label="充值金额" >
70
                         <Form.Item label="充值金额" >
70
                             {getFieldDecorator('rechargeAmount', {
71
                             {getFieldDecorator('rechargeAmount', {
71
-                                rules: [{ required: true, message: '充值金额不能为空' }],
72
+                                rules: [
73
+                                    { required: true, message: '充值金额不能为空' },
74
+                                    {
75
+                                        validator: (rule, value, callback) => {
76
+                                            callback(value < 0.01 || value > 99999.99 ? '金额最多5位整数 2位小数' : !regMoney.test(value) ? '金额最多两位小数' : undefined)
77
+                                        }
78
+                                    }
79
+                                ],
72
                             })(<Input type='number' placeholder="支持2位小数" addonAfter="元" />)}
80
                             })(<Input type='number' placeholder="支持2位小数" addonAfter="元" />)}
73
                         </Form.Item>
81
                         </Form.Item>
74
 
82
 

+ 13
- 4
src/pages/fundManagement/components/Refund.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Modal, Button, Table, message, Input, Icon, Pagination } from 'antd';
2
+import { Form, Modal, Button, Table, message, Input, InputNumber, Icon, Pagination } from 'antd';
3
 import XForm, { FieldTypes } from '../../../components/XForm';
3
 import XForm, { FieldTypes } from '../../../components/XForm';
4
 import request from '../../../utils/request';
4
 import request from '../../../utils/request';
5
 import apis from '../../../services/apis';
5
 import apis from '../../../services/apis';
47
     }
47
     }
48
 
48
 
49
     const { getFieldDecorator } = props.form;
49
     const { getFieldDecorator } = props.form;
50
+    const balance = regFenToYuan(props.realBalance)
51
+    const regMoney = /^(\d+|\d+\.\d{1,2})$/;
50
     return (
52
     return (
51
         <div>
53
         <div>
52
             <span onClick={() => setVisible(true)}>{group.groupName}</span>
54
             <span onClick={() => setVisible(true)}>{group.groupName}</span>
65
                     <p style={{ color: 'red' }}>请先进行线下实际退款操作后再执行线上退款存档</p>
67
                     <p style={{ color: 'red' }}>请先进行线下实际退款操作后再执行线上退款存档</p>
66
                     <Form {...formItemLayout} >
68
                     <Form {...formItemLayout} >
67
 
69
 
68
-                        <Form.Item label="充值金额" >
70
+                        <Form.Item label="退款金额" >
69
                             {getFieldDecorator('refundAmount', {
71
                             {getFieldDecorator('refundAmount', {
70
                                 rules: [{ required: true, message: '退款金额不能为空' },
72
                                 rules: [{ required: true, message: '退款金额不能为空' },
71
-                                { max: 20 }],
73
+                                {
74
+                                    validator: (rule, value, callback) => {
75
+
76
+                                        callback(!regMoney.test(value) ? '金额最多两位小数' : value > balance.toString() ? '退款金额不能大于余额' : value < 0.01 ? '金额不得小于0.01' : undefined)
77
+
78
+                                    }
79
+                                }
80
+                                ],
72
                             })(<Input type='number' placeholder="支持2位小数" addonAfter="元" />)}
81
                             })(<Input type='number' placeholder="支持2位小数" addonAfter="元" />)}
73
                         </Form.Item>
82
                         </Form.Item>
74
-                        <div style={{ marginBottom: '25px' }}><span style={{ width: '25%', display: 'inline-block', textAlign: 'right' }}>余额:</span>{regFenToYuan(props.realBalance)}元</div>
83
+                        <div style={{ marginBottom: '25px' }}><span style={{ width: '25%', display: 'inline-block', textAlign: 'right' }}>余额:</span>{balance}元</div>
75
                         <Form.Item label="退款凭证" help="可上传银行转账截图、微信退款订单等截图作为查账线索">
84
                         <Form.Item label="退款凭证" help="可上传银行转账截图、微信退款订单等截图作为查账线索">
76
                             {getFieldDecorator('certificateList', {
85
                             {getFieldDecorator('certificateList', {
77
                                 rules: [{ required: false }],
86
                                 rules: [{ required: false }],