Bladeren bron

Merge branch 'dev' into v3-5-30

Yansen 5 jaren geleden
bovenliggende
commit
4a9c5d563b

+ 2
- 2
config/config.js Bestand weergeven

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

+ 1
- 2
src/components/uploadImage/Upload.jsx Bestand weergeven

@@ -11,7 +11,7 @@ class ImageListUpload extends React.Component {
11 11
   state = {
12 12
     previewVisible: false,
13 13
     previewImage: '',
14
-    loadding: false,
14
+    loading: false,
15 15
   };
16 16
 
17 17
   getFileList = () => {
@@ -59,7 +59,6 @@ class ImageListUpload extends React.Component {
59 59
       <div className="clearfix">
60 60
         <Upload
61 61
           listType="picture-card"
62
-          multiple={true}
63 62
           fileList={fileList}
64 63
           onPreview={this.handlePreview}
65 64
           onChange={this.handleChange}

+ 12
- 87
src/pages/fundManagement/AccountDetail.jsx Bestand weergeven

@@ -11,85 +11,20 @@ import XForm, { FieldTypes } from '../../components/XForm';
11 11
 import RechargeOrder from './RechargeOrder';
12 12
 import ConsumeOrder from './ConsumeOrder';
13 13
 import RefundOrder from './RefundOrder';
14
+import Base from './Base';
14 15
 import Recharge from './components/Recharge'
15 16
 import { regFenToYuan } from '@/utils/money';
16 17
 
17 18
 function header(props) {
18
-    const orgId = props.location.query.id || ''
19
-    const [newsData, setNewsData] = useState({})
20
-    if (orgId) {
21
-        useEffect(() => {
22
-            getDetail(orgId);
23
-        }, [])
19
+    const orgId = props.location.query.orgId || ''
24 20
 
25
-        // 查询详情
26
-        const getDetail = (orgId) => {
27
-            request({
28
-                ...apis.fund.accountDetail,
29
-                urlData: { id: orgId }
30
-            }).then((data) => {
31
-                console.log(data)
32
-                setNewsData(data)
33
-            })
34
-        }
35
-    }
36
-    const [tab, changeTab] = useState('basic')
21
+    useEffect(() => {
22
+     
23
+    }, [])
24
+
25
+  
37 26
 
38
-    const fields = [
39
-        {
40
-            label: '小程序名',
41
-            name: 'orgName',
42
-            type: FieldTypes.Message,
43
-            value: newsData.miniappName || '',
44
-        },
45
-        {
46
-            label: '公司/组织名称',
47
-            name: 'company',
48
-            type: FieldTypes.Message,
49
-            value: newsData.orgName || '',
50
-        },
51
-        {
52
-            label: '代理商',
53
-            name: 'agent',
54
-            type: FieldTypes.Message,
55
-            value: newsData.channelProxyName || '',
56
-        },
57
-        {
58
-            label: '总充值金额',
59
-            name: 'recharge',
60
-            type: FieldTypes.Message,
61
-            value: regFenToYuan(newsData.totalRechargeAmount) || '0',
62
-            help: '对账请在充值订单中查看充值状态为“已支付”的充值记录',
63
-        },
64
-        {
65
-            label: '已消费金额',
66
-            name: 'consume',
67
-            type: FieldTypes.Message,
68
-            value: regFenToYuan(newsData.purchaseAmount) || '0',
69
-            help: '对账请在充值订单中查看充值状态为“成功”的充值记录',
70
-        },
71
-        {
72
-            label: '已退款金额',
73
-            name: 'refund',
74
-            type: FieldTypes.Message,
75
-            value: regFenToYuan(newsData.totalRefund) || '0',
76
-            help: '对账请在充值订单中查看充值状态为“已退款”的退款记录',
77
-        },
78
-        {
79
-            label: '退款冻结金额',
80
-            name: 'consume',
81
-            type: FieldTypes.Message,
82
-            value: regFenToYuan(newsData.refundBlockedAmount) || '0',
83
-            help: '对账请在充值订单中查看充值状态为“已申请”的退款记录',
84
-        },
85
-        {
86
-            label: '账户余额',
87
-            name: 'consume',
88
-            type: FieldTypes.Message,
89
-            value: regFenToYuan(newsData.realBalance) || '0',
90
-            help: '对账户余额=总充值金额-已消费金额-已退款额-退款冻结额',
91
-        },
92
-    ]
27
+    const [tab, changeTab] = useState('basic')
93 28
 
94 29
 
95 30
     return (
@@ -104,20 +39,10 @@ function header(props) {
104 39
                 </Radio.Group>
105 40
             </div>
106 41
             <div>
107
-                {tab === 'basic' &&
108
-                    <div>
109
-                        <XForm buttonVisible={false} fields={fields}></XForm>
110
-                        <div style={{ paddingLeft: '30%', marginTop: '30px' }}>
111
-                            <Button htmlType="submit" type="primary" style={{ marginRight: '10%' }}>
112
-                                <Recharge orgId={newsData.orgId || ''} onClick={() => getDetail(orgId)} accountId={newsData.accountId || ''} />
113
-                            </Button>
114
-                            <Button onClick={() => router.go(-1)}>返回</Button>
115
-                        </div>
116
-                    </div>
117
-                }
118
-                {tab === 'recharge' && <RechargeOrder orgId={orgId} />}
119
-                {tab === 'consume' && <ConsumeOrder orgId={orgId} />}
120
-                {tab === 'refund' && <RefundOrder orgId={orgId} />}
42
+                {tab === 'basic' && <Base orgId={orgId} />}
43
+                {tab === 'recharge' && <RechargeOrder organize="hidden" orgId={orgId} />}
44
+                {tab === 'consume' && <ConsumeOrder organize="hidden" orgId={orgId} />}
45
+                {tab === 'refund' && <RefundOrder organize="hidden" orgId={orgId} onToDetail={() => changeTab('basic')} />}
121 46
             </div>
122 47
         </>
123 48
     )

+ 25
- 4
src/pages/fundManagement/AccountManagement.jsx Bestand weergeven

@@ -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,9 @@ 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' }} >
111
+                    {/* <span style={{ color: '#FF925C', cursor: 'pointer', display: 'inline-block' }} >
112 112
                         <Refund orgId={row.orgId} accountId={row.accountId} onClick={handleReset} realBalance={row.realBalance || '0'} />
113
-                    </span>
113
+                    </span> */}
114 114
                 </>
115 115
             ),
116 116
         },
@@ -121,11 +121,29 @@ function header(props) {
121 121
         getList({ pageNum: 1, pageSize: 10 })
122 122
     }
123 123
 
124
+    // 导出
125
+    const exportList = () => {
126
+        let { LocalDate, ...submitValue } = props.form.getFieldsValue()
127
+        
128
+        request({ ...apis.fund.accountExport, params: { ...submitValue } }).then(data => {
129
+            if (!data) {
130
+                return
131
+            }
132
+            const url = window.URL.createObjectURL(new Blob([data]))
133
+            const link = document.createElement('a')
134
+            link.style.display = 'none'
135
+            link.href = url
136
+            link.setAttribute('download', '账户列表.xlsx')
137
+            document.body.append(link)
138
+            link.click()
139
+        }).catch()
140
+    }
141
+
124 142
     const toDeatil = (row) => {
125 143
         router.push({
126 144
             pathname: '/fundManagement/AccountDetail',
127 145
             query: {
128
-                id: row.orgId
146
+                orgId: row.orgId
129 147
             },
130 148
         });
131 149
     }
@@ -153,6 +171,9 @@ function header(props) {
153 171
                     </Button>
154 172
                 </Form.Item>
155 173
             </Form>
174
+            <div>
175
+                <Button type="danger" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={() => exportList()} >导出</Button>
176
+            </div>
156 177
             <Table rowKey={r => r.accountId} dataSource={data.records} columns={columns} pagination={false} />
157 178
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
158 179
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />

+ 102
- 0
src/pages/fundManagement/Base.jsx Bestand weergeven

@@ -0,0 +1,102 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Button, Icon, message } from 'antd';
3
+import router from 'umi/router';
4
+import { fetch, apis } from '../../utils/request';
5
+import request from '../../utils/request';
6
+import XForm, { FieldTypes } from '../../components/XForm';
7
+import Recharge from './components/Recharge'
8
+import { regFenToYuan } from '@/utils/money';
9
+
10
+function header(props) {
11
+    const orgId = props.orgId || ''
12
+    const [newsData, setNewsData] = useState({})
13
+
14
+    useEffect(() => {
15
+        if (orgId) {
16
+            getDetail(orgId);
17
+        }
18
+    }, [])
19
+
20
+    // 查询详情
21
+    const getDetail = (orgId) => {
22
+        request({
23
+            ...apis.fund.accountDetail,
24
+            urlData: { id: orgId }
25
+        }).then((data) => {
26
+            console.log(data)
27
+            setNewsData(data)
28
+        })
29
+    }
30
+
31
+    const fields = [
32
+        {
33
+            label: '小程序名',
34
+            name: 'orgName',
35
+            type: FieldTypes.Message,
36
+            value: newsData.miniappName || '',
37
+        },
38
+        {
39
+            label: '公司/组织名称',
40
+            name: 'company',
41
+            type: FieldTypes.Message,
42
+            value: newsData.orgName || '',
43
+        },
44
+        {
45
+            label: '代理商',
46
+            name: 'agent',
47
+            type: FieldTypes.Message,
48
+            value: newsData.channelProxyName || '',
49
+        },
50
+        {
51
+            label: '总充值金额',
52
+            name: 'recharge',
53
+            type: FieldTypes.Message,
54
+            value: regFenToYuan(newsData.totalRechargeAmount) || '0',
55
+            help: '对账请在充值订单中查看充值状态为“已支付”的充值记录',
56
+        },
57
+        {
58
+            label: '已消费金额',
59
+            name: 'consume',
60
+            type: FieldTypes.Message,
61
+            value: regFenToYuan(newsData.purchaseAmount) || '0',
62
+            help: '对账请在充值订单中查看充值状态为“成功”的充值记录',
63
+        },
64
+        {
65
+            label: '已退款金额',
66
+            name: 'refund',
67
+            type: FieldTypes.Message,
68
+            value: regFenToYuan(newsData.totalRefund) || '0',
69
+            help: '对账请在充值订单中查看充值状态为“已退款”的退款记录',
70
+        },
71
+        {
72
+            label: '退款冻结金额',
73
+            name: 'consume',
74
+            type: FieldTypes.Message,
75
+            value: regFenToYuan(newsData.refundBlockedAmount) || '0',
76
+            help: '对账请在充值订单中查看充值状态为“已申请”的退款记录',
77
+        },
78
+        {
79
+            label: '账户余额',
80
+            name: 'consume',
81
+            type: FieldTypes.Message,
82
+            value: regFenToYuan(newsData.realBalance) || '0',
83
+            help: '对账户余额=总充值金额-已消费金额-已退款额-退款冻结额',
84
+        },
85
+    ]
86
+
87
+
88
+    return (
89
+
90
+        <>
91
+            <div>
92
+                <XForm buttonVisible={false} fields={fields}></XForm>
93
+                <div style={{ paddingLeft: '30%', marginTop: '30px' }}>
94
+                    <Recharge orgId={newsData.orgId || ''} onClick={() => getDetail(newsData.orgId)} accountId={newsData.accountId || ''} />
95
+                    <Button onClick={() => router.go(-1)}>返回</Button>
96
+                </div>
97
+            </div>
98
+        </>
99
+    )
100
+}
101
+
102
+export default header

+ 31
- 26
src/pages/fundManagement/ConsumeOrder.jsx Bestand weergeven

@@ -21,7 +21,7 @@ function header(props) {
21 21
     const [personInfo, setPersonInfo] = useState({})
22 22
     const orgId = props.orgId || ''
23 23
     useEffect(() => {
24
-        getList({ pageNum: 1, pageSize: 10, orderType: 'redPacket' });
24
+        getList({ pageNum: 1, pageSize: 10, orderType: 'RedPacket' });
25 25
     }, [])
26 26
 
27 27
     // 查询列表
@@ -41,13 +41,13 @@ function header(props) {
41 41
                 let { LocalDate, ...submitValue } = values
42 42
                 if (null != LocalDate && LocalDate.length > 0) {
43 43
                     const [startDate, endDate] = LocalDate
44
-                    submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
45
-                    submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
44
+                    submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
45
+                    submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
46 46
                 } else {
47 47
                     submitValue.startDate = null
48 48
                     submitValue.endDate = null
49 49
                 }
50
-                getList({ pageNum: 1, pageSize: 10, orderType: 'redPacket', ...submitValue })
50
+                getList({ pageNum: 1, pageSize: 10, orderType: 'RedPacket', ...submitValue })
51 51
             }
52 52
         });
53 53
     }
@@ -56,13 +56,13 @@ function header(props) {
56 56
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
57 57
         if (null != LocalDate && LocalDate.length > 0) {
58 58
             const [startDate, endDate] = LocalDate
59
-            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
60
-            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
59
+            submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
60
+            submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
61 61
         } else {
62 62
             submitValue.startDate = null
63 63
             submitValue.endDate = null
64 64
         }
65
-        getList({ pageNum: pageNumber, pageSize: 10, orderType: 'redPacket', ...submitValue })
65
+        getList({ pageNum: pageNumber, pageSize: 10, orderType: 'RedPacket', ...submitValue })
66 66
     }
67 67
 
68 68
     /**
@@ -89,13 +89,13 @@ 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: '消费方式',
96 95
             dataIndex: 'consumeType',
97 96
             key: 'consumeType',
98 97
             align: 'center',
98
+            render: (x, row) => <><span>{row.consumeType == 'RedPacket' ? '红包' : ''}</span></>
99 99
         },
100 100
         {
101 101
             title: '活动名称',
@@ -122,7 +122,7 @@ function header(props) {
122 122
             dataIndex: 'tradingStatus',
123 123
             key: 'tradingStatus',
124 124
             align: 'center',
125
-            render: (x, row) => <><span>{row.tradingStatus == '1' ? '成功' : '失败'}</span></>
125
+            render: (x, row) => <><span>{row.tradingStatus == 'success' ? '成功' : '失败'}</span></>
126 126
         },
127 127
 
128 128
     ];
@@ -135,20 +135,20 @@ function header(props) {
135 135
 
136 136
     function handleReset() {
137 137
         props.form.resetFields();
138
-        getList({ pageNum: 1, pageSize: 10, orderType: 'redPacket' })
138
+        getList({ pageNum: 1, pageSize: 10, orderType: 'RedPacket' })
139 139
     }
140 140
     // 导出
141 141
     const exportList = () => {
142 142
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
143 143
         if (null != LocalDate && LocalDate.length > 0) {
144 144
             const [startDate, endDate] = LocalDate
145
-            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
146
-            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
145
+            submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
146
+            submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
147 147
         } else {
148 148
             submitValue.startDate = null
149 149
             submitValue.endDate = null
150 150
         }
151
-        request({ ...apis.fund.consumeOrderExport, params: { orderType: 'redPacket', orgId, ...submitValue } }).then(data => {
151
+        request({ ...apis.fund.consumeOrderExport, params: { orderType: 'RedPacket', orgId, ...submitValue } }).then(data => {
152 152
             if (!data) {
153 153
                 return
154 154
             }
@@ -162,6 +162,8 @@ function header(props) {
162 162
         }).catch()
163 163
     }
164 164
     const { getFieldDecorator } = props.form
165
+
166
+    const lastColumns = props.organize == 'hidden' ? columns.filter(x => x.title != '消费组织') : columns
165 167
     return (
166 168
 
167 169
         <>
@@ -174,7 +176,7 @@ function header(props) {
174 176
                 <div style={{ paddingLeft: '36%' }}>
175 177
                     <p>昵称:{personInfo.nickname || ''}</p>
176 178
                     <p>头像:<img src={personInfo.avatarurl || ''} className={styles.touxiang} /></p>
177
-                    <p>姓名:{personInfo.name || ''}</p>
179
+                    <p>姓名:{personInfo.name || personInfo.nickname}</p>
178 180
                     <p>手机号:{personInfo.phone || ''}</p>
179 181
                 </div>
180 182
 
@@ -188,14 +190,17 @@ function header(props) {
188 190
                         />,
189 191
                     )}
190 192
                 </Form.Item>
191
-                <Form.Item>
192
-                    {getFieldDecorator('miniAppName')(
193
-                        <Input
194
-                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
195
-                            placeholder="消费组织"
196
-                        />,
197
-                    )}
198
-                </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
+                }
199 204
                 <Form.Item>
200 205
                     <span style={{ marginRight: '10px' }}>消费时间段:</span>
201 206
                     {getFieldDecorator('LocalDate')(
@@ -206,7 +211,7 @@ function header(props) {
206 211
                     {getFieldDecorator('itemType')(
207 212
                         <Select style={{ width: '180px' }} placeholder="消费方式">
208 213
                             <Select.Option value="">全部</Select.Option>
209
-                            <Select.Option value="redPacket">红包</Select.Option>
214
+                            <Select.Option value="RedPacket">红包</Select.Option>
210 215
                         </Select>,
211 216
                     )}
212 217
                 </Form.Item>
@@ -214,8 +219,8 @@ function header(props) {
214 219
                     {getFieldDecorator('tradingStatus')(
215 220
                         <Select style={{ width: '180px' }} placeholder="消费状态">
216 221
                             <Select.Option value="">全部</Select.Option>
217
-                            <Select.Option value="1">成功</Select.Option>
218
-                            <Select.Option value="2">失败</Select.Option>
222
+                            <Select.Option value="success">成功</Select.Option>
223
+                            <Select.Option value="fail">失败</Select.Option>
219 224
                         </Select>,
220 225
                     )}
221 226
                 </Form.Item>
@@ -239,7 +244,7 @@ function header(props) {
239 244
             <div>
240 245
                 <Button type="danger" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={() => exportList()} >导出</Button>
241 246
             </div>
242
-            <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} />
243 248
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
244 249
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
245 250
             </div>

+ 3
- 3
src/pages/fundManagement/Finance.jsx Bestand weergeven

@@ -23,7 +23,7 @@ function header(props) {
23 23
 
24 24
     // 查询列表
25 25
     const getList = (params) => {
26
-        request({ ...apis.fund.contactList, params: { ...params } }).then((data) => {
26
+        request({ ...apis.fund.contactList, params: { ...params, contentType: 'finance' } }).then((data) => {
27 27
             console.log(data)
28 28
             setData(data)
29 29
         })
@@ -182,8 +182,8 @@ function header(props) {
182 182
                     </Button>
183 183
                 </Form.Item>
184 184
             </Form>
185
-            <div style={{ margin: '10px 0 16px 0' }}>
186
-                <Button type="danger" className={styles.addBtn} ><SelectContact onClick={() => getList({ pageNum: 1, pageSize: 10 })} /></Button>
185
+            <div style={{ margin: '10px 0 16px 0', display: 'flex' }}>
186
+                <SelectContact type="danger" onClick={() => getList({ pageNum: 1, pageSize: 10 })} />
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} />

+ 30
- 28
src/pages/fundManagement/RechargeOrder.jsx Bestand weergeven

@@ -41,8 +41,8 @@ function header(props) {
41 41
                 let { LocalDate, ...submitValue } = values
42 42
                 if (null != LocalDate && LocalDate.length > 0) {
43 43
                     const [startDate, endDate] = LocalDate
44
-                    submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
45
-                    submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
44
+                    submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
45
+                    submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
46 46
                 } else {
47 47
                     submitValue.startDate = null
48 48
                     submitValue.endDate = null
@@ -52,12 +52,12 @@ function header(props) {
52 52
         });
53 53
     }
54 54
 
55
-    const changePageNum = (pageNumber) => {
56
-        let { LocalDate, ...submitValue } = props.form.getFieldsValue()
57
-        if (null != LocalDate && LocalDate.length > 0) {
55
+    const changePageNum = pageNumber => {
56
+        const { LocalDate, ...submitValue } = props.form.getFieldsValue()
57
+        if (LocalDate != null && LocalDate.length > 0) {
58 58
             const [startDate, endDate] = LocalDate
59
-            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
60
-            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
59
+            submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
60
+            submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
61 61
         } else {
62 62
             submitValue.startDate = null
63 63
             submitValue.endDate = null
@@ -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
     /**
@@ -104,7 +99,7 @@ function header(props) {
104 99
             dataIndex: 'isOffline',
105 100
             key: 'isOffline',
106 101
             align: 'center',
107
-            render: (x, row) => <><span>{row.isOffline ? '运营手充值' : '业务线上充值'}</span></>
102
+            render: (x, row) => <><span>{row.isOffline ? '运营手充值' : '业务线上充值'}</span></>
108 103
         },
109 104
         {
110 105
             title: '下单时间',
@@ -136,14 +131,14 @@ function header(props) {
136 131
             dataIndex: 'tradingStatus',
137 132
             key: 'tradingStatus',
138 133
             align: 'center',
139
-            render: (x, row) => <><span>{row.tradingStatus == 'processing' ? '待支付' : row.tradingStatus == 'success' ? '已支付' : '已超时'}</span></>
134
+            render: (x, row) => <><span>{row.tradingStatus == 'processing' ? '待支付' : row.tradingStatus == 'success' ? '已支付' : '失败'}</span></>
140 135
         },
141 136
         {
142 137
             title: '支付时间',
143 138
             dataIndex: 'payDate',
144 139
             key: 'payDate',
145 140
             align: 'center',
146
-            render: (x, row) => <><span>{row.payDate ? `${moment(row.payDate).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>,
141
+            render: (x, row) => <><span>{row.isOffline == 0 &&  row.payDate != null ? `${moment(row.payDate).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>,
147 142
         },
148 143
 
149 144
     ];
@@ -156,8 +151,8 @@ function header(props) {
156 151
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
157 152
         if (null != LocalDate && LocalDate.length > 0) {
158 153
             const [startDate, endDate] = LocalDate
159
-            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
160
-            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
154
+            submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
155
+            submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
161 156
         } else {
162 157
             submitValue.startDate = null
163 158
             submitValue.endDate = null
@@ -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')(
@@ -208,7 +210,7 @@ function header(props) {
208 210
                         <Select style={{ width: '180px' }} placeholder="充值方式">
209 211
                             <Select.Option value="">全部</Select.Option>
210 212
                             <Select.Option value="0">业务线上充值</Select.Option>
211
-                            <Select.Option value="1">运营手充值</Select.Option>
213
+                            <Select.Option value="1">运营手充值</Select.Option>
212 214
                         </Select>,
213 215
                     )}
214 216
                 </Form.Item>
@@ -218,7 +220,7 @@ function header(props) {
218 220
                             <Select.Option value="">全部</Select.Option>
219 221
                             <Select.Option value="processing">待支付</Select.Option>
220 222
                             <Select.Option value="success">已支付</Select.Option>
221
-                            <Select.Option value="fail">已超时</Select.Option>
223
+                            <Select.Option value="fail">失败</Select.Option>
222 224
                         </Select>,
223 225
                     )}
224 226
                 </Form.Item>
@@ -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>

+ 45
- 39
src/pages/fundManagement/RefundOrder.jsx Bestand weergeven

@@ -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
 
@@ -23,7 +24,6 @@ function header(props) {
23 24
     const [refundVisible, setRefundVisible] = useState(false)
24 25
     const [inputValue, setValue] = useState('')
25 26
     const [swiperList, setSwiperList] = useState([])
26
-    console.log(props, "propspropspropspropspropsprops")
27 27
 
28 28
     const orgId = props.orgId || ''
29 29
 
@@ -48,8 +48,8 @@ function header(props) {
48 48
                 let { LocalDate, ...submitValue } = values
49 49
                 if (null != LocalDate && LocalDate.length > 0) {
50 50
                     const [startDate, endDate] = LocalDate
51
-                    submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
52
-                    submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
51
+                    submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
52
+                    submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
53 53
                 } else {
54 54
                     submitValue.startDate = null
55 55
                     submitValue.endDate = null
@@ -63,8 +63,8 @@ function header(props) {
63 63
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
64 64
         if (null != LocalDate && LocalDate.length > 0) {
65 65
             const [startDate, endDate] = LocalDate
66
-            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
67
-            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
66
+            submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
67
+            submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
68 68
         } else {
69 69
             submitValue.startDate = null
70 70
             submitValue.endDate = null
@@ -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
     /**
@@ -197,22 +192,27 @@ function header(props) {
197 192
         setVisible(false)
198 193
         setRefundVisible(false)
199 194
     }
200
-    const reject = (row) => {
195
+    const reject = row => {
201 196
         setVisible(true)
202 197
         setRow(row)
203 198
     }
204 199
     const refund = (row) => {
205 200
         setRefundVisible(true)
201
+        console.log(row, 'row')
206 202
         setRow(row)
207 203
     }
208 204
 
209 205
     const toDeatil = () => {
210
-        router.push({
211
-            pathname: '/fundManagement/AccountDetail',
212
-            query: {
213
-                id: row.orgId
214
-            },
215
-        });
206
+        if (orgId) {
207
+            props.onToDetail()
208
+        } else {
209
+            router.push({
210
+                pathname: '/fundManagement/AccountDetail',
211
+                query: {
212
+                    orgId: row.orgId,
213
+                },
214
+            });
215
+        }
216 216
     }
217 217
     const bohui = () => {
218 218
         setRefundVisible(false)
@@ -220,26 +220,18 @@ function header(props) {
220 220
     }
221 221
 
222 222
     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 223
 
232
-        })
224
+        getList({ pageNum: 1, pageSize: 10, orderType: 'refund' });
233 225
 
234 226
         setRefundVisible(false)
235 227
     }
236 228
     // 导出
237 229
     const exportList = () => {
238
-        let { LocalDate, ...submitValue } = props.form.getFieldsValue()
230
+        const { LocalDate, ...submitValue } = props.form.getFieldsValue()
239 231
         if (null != LocalDate && LocalDate.length > 0) {
240 232
             const [startDate, endDate] = LocalDate
241
-            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
242
-            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
233
+            submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
234
+            submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
243 235
         } else {
244 236
             submitValue.startDate = null
245 237
             submitValue.endDate = null
@@ -259,7 +251,7 @@ function header(props) {
259 251
     }
260 252
 
261 253
     const { getFieldDecorator } = props.form
262
-    const list = []
254
+    const lastColumns = props.organize == 'hidden' ? columns.filter(x => x.title != '退款组织') : columns
263 255
     return (
264 256
 
265 257
         <>
@@ -283,14 +275,14 @@ function header(props) {
283 275
                 onOk={() => orderRefund()}
284 276
                 onCancel={() => handleCancel()}
285 277
                 footer={[
286
-                    <Button key="back" size="large" onClick={() => orderRefund()}>退款</Button>,
278
+                    <Refund key="back" size="large" orgId={row.orgId} accountId={row.accountId} amount={row.amount || '0'} onClick={() => orderRefund()} orderId={row.orderId} />,
287 279
                     <Button key="submit" type="primary" size="large" onClick={() => bohui()}>驳回</Button>,
288 280
                 ]}
289 281
             ><div>
290 282
                     <p>1.请核对账户余额等是否正常,且预留了足够的活动余额。异常请核对企业账单后与企业相关人员沟通并确认点击驳回申请</p>
291 283
                     <p className={styles.flexRow}>
292 284
                         <span>退款金额: <span className={styles.red}>{regFenToYuan(row.amount) || '0'}元</span></span>
293
-                        <span>账户余额:<span className={styles.red}>{regFenToYuan(row.realBalance) || '0'}元</span></span>
285
+                        <span>账户余额:<span className={styles.red}>{regFenToYuan(row.availableBalance) || '0'}元</span></span>
294 286
                         <span className={styles.blue} onClick={() => toDeatil()}>查看账户详情</span>
295 287
                     </p>
296 288
                     <p>2.请到微信商户平台使用企业付款或充值订单退款等方式退款,或使用微信转账/银行卡转账/企业对公转账等方式退款</p>
@@ -307,18 +299,32 @@ function header(props) {
307 299
                         />,
308 300
                     )}
309 301
                 </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
+
310 314
                 <Form.Item>
311
-                    {getFieldDecorator('miniAppName')(
312
-                        <Input
313
-                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
314
-                            placeholder="退款组织"
315
-                        />,
315
+                    {getFieldDecorator('auditStatus')(
316
+                        <Select style={{ width: '180px' }} placeholder="退款状态">
317
+                            <Select.Option value="">全部</Select.Option>
318
+                            <Select.Option value="checking">已申请</Select.Option>
319
+                            <Select.Option value="agree">已退款</Select.Option>
320
+                            <Select.Option value="unAgree">已驳回</Select.Option>
321
+                        </Select>,
316 322
                     )}
317 323
                 </Form.Item>
318 324
                 <Form.Item>
319 325
                     <span style={{ marginRight: '10px' }}>退款时间段:</span>
320 326
                     {getFieldDecorator('LocalDate')(
321
-                        <RangePicker placeholder={['开始时间', '结束时间']} />
327
+                        <RangePicker placeholder={['开始时间', '结束时间']} />,
322 328
                     )}
323 329
                 </Form.Item>
324 330
                 <Form.Item>
@@ -333,7 +339,7 @@ function header(props) {
333 339
             <div>
334 340
                 <Button type="danger" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} onClick={() => exportList()} >导出</Button>
335 341
             </div>
336
-            <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} />
337 343
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
338 344
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
339 345
             </div>

+ 16
- 7
src/pages/fundManagement/components/Recharge.jsx Bestand weergeven

@@ -22,6 +22,7 @@ const formItemLayout = {
22 22
 const SelectContact = props => {
23 23
 
24 24
     const [data, setData] = useState([]);
25
+    const [disabled, setDisabled] = useState(false);
25 26
     const [visible, setVisible] = useState(false);
26 27
     const [group, setGroup] = useState({ groupId: undefined, groupName: '充值' })
27 28
 
@@ -32,6 +33,7 @@ const SelectContact = props => {
32 33
 
33 34
 
34 35
     const handleOk = (e) => {
36
+        setDisabled(true)
35 37
         props.form.validateFieldsAndScroll((err, values) => {
36 38
             console.log(values, "valuesvaluesvaluesvaluesvaluesvaluesvalues")
37 39
 
@@ -40,18 +42,25 @@ const SelectContact = props => {
40 42
                     message.info("操作成功")
41 43
                     setVisible(false)
42 44
                     props.onClick()
45
+                    setDisabled(false)
46
+                    props.form.resetFields();
47
+                }).catch(err => {
48
+                    setDisabled(false)
43 49
                 })
50
+            } else {
51
+                setDisabled(false)
44 52
             }
45 53
         });
46
-
47
-
48 54
     }
49 55
 
50 56
     const { getFieldDecorator } = props.form;
51 57
     const regMoney = /^(\d+|\d+\.\d{1,2})$/;
52 58
     return (
53
-        <div>
54
-            <span onClick={() => setVisible(true)}>{group.groupName}</span>
59
+        <>
60
+            <Button onClick={() => setVisible(true)} type="primary" style={{ marginRight: '10%' }}>{group.groupName}
61
+                {/* <Recharge orgId={newsData.orgId || ''} onClick={() => getDetail(orgId)} accountId={newsData.accountId || ''} /> */}
62
+            </Button>
63
+            {/* <div onClick={() => setVisible(true)} style={{ padding: '0 15px', width: '100%', height: '100%' }}>{group.groupName}</div> */}
55 64
 
