zhoulisen 5 лет назад
Родитель
Сommit
106a11a32e

+ 1
- 1
config/config.js Просмотреть файл

134
   proxy: {
134
   proxy: {
135
     '/api': {
135
     '/api': {
136
       // target: 'https://dev.fangdeal.cn',
136
       // target: 'https://dev.fangdeal.cn',
137
-      target: 'http://192.168.0.195:8080/',
137
+      target: 'http://192.168.0.153:8080/',
138
       changeOrigin: true,
138
       changeOrigin: true,
139
       // pathRewrite: { '^/server': '' },
139
       // pathRewrite: { '^/server': '' },
140
     },
140
     },

+ 2
- 4
src/pages/fundManagement/AccountManagement.jsx Просмотреть файл

10
 import request from '../../utils/request';
10
 import request from '../../utils/request';
11
 import AuthButton from '@/components/AuthButton';
11
 import AuthButton from '@/components/AuthButton';
12
 import Recharge from './components/Recharge'
12
 import Recharge from './components/Recharge'
13
-import Refund from './components/Refund'
13
+
14
 import { regFenToYuan } from '@/utils/money';
14
 import { regFenToYuan } from '@/utils/money';
15
 
15
 
16
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
16
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
108
             render: (x, row) => (
108
             render: (x, row) => (
109
                 <>
109
                 <>
110
                     <span style={{ color: '#FF925C', cursor: 'pointer', marginRight: '16px', display: 'inline-block' }}><Recharge onClick={handleReset} 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' }} >
112
-                        <Refund orgId={row.orgId} accountId={row.accountId} onClick={handleReset} realBalance={row.realBalance || '0'} />
113
-                    </span>
111
+                   
114
                 </>
112
                 </>
115
             ),
113
             ),
116
         },
114
         },

+ 1
- 1
src/pages/fundManagement/Finance.jsx Просмотреть файл

183
                 </Form.Item>
183
                 </Form.Item>
184
             </Form>
184
             </Form>
185
             <div style={{ margin: '10px 0 16px 0' }}>
185
             <div style={{ margin: '10px 0 16px 0' }}>
186
-                <Button type="danger" className={styles.addBtn} ><SelectContact onClick={() => getList({ pageNum: 1, pageSize: 10 })} /></Button>
186
+                <Button type="danger" className={styles.addBtn} style={{ padding: '0' }} ><SelectContact onClick={() => getList({ pageNum: 1, pageSize: 10 })} /></Button>
187
                 <Button type="primary" className={styles.addBtn} onClick={() => toDel()} style={{ marginLeft: '30px' }} >删除</Button>
187
                 <Button type="primary" className={styles.addBtn} onClick={() => toDel()} style={{ marginLeft: '30px' }} >删除</Button>
188
             </div>
188
             </div>
189
             <Table rowSelection={rowSelection} rowKey={r => r.contactId} dataSource={data.records} columns={columns} pagination={false} />
189
             <Table rowSelection={rowSelection} rowKey={r => r.contactId} dataSource={data.records} columns={columns} pagination={false} />

+ 2
- 2
src/pages/fundManagement/RechargeOrder.jsx Просмотреть файл

136
             dataIndex: 'tradingStatus',
136
             dataIndex: 'tradingStatus',
137
             key: 'tradingStatus',
137
             key: 'tradingStatus',
138
             align: 'center',
138
             align: 'center',
139
-            render: (x, row) => <><span>{row.tradingStatus == 'processing' ? '待支付' : row.tradingStatus == 'success' ? '已支付' : '已超时'}</span></>
139
+            render: (x, row) => <><span>{row.tradingStatus == 'processing' ? '待支付' : row.tradingStatus == 'success' ? '已支付' : '失败'}</span></>
140
         },
140
         },
141
         {
141
         {
142
             title: '支付时间',
142
             title: '支付时间',
218
                             <Select.Option value="">全部</Select.Option>
218
                             <Select.Option value="">全部</Select.Option>
219
                             <Select.Option value="processing">待支付</Select.Option>
219
                             <Select.Option value="processing">待支付</Select.Option>
220
                             <Select.Option value="success">已支付</Select.Option>
220
                             <Select.Option value="success">已支付</Select.Option>
221
-                            <Select.Option value="fail">已超时</Select.Option>
221
+                            <Select.Option value="fail">失败</Select.Option>
222
                         </Select>,
222
                         </Select>,
223
                     )}
