Procházet zdrojové kódy

Merge branch 'dev' of http://git.ycjcjy.com/estateagents/pc-channel into dev

魏超 před 5 roky
rodič
revize
55a60aef28

+ 1
- 1
src/pages/fundManagement/AccountManagement.jsx Zobrazit soubor

@@ -10,7 +10,7 @@ import { fetch, apis } from '../../utils/request';
10 10
 import request from '../../utils/request';
11 11
 import AuthButton from '@/components/AuthButton';
12 12
 import Recharge from './components/Recharge'
13
-import Refund from './components/Refund'
13
+
14 14
 import { regFenToYuan } from '@/utils/money';
15 15
 
16 16
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;

+ 1
- 1
src/pages/fundManagement/Finance.jsx Zobrazit soubor

@@ -183,7 +183,7 @@ function header(props) {
183 183
                 </Form.Item>
184 184
             </Form>
185 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 187
                 <Button type="primary" className={styles.addBtn} onClick={() => toDel()} style={{ marginLeft: '30px' }} >删除</Button>
188 188
             </div>
189 189
             <Table rowSelection={rowSelection} rowKey={r => r.contactId} dataSource={data.records} columns={columns} pagination={false} />

+ 2
- 2
src/pages/fundManagement/RechargeOrder.jsx Zobrazit soubor

@@ -136,7 +136,7 @@ function header(props) {
136 136
             dataIndex: 'tradingStatus',
137 137
             key: 'tradingStatus',
138 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 142
             title: '支付时间',
@@ -218,7 +218,7 @@ function header(props) {
218 218
                             <Select.Option value="">全部</Select.Option>
219 219
                             <Select.Option value="processing">待支付</Select.Option>
220 220
                             <Select.Option value="success">已支付</Select.Option>
221
-                            <Select.Option value="fail">已超时</Select.Option>
221
+                            <Select.Option value="fail">失败</Select.Option>
222 222
                         </Select>,
223 223
                     )}
224 224
                 </Form.Item>

+ 21
- 11
src/pages/fundManagement/RefundOrder.jsx Zobrazit soubor

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

+ 1
- 1
src/pages/fundManagement/components/Recharge.jsx Zobrazit soubor

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

+ 15
- 17
src/pages/fundManagement/components/Refund.jsx Zobrazit soubor

@@ -30,14 +30,22 @@ const SelectContact = props => {
30 30
 
31 31
     }, [props.value])
32 32
 
33
-
34
-    const handleOk = (e) => {
33
+    const handleOk = () => {
35 34
         props.form.validateFieldsAndScroll((err, values) => {
36 35
             console.log(values, "valuesvaluesvaluesvaluesvaluesvaluesvalues")
37 36
             if (!err) {
38
-                request({ ...apis.fund.accoutRefund, urlData: { id: props.accountId || '' }, data: { ...values, orgId: props.orgId } }).then((data) => {
39
-                    message.info("操作成功")
37
+
38
+                request({
39
+                    ...apis.fund.refund, urlData: { id: props.orderId }, data: {
40
+                        orgId: props.orgId,
41
+                        // amount: props.amount,
42
+                        ...values,
43
+                    }
44
+                }).then(data => {
45
+                    console.log(data)
46
+                    message.success('操作成功')
40 47
                     setVisible(false)
48
+                    // getList({ pageNum: 1, pageSize: 10, orderType: 'refund' });
41 49
                     props.onClick()
42 50
                 })
43 51
             }
@@ -64,23 +72,13 @@ const SelectContact = props => {
64 72
                 ]}
65 73
             >
66 74
                 <div>
67
-                    <p style={{ color: 'red' }}>请先进行线下实际退款操作后再执行线上退款存档</p>
68
-                    <Form {...formItemLayout} >
69 75
 
70
-                        <Form.Item label="退款金额" >
71
-                            {getFieldDecorator('refundAmount', {
72
-                                rules: [{ required: true, message: '退款金额不能为空' },
73
-                                {
74
-                                    validator: (rule, value, callback) => {
76
+                    <Form {...formItemLayout} >
77
+                        <Form.Item label="退款凭证">
75 78
 
76
-                                        callback(!regMoney.test(value) ? '金额最多两位小数' : value > balance.toString() ? '退款金额不能大于余额' : value < 0.01 ? '金额不得小于0.01' : undefined)
79
+                            <span>{regFenToYuan(props.amount)}元</span>
77 80
 
78
-                                    }
79
-                                }
80
-                                ],
81
-                            })(<Input type='number' placeholder="支持2位小数" addonAfter="元" />)}
82 81
                         </Form.Item>
83
-                        <div style={{ marginBottom: '25px' }}><span style={{ width: '25%', display: 'inline-block', textAlign: 'right' }}>余额:</span>{balance}元</div>
84 82
                         <Form.Item label="退款凭证" help="可上传银行转账截图、微信退款订单等截图作为查账线索">
85 83
                             {getFieldDecorator('certificateList', {
86 84
                                 rules: [{ required: false }],

+ 1
- 1
src/pages/fundManagement/components/SelectContact.jsx Zobrazit soubor

@@ -126,7 +126,7 @@ const SelectContact = props => {
126 126
 
127 127
     return (
128 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 131
             <Modal
132 132
                 title="选择联系人"