56 65
             <Modal
57 66
                 visible={visible}
@@ -60,7 +69,7 @@ const SelectContact = props => {
60 69
                 onCancel={() => setVisible(false)}
61 70
                 footer={[
62 71
                     <Button key="back" size="large" onClick={() => setVisible(false)}>取消</Button>,
63
-                    <Button key="submit" type="primary" size="large" onClick={() => handleOk()}>确认</Button>,
72
+                    <Button key="submit" type="primary" size="large" disabled={disabled} onClick={() => handleOk()}>确认</Button>,
64 73
                 ]}
65 74
             >
66 75
                 <div>
@@ -82,7 +91,7 @@ const SelectContact = props => {
82 91
 
83 92
                         <Form.Item label="充值凭证" help="可上传银行转账截图等作为查账线索">
84 93
                             {getFieldDecorator('certificateList', {
85
-                                rules: [{ required: false }],
94
+                                rules: [{ required: true }],
86 95
                             })(
87 96
                                 <Upload />,
88 97
                             )}
@@ -95,7 +104,7 @@ const SelectContact = props => {
95 104
 
96 105
 
97 106
             </Modal>
98
-        </div>
107
+        </>
99 108
     )
100 109
 }
101 110
 

+ 21
- 21
src/pages/fundManagement/components/Refund.jsx Bestand weergeven

@@ -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
             }