223
                     )}
224
                 </Form.Item>
224
                 </Form.Item>

+ 9
- 3
src/pages/fundManagement/RefundOrder.jsx Просмотреть файл

11
 import AuthButton from '@/components/AuthButton';
11
 import AuthButton from '@/components/AuthButton';
12
 import Swiper from './components/Swiper';
12
 import Swiper from './components/Swiper';
13
 import { regFenToYuan } from '@/utils/money';
13
 import { regFenToYuan } from '@/utils/money';
14
+import Refund from './components/Refund'
14
 
15
 
15
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
16
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
16
 
17
 
203
     }
204
     }
204
     const refund = (row) => {
205
     const refund = (row) => {
205
         setRefundVisible(true)
206
         setRefundVisible(true)
207
+        console.log(row,'row')
206
         setRow(row)
208
         setRow(row)
207
     }
209
     }
208
 
210
 
225
                 orgId: row.orgId,
227
                 orgId: row.orgId,
226
                 amount: row.amount,
228
                 amount: row.amount,
227
             }
229
             }
228
-        }).then((data) => {
230
+        }).then(data => {
229
             console.log(data)
231
             console.log(data)
230
             getList({ pageNum: 1, pageSize: 10, orderType: 'refund' });
232
             getList({ pageNum: 1, pageSize: 10, orderType: 'refund' });
231
 
233
 
235
     }
237
     }
236
     // 导出
238
     // 导出
237
     const exportList = () => {
239
     const exportList = () => {
238
-        let { LocalDate, ...submitValue } = props.form.getFieldsValue()
240
+        const { LocalDate, ...submitValue } = props.form.getFieldsValue()
239
         if (null != LocalDate && LocalDate.length > 0) {
241
         if (null != LocalDate && LocalDate.length > 0) {
240
             const [startDate, endDate] = LocalDate
242
             const [startDate, endDate] = LocalDate
241
             submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
243
             submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
277
                 <span style={{ color: 'red' }}>*</span><Input value={inputValue} onChange={e => setValue(e.target.value)} style={{ marginLeft: '10px', width: '80%' }} placeholder="请输入驳回原因" />
279
                 <span style={{ color: 'red' }}>*</span><Input value={inputValue} onChange={e => setValue(e.target.value)} style={{ marginLeft: '10px', width: '80%' }} placeholder="请输入驳回原因" />
278
                 </div>
280
                 </div>
279
             </Modal>
281
             </Modal>
282
+            {/* onClick={() => orderRefund()} */}
280
             <Modal
283
             <Modal
281
                 visible={refundVisible}
284
                 visible={refundVisible}
282
                 title="退款审核"
285
                 title="退款审核"
283
                 onOk={() => orderRefund()}
286
                 onOk={() => orderRefund()}
284
                 onCancel={() => handleCancel()}
287
                 onCancel={() => handleCancel()}
285
                 footer={[
288
                 footer={[
286
-                    <Button key="back" size="large" onClick={() => orderRefund()}>退款</Button>,
289
+                    <Button key="back" size="large"><Refund orgId={row.orgId} accountId={row.accountId} amount={row.amount || '0'} /></Button>,
290
+                    //     <span style={{ color: '#FF925C', cursor: 'pointer', display: 'inline-block' }} >
291
+
292
+                    // </span>
287
                     <Button key="submit" type="primary" size="large" onClick={() => bohui()}>驳回</Button>,
293
                     <Button key="submit" type="primary" size="large" onClick={() => bohui()}>驳回</Button>,
288
                 ]}
294
                 ]}
289
             ><div>
295
             ><div>

+ 1
- 1
src/pages/fundManagement/components/Recharge.jsx Просмотреть файл

82
 
82
 
83
                         <Form.Item label="充值凭证" help="可上传银行转账截图等作为查账线索">
83
                         <Form.Item label="充值凭证" help="可上传银行转账截图等作为查账线索">
84
                             {getFieldDecorator('certificateList', {
84
                             {getFieldDecorator('certificateList', {
85
-                                rules: [{ required: false }],
85
+                                rules: [{ required: true }],
86
                             })(
86
                             })(
87
                                 <Upload />,
87
                                 <Upload />,
88
                             )}
88
                             )}

+ 22
- 5
src/pages/fundManagement/components/Refund.jsx Просмотреть файл

27
     const [group, setGroup] = useState({ groupId: undefined, groupName: '退款' })
27
     const [group, setGroup] = useState({ groupId: undefined, groupName: '退款' })
28
 
28
 
29
     useEffect(() => {
29
     useEffect(() => {
30
-
30
+        console.log(props, 'props')
31
     }, [props.value])
31
     }, [props.value])
32
 
32
 
33
 
33
 
38
                 request({ ...apis.fund.accoutRefund, urlData: { id: props.accountId || '' }, data: { ...values, orgId: props.orgId } }).then((data) => {
38
                 request({ ...apis.fund.accoutRefund, urlData: { id: props.accountId || '' }, data: { ...values, orgId: props.orgId } }).then((data) => {
39
                     message.info("操作成功")
39
                     message.info("操作成功")
40
                     setVisible(false)
40
                     setVisible(false)
41
-                    props.onClick()
41
+                    // props.onClick()
42
                 })
42
                 })
43
             }
43
             }
44
         });
