xujing 4 jaren geleden
bovenliggende
commit
3ff12507f7

+ 16
- 28
src/pages/fundManagement/AccountDetail.jsx Bestand weergeven

@@ -15,7 +15,7 @@ import Recharge from './components/Recharge'
15 15
 import { regFenToYuan } from '@/utils/money';
16 16
 
17 17
 function header(props) {
18
-    const orgId = props.location.query.id || ''
18
+    const orgId = props.location.query.orgId || ''
19 19
     const [newsData, setNewsData] = useState({})
20 20
 
21 21
     useEffect(() => {
@@ -25,17 +25,16 @@ function header(props) {
25 25
     }, [])
26 26
 
27 27
     // 查询详情
28
+    const getDetail = (orgId) => {
29
+        request({
30
+            ...apis.fund.accountDetail,
31
+            urlData: { id: orgId }
32
+        }).then((data) => {
33
+            console.log(data)
34
+            setNewsData(data)
35
+        })
36
+    }
28 37
 
29
-
30
-    // const getDetail = orgId => {
31
-    //     request({
32
-    //         ...apis.fund.accountDetail,
33
-    //         urlData: { id: orgId },
34
-    //     }).then(data => {
35
-    //         console.log(data)
36
-    //         setNewsData(data)
37
-    //     })
38
-    // }
39 38
     const [tab, changeTab] = useState('basic')
40 39
 
41 40
     const fields = [
@@ -82,7 +81,7 @@ function header(props) {
82 81
             label: '退款冻结金额',
83 82
             name: 'consume',
84 83
             type: FieldTypes.Message,
85
-            value: regFenToYuan(newsData.refundBlockedAmount) || '0',
84
+            value: regFenToYuan(newsData.refundBlockedAmonut) || '0',
86 85
             help: '对账请在充值订单中查看充值状态为“已申请”的退款记录',
87 86
         },
88 87
         {
@@ -94,15 +93,6 @@ function header(props) {
94 93
         },
95 94
     ]
96 95
 
97
-    const getDetail = row => {
98
-        router.push({
99
-            pathname: '/fundManagement/AccountDetail',
100
-            query: {
101
-                id: row.orgId,
102
-            },
103
-        });
104
-    }
105
-
106 96
 
107 97
     return (
108 98
 
@@ -120,19 +110,17 @@ function header(props) {
120 110
                     <div>
121 111
                         <XForm buttonVisible={false} fields={fields}></XForm>
122 112
                         <div style={{ paddingLeft: '30%', marginTop: '30px' }}>
123
-                            {/* <Button htmlType="submit" type="primary" style={{ marginRight: '10%', padding: '0' }}> */}
124
-                                <Recharge type="primary" orgId={newsData.orgId || ''} onClick={() => getDetail(newsData)} accountId={newsData.accountId || ''} />
125
-                            {/* </Button> */}
113
+                            <Recharge orgId={newsData.orgId || ''} onClick={() => getDetail(newsData.orgId)} accountId={newsData.accountId || ''} />
126 114
                             <Button onClick={() => router.go(-1)}>返回</Button>
127 115
                         </div>
128 116
                     </div>
129 117
                 }
130
-                {tab === 'recharge' && <RechargeOrder orgId={orgId} />}
131
-                {tab === 'consume' && <ConsumeOrder orgId={orgId} />}
132
-                {tab === 'refund' && <RefundOrder orgId={orgId} />}
118
+                {tab === 'recharge' && <RechargeOrder organize="hidden" orgId={orgId} />}
119
+                {tab === 'consume' && <ConsumeOrder organize="hidden" orgId={orgId} />}
120
+                {tab === 'refund' && <RefundOrder organize="hidden" orgId={orgId} onToDetail={() => changeTab('basic')} />}
133 121
             </div>
134 122
         </>
135 123
     )
136 124
 }
137 125
 
138
-export default header
126
+export default header

+ 1
- 1
src/pages/fundManagement/AccountManagement.jsx Bestand weergeven

@@ -143,7 +143,7 @@ function header(props) {
143 143
         router.push({
144 144
             pathname: '/fundManagement/AccountDetail',
145 145
             query: {
146
-                id: row.orgId
146
+                orgId: row.orgId
147 147
             },
148 148
         });
149 149
     }

+ 14
- 10
src/pages/fundManagement/ConsumeOrder.jsx Bestand weergeven

@@ -89,7 +89,6 @@ function header(props) {
89 89
             key: 'amount',
90 90
             align: 'center',
91 91
             render: (x, row) => <span>{regFenToYuan(x)}</span>
92
-
93 92
         },
94 93
         {
95 94
             title: '消费方式',
@@ -163,6 +162,8 @@ function header(props) {
163 162
         }).catch()
164 163
     }
165 164
     const { getFieldDecorator } = props.form
165
+
166
+    const lastColumns = props.organize == 'hidden' ? columns.filter(x => x.title != '消费组织') : columns
166 167
     return (
167 168
 
168 169
         <>
@@ -189,14 +190,17 @@ function header(props) {
189 190
                         />,
190 191
                     )}
191 192
                 </Form.Item>
192
-                <Form.Item>
193
-                    {getFieldDecorator('miniAppName')(
194
-                        <Input
195
-                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
196
-                            placeholder="消费组织"
197
-                        />,
198
-                    )}
199
-                </Form.Item>
193
+                {
194
+                    props.organize != 'hidden' &&
195
+                    <Form.Item>
196
+                        {getFieldDecorator('miniAppName')(
197
+                            <Input
198
+                                prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
199
+                                placeholder="消费组织"
200
+                            />,
201
+                        )}
202
+                    </Form.Item>
203
+                }
200 204
                 <Form.Item>
201 205
                     <span style={{ marginRight: '10px' }}>消费时间段:</span>
202 206
                     {getFieldDecorator('LocalDate')(
@@ -240,7 +244,7 @@ function header(props) {
240 244
             <div>
241 245
                 <Button type="danger" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={() => exportList()} >导出</Button>
242 246
             </div>
243
-            <Table rowKey={r => r.tradeNo} dataSource={data.records} columns={columns} pagination={false} />
247
+            <Table rowKey={r => r.tradeNo} dataSource={data.records} columns={lastColumns} pagination={false} />
244 248
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
245 249
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
246 250
             </div>

+ 16
- 14
src/pages/fundManagement/RechargeOrder.jsx Bestand weergeven

@@ -65,11 +65,6 @@ function header(props) {
65 65
         getList({ pageNum: pageNumber, pageSize: 10, orderType: 'recharge', ...submitValue })
66 66
     }
67 67
     const look = (list) => {
68
-        // setSwiperList([
69
-        //     'https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1591688474&di=85bb9a6a9736e51c63a7bac09601f1e7&src=http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg',
70
-        //     'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591698586868&di=f528c96c3004268843a070c342b905fa&imgtype=0&src=http%3A%2F%2Fa2.att.hudong.com%2F36%2F48%2F19300001357258133412489354717.jpg',
71
-        //     'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591698586867&di=7865b3f07e4b6b050642a042fa30f07e&imgtype=0&src=http%3A%2F%2Fa0.att.hudong.com%2F64%2F76%2F20300001349415131407760417677.jpg'
72
-        // ])
73 68
         setSwiperList(list)
74 69
     }
75 70
     /**
@@ -176,6 +171,9 @@ function header(props) {
176 171
         }).catch()
177 172
     }
178 173
     const { getFieldDecorator } = props.form
174
+
175
+    const lastColumns = props.organize == 'hidden' ? columns.filter(x => x.title != '充值组织') : columns
176
+
179 177
     return (
180 178
 
181 179
         <>
@@ -189,14 +187,18 @@ function header(props) {
189 187
                         />,
190 188
                     )}
191 189
                 </Form.Item>
192
-                <Form.Item>
193
-                    {getFieldDecorator('miniAppName')(
194
-                        <Input
195
-                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
196
-                            placeholder="充值组织"
197
-                        />,
198
-                    )}
199
-                </Form.Item>
190
+                {
191
+                    props.organize != 'hidden' &&
192
+                    <Form.Item>
193
+                        {getFieldDecorator('miniAppName')(
194
+                            <Input
195
+                                prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
196
+                                placeholder="充值组织"
197
+                            />,
198
+                        )}
199
+                    </Form.Item>
200
+                }
201
+
200 202
                 <Form.Item>
201 203
                     <span style={{ marginRight: '10px' }}>支付时间段:</span>
202 204
                     {getFieldDecorator('LocalDate')(
@@ -234,7 +236,7 @@ function header(props) {
234 236
             <div>
235 237
                 <Button type="danger" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={() => exportList()} >导出</Button>
236 238
             </div>
237
-            <Table rowKey={r => r.tradeNo} dataSource={data.records} columns={columns} pagination={false} />
239
+            <Table rowKey={r => r.tradeNo} dataSource={data.records} columns={lastColumns} pagination={false} />
238 240
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
239 241
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
240 242
             </div>

+ 25
- 40
src/pages/fundManagement/RefundOrder.jsx Bestand weergeven

@@ -72,11 +72,6 @@ function header(props) {
72 72
         getList({ pageNum: pageNumber, pageSize: 10, orderType: 'refund', ...submitValue })
73 73
     }
74 74
     const look = (list) => {
75
-        // setSwiperList([
76
-        //     'https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1591688474&di=85bb9a6a9736e51c63a7bac09601f1e7&src=http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg',
77
-        //     'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591698586868&di=f528c96c3004268843a070c342b905fa&imgtype=0&src=http%3A%2F%2Fa2.att.hudong.com%2F36%2F48%2F19300001357258133412489354717.jpg',
78
-        //     'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591698586867&di=7865b3f07e4b6b050642a042fa30f07e&imgtype=0&src=http%3A%2F%2Fa0.att.hudong.com%2F64%2F76%2F20300001349415131407760417677.jpg'
79
-        // ])
80 75
         setSwiperList(list)
81 76
     }
82 77
     /**
@@ -208,12 +203,16 @@ function header(props) {
208 203
     }
209 204
 
210 205
     const toDeatil = () => {
211
-        router.push({
212
-            pathname: '/fundManagement/AccountDetail',
213
-            query: {
214
-                id: row.orgId,
215
-            },
216
-        });
206
+        if (orgId) {
207
+            props.onToDetail()
208
+        } else {
209
+            router.push({
210
+                pathname: '/fundManagement/AccountDetail',
211
+                query: {
212
+                    orgId: row.orgId,
213
+                },
214
+            });
215
+        }
217 216
     }
218 217
     const bohui = () => {
219 218
         setRefundVisible(false)
@@ -225,18 +224,6 @@ function header(props) {
225 224
         getList({ pageNum: 1, pageSize: 10, orderType: 'refund' });
226 225
 
227 226
         setRefundVisible(false)
228
-        // request({
229
-        //     ...apis.fund.refund, urlData: { id: row.orderId }, data: {
230
-        //         orgId: row.orgId,
231
-        //         amount: row.amount,
232
-        //     }
233
-        // }).then(data => {
234
-        //     console.log(data)
235
-        //     getList({ pageNum: 1, pageSize: 10, orderType: 'refund' });
236
-
237
-        // })
238
-
239
-        // setRefundVisible(false)
240 227
     }
241 228
     // 导出
242 229
     const exportList = () => {
@@ -264,7 +251,7 @@ function header(props) {
264 251
     }
265 252
 
266 253
     const { getFieldDecorator } = props.form
267
-    const list = []
254
+    const lastColumns = props.organize == 'hidden' ? columns.filter(x => x.title != '退款组织') : columns
268 255
     return (
269 256
 
270 257
         <>
@@ -282,19 +269,13 @@ function header(props) {
282 269
                 <span style={{ color: 'red' }}>*</span><Input value={inputValue} onChange={e => setValue(e.target.value)} style={{ marginLeft: '10px', width: '80%' }} placeholder="请输入驳回原因" />
283 270
                 </div>
284 271
             </Modal>
285
-            {/* onClick={() => orderRefund()} */}
286 272
             <Modal
287 273
                 visible={refundVisible}
288 274
                 title="退款审核"
289 275
                 onOk={() => orderRefund()}
290 276
                 onCancel={() => handleCancel()}
291 277
                 footer={[
292
-                    // <Button key="back" size="large">
293
-                    <Refund key="back" size="large" orgId={row.orgId} accountId={row.accountId} amount={row.amount || '0'} onClick={orderRefund} orderId={row.orderId} />,
294
-                    // {/* </Button>, */}
295
-                    //     <span style={{ color: '#FF925C', cursor: 'pointer', display: 'inline-block' }} >
296
-
297
-                    // </span>
278
+                    <Refund key="back" size="large" orgId={row.orgId} accountId={row.accountId} amount={row.amount || '0'} onClick={() => orderRefund()} orderId={row.orderId} />,
298 279
                     <Button key="submit" type="primary" size="large" onClick={() => bohui()}>驳回</Button>,
299 280
                 ]}
300 281
             ><div>
@@ -318,14 +299,18 @@ function header(props) {
318 299
                         />,
319 300
                     )}
320 301
                 </Form.Item>
321
-                <Form.Item>
322
-                    {getFieldDecorator('miniAppName')(
323
-                        <Input
324
-                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
325
-                            placeholder="退款组织"
326
-                        />,
327
-                    )}
328
-                </Form.Item>
302
+                {
303
+                    props.organize != 'hidden' &&
304
+                    <Form.Item>
305
+                        {getFieldDecorator('miniAppName')(
306
+                            <Input
307
+                                prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
308
+                                placeholder="退款组织"
309
+                            />,
310
+                        )}
311
+                    </Form.Item>
312
+                }
313
+
329 314
                 <Form.Item>
330 315
                     {getFieldDecorator('auditStatus')(
331 316
                         <Select style={{ width: '180px' }} placeholder="退款状态">
@@ -354,7 +339,7 @@ function header(props) {
354 339
             <div>
355 340
                 <Button type="danger" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={() => exportList()} >导出</Button>
356 341
             </div>
357
-            <Table rowKey={r => r.tradeNo} dataSource={data.records} columns={columns} pagination={false} />
342
+            <Table rowKey={r => r.tradeNo} dataSource={data.records} columns={lastColumns} pagination={false} />
358 343
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
359 344
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
360 345
             </div>

+ 1
- 1
src/pages/sample/h5/edit.jsx Bestand weergeven

@@ -98,7 +98,7 @@ const header = props => {
98 98
               rules: [{ max: 300, message: '样例体验链接不超过300个字符' }],
99 99
             })(<Input placeholder="若样例暂未发布到小程序,可直接粘贴网页链接"/>)}
100 100
           </Form.Item>
101
-          <Form.Item label="H5模板" >
101
+          <Form.Item label="H5模板" help="未配置模板的样例,客户无法直接新增H5" >
102 102
             {getFieldDecorator('taH5Template',{
103 103
               trigger: 'onChoosed'
104 104
             })(<H5Sample />)}