@@ -50,8 +58,10 @@ const SelectContact = props => {
50 58
     const balance = regFenToYuan(props.realBalance)
51 59
     const regMoney = /^(\d+|\d+\.\d{1,2})$/;
52 60
     return (
53
-        <div>
54
-            <span onClick={() => setVisible(true)}>{group.groupName}</span>
61
+        <>
62
+
63
+            <Button key="back" size="large" onClick={() => setVisible(true)}>{group.groupName}</Button>
64
+            {/* <span onClick={() => setVisible(true)}>{group.groupName}</span> */}
55 65
 
56 66
             <Modal
57 67
                 visible={visible}
@@ -64,26 +74,16 @@ const SelectContact = props => {
64 74
                 ]}
65 75
             >
66 76
                 <div>
67
-                    <p style={{ color: 'red' }}>请先进行线下实际退款操作后再执行线上退款存档</p>
68
-                    <Form {...formItemLayout} >
69 77
 
70
-                        <Form.Item label="退款金额" >
71
-                            {getFieldDecorator('refundAmount', {
72
-                                rules: [{ required: true, message: '退款金额不能为空' },
73
-                                {
74
-                                    validator: (rule, value, callback) => {
78
+                    <Form {...formItemLayout} >
79
+                        <Form.Item label="退款凭证">
75 80
 
76
-                                        callback(!regMoney.test(value) ? '金额最多两位小数' : value > balance.toString() ? '退款金额不能大于余额' : value < 0.01 ? '金额不得小于0.01' : undefined)
81
+                            <span>{regFenToYuan(props.amount)}元</span>
77 82
 
78
-                                    }
79
-                                }
80
-                                ],
81
-                            })(<Input type='number' placeholder="支持2位小数" addonAfter="元" />)}
82 83
                         </Form.Item>
83
-                        <div style={{ marginBottom: '25px' }}><span style={{ width: '25%', display: 'inline-block', textAlign: 'right' }}>余额:</span>{balance}元</div>
84 84
                         <Form.Item label="退款凭证" help="可上传银行转账截图、微信退款订单等截图作为查账线索">
85 85
                             {getFieldDecorator('certificateList', {
86
-                                rules: [{ required: false }],
86
+                                rules: [{ required: true }],
87 87
                             })(
88 88
                                 <Upload />,
89 89
                             )}
@@ -92,7 +92,7 @@ const SelectContact = props => {
92 92
                 </div>
93 93
 
94 94
             </Modal>
95
-        </div>
95
+        </>
96 96
     )
97 97
 }