44
         });
46
 
46
 
47
     }
47
     }
48
 
48
 
49
+    // request({
50
+    //     ...apis.fund.refund, urlData: { id: row.orderId }, data: {
51
+    //         orgId: row.orgId,
52
+    //         amount: row.amount,
53
+    //     }
54
+    // }).then(data => {
55
+    //     console.log(data)
56
+    //     getList({ pageNum: 1, pageSize: 10, orderType: 'refund' });
57
+
58
+    // })
59
+
49
     const { getFieldDecorator } = props.form;
60
     const { getFieldDecorator } = props.form;
50
     const balance = regFenToYuan(props.realBalance)
61
     const balance = regFenToYuan(props.realBalance)
51
     const regMoney = /^(\d+|\d+\.\d{1,2})$/;
62
     const regMoney = /^(\d+|\d+\.\d{1,2})$/;
64
                 ]}
75
                 ]}
65
             >
76
             >
66
                 <div>
77
                 <div>
67
-                    <p style={{ color: 'red' }}>请先进行线下实际退款操作后再执行线上退款存档</p>
78
+                    {/* <p style={{ color: 'red' }}>请先进行线下实际退款操作后再执行线上退款存档</p> */}
79
+
68
                     <Form {...formItemLayout} >
80
                     <Form {...formItemLayout} >
69
 
81
 
70
-                        <Form.Item label="退款金额" >
82
+                        {/* <Form.Item label="退款金额" >
71
                             {getFieldDecorator('refundAmount', {
83
                             {getFieldDecorator('refundAmount', {
72
                                 rules: [{ required: true, message: '退款金额不能为空' },
84
                                 rules: [{ required: true, message: '退款金额不能为空' },
73
                                 {
85
                                 {
80
                                 ],
92
                                 ],
81
                             })(<Input type='number' placeholder="支持2位小数" addonAfter="元" />)}
93
                             })(<Input type='number' placeholder="支持2位小数" addonAfter="元" />)}
82
                         </Form.Item>
94
                         </Form.Item>
83
-                        <div style={{ marginBottom: '25px' }}><span style={{ width: '25%', display: 'inline-block', textAlign: 'right' }}>余额:</span>{balance}元</div>
95
+                        <div style={{ marginBottom: '25px' }}><span style={{ width: '25%', display: 'inline-block', textAlign: 'right' }}>余额:</span>{balance}元</div> */}
96
+                        <Form.Item label="退款凭证">
97
+
98
+                            <span>{props.amount}</span>
99
+
100
+                        </Form.Item>
84
                         <Form.Item label="退款凭证" help="可上传银行转账截图、微信退款订单等截图作为查账线索">
101
                         <Form.Item label="退款凭证" help="可上传银行转账截图、微信退款订单等截图作为查账线索">
85
                             {getFieldDecorator('certificateList', {
102
                             {getFieldDecorator('certificateList', {
86
                                 rules: [{ required: false }],
103
                                 rules: [{ required: false }],

+ 1
- 1
src/pages/fundManagement/components/SelectContact.jsx Просмотреть файл

126
 
126
 
127
     return (
127
     return (
128
         <div>
128
         <div>
129
-            <span style={{ color: '#fff' }} onClick={() => setVisible(true)}>{group.groupName}</span>
129
+            <span style={{ color: '#fff', padding: '0 15px' }} onClick={() => setVisible(true)}>{group.groupName}</span>
130
 
130
 
131
             <Modal
131
             <Modal
132
                 title="选择联系人"
132
                 title="选择联系人"