zhoulisen 5 years ago
parent
commit
106a11a32e

+ 1
- 1
config/config.js View File

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

+ 2
- 4
src/pages/fundManagement/AccountManagement.jsx View File

@@ -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;
@@ -108,9 +108,7 @@ function header(props) {
108 108
             render: (x, row) => (
109 109
                 <>
110 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 View File

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

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

+ 9
- 3
src/pages/fundManagement/RefundOrder.jsx View File

@@ -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
 
@@ -225,7 +227,7 @@ function header(props) {
225 227
                 orgId: row.orgId,
226 228
                 amount: row.amount,
227 229
             }
228
-        }).then((data) => {
230
+        }).then(data => {
229 231
             console.log(data)
230 232
             getList({ pageNum: 1, pageSize: 10, orderType: 'refund' });
231 233
 
@@ -235,7 +237,7 @@ function header(props) {
235 237
     }
236 238
     // 导出
237 239
     const exportList = () => {
238
-        let { LocalDate, ...submitValue } = props.form.getFieldsValue()
240
+        const { LocalDate, ...submitValue } = props.form.getFieldsValue()
239 241
         if (null != LocalDate && LocalDate.length > 0) {
240 242
             const [startDate, endDate] = LocalDate
241 243
             submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
@@ -277,13 +279,17 @@ function header(props) {
277 279
                 <span style={{ color: 'red' }}>*</span><Input value={inputValue} onChange={e => setValue(e.target.value)} style={{ marginLeft: '10px', width: '80%' }} placeholder="请输入驳回原因" />
278 280
                 </div>
279 281
             </Modal>
282
+            {/* onClick={() => orderRefund()} */}
280 283
             <Modal
281 284
                 visible={refundVisible}
282 285
                 title="退款审核"
283 286
                 onOk={() => orderRefund()}
284 287
                 onCancel={() => handleCancel()}
285 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 293
                     <Button key="submit" type="primary" size="large" onClick={() => bohui()}>驳回</Button>,
288 294
                 ]}
289 295
             ><div>

+ 1
- 1
src/pages/fundManagement/components/Recharge.jsx View File

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

+ 22
- 5
src/pages/fundManagement/components/Refund.jsx View File

@@ -27,7 +27,7 @@ const SelectContact = props => {
27 27
     const [group, setGroup] = useState({ groupId: undefined, groupName: '退款' })
28 28
 
29 29
     useEffect(() => {
30
-
30
+        console.log(props, 'props')
31 31
     }, [props.value])
32 32
 
33 33
 
@@ -38,7 +38,7 @@ const SelectContact = props => {
38 38
                 request({ ...apis.fund.accoutRefund, urlData: { id: props.accountId || '' }, data: { ...values, orgId: props.orgId } }).then((data) => {
39 39
                     message.info("操作成功")
40 40
                     setVisible(false)
41
-                    props.onClick()
41
+                    // props.onClick()
42 42
                 })
43 43
             }
44 44
         });
@@ -46,6 +46,17 @@ const SelectContact = props => {
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 60
     const { getFieldDecorator } = props.form;
50 61
     const balance = regFenToYuan(props.realBalance)
51 62
     const regMoney = /^(\d+|\d+\.\d{1,2})$/;
@@ -64,10 +75,11 @@ const SelectContact = props => {
64 75
                 ]}
65 76
             >
66 77
                 <div>
67
-                    <p style={{ color: 'red' }}>请先进行线下实际退款操作后再执行线上退款存档</p>
78
+                    {/* <p style={{ color: 'red' }}>请先进行线下实际退款操作后再执行线上退款存档</p> */}
79
+
68 80
                     <Form {...formItemLayout} >
69 81
 
70
-                        <Form.Item label="退款金额" >
82
+                        {/* <Form.Item label="退款金额" >
71 83
                             {getFieldDecorator('refundAmount', {
72 84
                                 rules: [{ required: true, message: '退款金额不能为空' },
73 85
                                 {
@@ -80,7 +92,12 @@ const SelectContact = props => {
80 92
                                 ],
81 93
                             })(<Input type='number' placeholder="支持2位小数" addonAfter="元" />)}
82 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 101
                         <Form.Item label="退款凭证" help="可上传银行转账截图、微信退款订单等截图作为查账线索">
85 102
                             {getFieldDecorator('certificateList', {
86 103
                                 rules: [{ required: false }],

+ 1
- 1
src/pages/fundManagement/components/SelectContact.jsx View File

@@ -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="选择联系人"