98 98
 

+ 10
- 5
src/pages/fundManagement/components/SelectContact.jsx Bestand weergeven

@@ -3,6 +3,7 @@ import { Form, Modal, Button, Table, message, Input, Icon, Pagination } from 'an
3 3
 import request from '../../../utils/request';
4 4
 import apis from '../../../services/apis';
5 5
 import router from 'umi/router';
6
+import styles from './style.less'
6 7
 
7 8
 const { Column, ColumnGroup } = Table;
8 9
 const SelectContact = props => {
@@ -105,8 +106,8 @@ const SelectContact = props => {
105 106
         },
106 107
         {
107 108
             title: '对外头衔',
108
-            dataIndex: 'job',
109
-            key: 'job',
109
+            dataIndex: 'appellation',
110
+            key: 'appellation',
110 111
             align: 'center',
111 112
             ellipsis: true,
112 113
         },
@@ -125,8 +126,12 @@ const SelectContact = props => {
125 126
     const { getFieldDecorator } = props.form
126 127
 
127 128
     return (
128
-        <div>
129
-            <span style={{ color: '#fff' }} onClick={() => setVisible(true)}>{group.groupName}</span>
129
+        <div >
130
+
131
+            <Button type="danger" onClick={() => setVisible(true)} className={styles.addBtn} >{group.groupName}
132
+                {/* <SelectContact type="danger" onClick={() => getList({ pageNum: 1, pageSize: 10 })} /> */}
133
+            </Button>
134
+            {/* <div style={{ color: '#fff', padding: '0 15px', height: '32px', lineHeight: '32px' }} onClick={() => setVisible(true)}>{group.groupName}</div> */}
130 135
 
131 136
             <Modal
132 137
                 title="选择联系人"
@@ -162,7 +167,7 @@ const SelectContact = props => {
162 167
                         )}
163 168
                     </Form.Item>
164 169
                     <Form.Item>
165
-                        {getFieldDecorator('job')(
170
+                        {getFieldDecorator('appellation')(
166 171
                             <Input
167 172
                                 prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
168 173
                                 placeholder="对外头衔"

+ 6
- 4
src/pages/fundManagement/components/Swiper.jsx Bestand weergeven

@@ -1,6 +1,7 @@
1
-import React, { useEffect } from "react";
1
+import React, { useEffect } from 'react';
2 2
 // import Swiper from 'swiper';
3 3
 import styles from './style.less'
4
+import './swiper.less'
4 5
 import classNames from 'classnames';
5 6
 import closeImg from '../../../assets/close.png';
6 7
 // import 'swiper/css/swiper.min.css';
@@ -44,12 +45,13 @@ const swiper = ({ list, onClose }) => {
44 45
             {list.length > 0 && <div className={styles.mask}>
45 46
                 <div className={styles.content}>
46 47
                     <img src={closeImg} alt="" className={styles.close} onClick={onClose} />
47
-                    <Carousel autoplay>
48
+                    <Carousel autoplay draggable>
48 49
                         {list.map((item, index) =>
49
-                            <img style={{ width: '100%', height: '100%', borderRadius: '10px' }} src={item} alt="" />
50
+                            <img className={styles.swiperImg} key={index} style={{ borderRadius: '10px', objectFit: 'contain' }} src={item} alt="" />,
51
+                            // <img className={styles.swiperImg} style={{ width: '32vw', minWidth: '757px', height: '21.3vw', minHeight: '504px', borderRadius: '10px' }} src={item} alt="" />,
50 52
                         )}
51 53
                     </Carousel>
52
-                    {/* <div className={classNames(['swiper-container', styles.carousel])}  >
54
+                    {/* <div className={classNames(['swiper-container', styles.carousel])}  >object-fit: contain;
53 55
                         <div className={classNames(['swiper-wrapper', styles.carousel])} >
54 56
                             {list.map((item, index) =>
55 57
                                 <div key={'swiper' + index} className={classNames(['swiper-slide', styles.carouselItem])} >

+ 23
- 2
src/pages/fundManagement/components/style.less Bestand weergeven

@@ -1,4 +1,4 @@
1
-.mask{
1
+  .mask{
2 2
     width: 100vw;
3 3
     height: 100vh;
4 4
     background-color: rgba(0,0,0,0.32);
@@ -85,4 +85,25 @@
85 85
 
86 86
         }
87 87
     }
88
-}
88
+}
89
+
90
+.swiperImg{
91
+    max-height: 504px;
92
+     border-radius: 10px;
93
+     object-fit: contain;
94
+}
95
+
96
+.ant-carousel .slick-slide {
97
+    
98
+    text-align: center;
99
+    width: 32vw;
100
+    min-width: 757px;
101
+    height: 21.3vw;
102
+    min-height: 504px;
103
+    background: #364d79;
104
+    overflow: hidden;
105
+  }
106
+  
107
+  .ant-carousel .slick-slide h3 {
108
+    color: #fff;
109
+  }

+ 10
- 0
src/pages/fundManagement/components/swiper.less Bestand weergeven

@@ -0,0 +1,10 @@
1
+.ant-carousel .slick-slide {
2
+    
3
+    text-align: center;
4
+    // width: 32vw;
5
+    // min-width: 757px;
6
+    // height: 21.3vw;
7
+    // min-height: 504px;
8
+    background: #364d79;
9
+    overflow: hidden;
10
+  }

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

@@ -146,7 +146,7 @@ const SelectContact = props => {
146 146
                     </Form.Item>
147 147
                 </Form>
148 148
 
149
-                <Table dataSource={data.records || []} columns={columns} pagination={false} />
149
+                <Table rowKey={r => r.h5TemplateId}  dataSource={data.records || []} columns={columns} pagination={false} />
150 150
                 <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
151 151
                     <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
152 152
                 </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 />)}

+ 32
- 32
src/pages/sample/h5/index.jsx Bestand weergeven

@@ -1,6 +1,6 @@
1 1
 import React, { useState, useEffect } from 'react';
2 2
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
3
-import { Form, Pagination, Card, Button, Icon, Tooltip, message,   notification, Modal, Table, Select,Input, DatePicker,Row, Col  } from 'antd';
3
+import { Form, Pagination, Card, Button, Icon, Tooltip, message, notification, Modal, Table, Select, Input, DatePicker, Row, Col } from 'antd';
4 4
 import router from 'umi/router';
5 5
 import moment from 'moment';
6 6
 import className from 'classnames';
@@ -15,33 +15,33 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15 15
 
16 16
 function header(props) {
17 17
   // 获取初始化数据
18
-  const [ data, setData ] = useState({})
18
+  const [data, setData] = useState({})
19 19
 
20 20
   useEffect(() => {
21 21
     getList({ pageNum: 1, pageSize: 12 });
22
-  },[])
22
+  }, [])
23 23
 
24 24
   // 查询列表
25 25
   const getList = (params) => {
26 26
     request({ ...apis.sample.h5list, params: { ...params } }).then((data) => {
27
-        console.log(data)
28
-        setData(data)
27
+      console.log(data)
28
+      setData(data)
29 29
     })
30 30
   }
31 31
 
32
-  
32
+
33 33
   // 提交事件
34 34
   const handleSubmit = (e, props) => {
35 35
     e.preventDefault();
36 36
     e.stopPropagation();
37 37
     props.form.validateFields((err, values) => {
38 38
       if (!err) {
39
-        let {createDate, ...submitValue} = values
40
-        if(null != createDate && createDate.length > 0){
39
+        let { createDate, ...submitValue } = values
40
+        if (null != createDate && createDate.length > 0) {
41 41
           const [startCreateDate, endCreateDate] = createDate
42 42
           submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
43 43
           submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
44
-        }else{
44
+        } else {
45 45
           submitValue.startCreateDate = null
46 46
           submitValue.endCreateDate = null
47 47
         }
@@ -51,12 +51,12 @@ function header(props) {
51 51
   }
52 52
 
53 53
   const changePageNum = (pageNumber) => {
54
-    let {createDate, ...submitValue} = props.form.getFieldsValue()
55
-    if(null != createDate && createDate.length > 0){
54
+    let { createDate, ...submitValue } = props.form.getFieldsValue()
55
+    if (null != createDate && createDate.length > 0) {
56 56
       const [startCreateDate, endCreateDate] = createDate
57 57
       submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
58 58
       submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
59
-    }else{
59
+    } else {
60 60
       submitValue.startCreateDate = null
61 61
       submitValue.endCreateDate = null
62 62
     }
@@ -74,15 +74,15 @@ function header(props) {
74 74
     });
75 75
   }
76 76
 
77
-  
77
+
78 78
   const changeNewsStatus = (row, newsId) => () => {
79
-    const title = row.status === 0 ? '确定启用吗': '停用后,此账号将无法登录渠道代理商后台'
79
+    const title = row.status === 0 ? '确定启用吗' : '停用后,此账号将无法登录渠道代理商后台'
80 80
     Modal.confirm({
81 81
       title: title,
82 82
       okText: '确认',
83 83
       cancelText: '取消',
84 84
       onOk() {
85
-        if(row.status === 0){
85
+        if (row.status === 0) {
86 86
           request({ ...apis.channel.put, urlData: { id: newsId }, data: { ...row, status: 1 } }).then((data) => {
87 87
             message.info('操作成功!')
88 88
             getList({ pageNum: 1, pageSize: 12 });
@@ -90,7 +90,7 @@ function header(props) {
90 90
             console.log(err)
91 91
             message.info(err.msg || err.message)
92 92
           })
93
-        }else{
93
+        } else {
94 94
           request({ ...apis.channel.put, urlData: { id: newsId }, data: { ...row, status: 0 } }).then((data) => {
95 95
             message.info('操作成功!')
96 96
             getList({ pageNum: 1, pageSize: 12 });
@@ -99,11 +99,11 @@ function header(props) {
99 99
             message.info(err.msg || err.message)
100 100
           })
101 101
         }
102
-        
102
+
103 103
       }
104 104
     });
105 105
   }
106
-   
106
+
107 107
   function handleReset() {
108 108
     props.form.resetFields();
109 109
     getList({ pageNum: 1, pageSize: 12 })
@@ -113,7 +113,7 @@ function header(props) {
113 113
   return (
114 114
 
115 115
     <>
116
-    <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
116
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
117 117
         <Form.Item>
118 118
           {getFieldDecorator('sampleName')(
119 119
             <Input
@@ -131,10 +131,10 @@ function header(props) {
131 131
           )}
132 132
         </Form.Item>
133 133
         <Form.Item>
134
-            <span style={{marginRight:'10px'}}>新增时间段:</span>
135
-                {getFieldDecorator('createDate')(
136
-                  <RangePicker placeholder={['开始时间','结束时间']} />
137
-                )}
134
+          <span style={{ marginRight: '10px' }}>新增时间段:</span>
135
+          {getFieldDecorator('createDate')(
136
+            <RangePicker placeholder={['开始时间', '结束时间']} />
137
+          )}
138 138
         </Form.Item>
139 139
         <Form.Item>
140 140
           {getFieldDecorator('tag')(
@@ -149,21 +149,21 @@ function header(props) {
149 149
             搜索
150 150
           </Button>
151 151
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
152
-              重置
152
+            重置
153 153
           </Button>
154 154
         </Form.Item>
155 155
       </Form>
156
-      
156
+
157 157
       <Button type="danger" className={styles.addBtn} onClick={toEditH5()}>新增</Button>
158
-      <Row>      
159
-          {(data.records || []).map(x => (
160
-              <Col span={6}>
161
-                <H5Card h5Data={x} onChange={handleReset}/>
162
-              </Col>
163
-            ))}
158
+      <Row>
159
+        {(data.records || []).map((x, index) => (
160
+          <Col key={index} span={6}>
161
+            <H5Card h5Data={x} onChange={handleReset} />
162
+          </Col>
163
+        ))}
164 164
       </Row>
165 165
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
166
-        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
166
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
167 167
       </div>
168 168
     </>
169 169
   )

+ 5
- 0
src/services/apis.js Bestand weergeven

@@ -268,6 +268,11 @@ const apis = {
268 268
       method: 'GET',
269 269
       action: 'channel',
270 270
     },
271
+    accountExport: {
272
+      url: `${prefix}/taOrgAccount/taOrgAccountListExport`,
273
+      method: 'GET',
274
+      action: 'channel',
275
+    },
271 276
   },
272 277
   relatedOrganization: {
273 278
     get: {