zhoulisen 5 years ago
parent
commit
d0891aa354

+ 1
- 1
config/config.js View File

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

+ 20
- 16
src/pages/fundManagement/AccountDetail.jsx View File

17
 function header(props) {
17
 function header(props) {
18
     const orgId = props.location.query.id || ''
18
     const orgId = props.location.query.id || ''
19
     const [newsData, setNewsData] = useState({})
19
     const [newsData, setNewsData] = useState({})
20
-    if (orgId) {
21
-        useEffect(() => {
22
-            getDetail(orgId);
23
-        }, [])
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
-            })
21
+    useEffect(() => {
22
+        if (orgId) {
23
+            getDetail(orgId);
34
         }
24
         }
25
+    }, [])
26
+
27
+    // 查询详情
28
+
29
+
30
+
31
+    const getDetail = orgId => {
32
+        request({
33
+            ...apis.fund.accountDetail,
34
+            urlData: { id: orgId },
35
+        }).then(data => {
36
+            console.log(data)
37
+            setNewsData(data)
38
+        })
35
     }
39
     }
36
     const [tab, changeTab] = useState('basic')
40
     const [tab, changeTab] = useState('basic')
37
 
41
 
108
                     <div>
112
                     <div>
109
                         <XForm buttonVisible={false} fields={fields}></XForm>
113
                         <XForm buttonVisible={false} fields={fields}></XForm>
110
                         <div style={{ paddingLeft: '30%', marginTop: '30px' }}>
114
                         <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>
115
+                            {/* <Button htmlType="submit" type="primary" style={{ marginRight: '10%', padding: '0' }}> */}
116
+                                <Recharge type="primary" orgId={newsData.orgId || ''} onClick={() => getDetail(orgId)} accountId={newsData.accountId || ''} />
117
+                            {/* </Button> */}
114
                             <Button onClick={() => router.go(-1)}>返回</Button>
118
                             <Button onClick={() => router.go(-1)}>返回</Button>
115
                         </div>
119
                         </div>
116
                     </div>
120
                     </div>

+ 10
- 10
src/pages/fundManagement/ConsumeOrder.jsx View File

41
                 let { LocalDate, ...submitValue } = values
41
                 let { LocalDate, ...submitValue } = values
42
                 if (null != LocalDate && LocalDate.length > 0) {
42
                 if (null != LocalDate && LocalDate.length > 0) {
43
                     const [startDate, endDate] = LocalDate
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
                 } else {
46
                 } else {
47
                     submitValue.startDate = null
47
                     submitValue.startDate = null
48
                     submitValue.endDate = null
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
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
56
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
57
         if (null != LocalDate && LocalDate.length > 0) {
57
         if (null != LocalDate && LocalDate.length > 0) {
58
             const [startDate, endDate] = LocalDate
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
         } else {
61
         } else {
62
             submitValue.startDate = null
62
             submitValue.startDate = null
63
             submitValue.endDate = null
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
     /**
136
 
136
 
137
     function handleReset() {
137
     function handleReset() {
138
         props.form.resetFields();
138
         props.form.resetFields();
139
-        getList({ pageNum: 1, pageSize: 10, orderType: 'redPacket' })
139
+        getList({ pageNum: 1, pageSize: 10, orderType: 'RedPacket' })
140
     }
140
     }
141
     // 导出
141
     // 导出
142
     const exportList = () => {
142
     const exportList = () => {
143
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
143
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
144
         if (null != LocalDate && LocalDate.length > 0) {
144
         if (null != LocalDate && LocalDate.length > 0) {
145
             const [startDate, endDate] = LocalDate
145
             const [startDate, endDate] = LocalDate
146
-            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
147
-            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
146
+            submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
147
+            submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
148
         } else {
148
         } else {
149
             submitValue.startDate = null
149
             submitValue.startDate = null
150
             submitValue.endDate = null
150
             submitValue.endDate = null
151
         }
151
         }
152
-        request({ ...apis.fund.consumeOrderExport, params: { orderType: 'redPacket', orgId, ...submitValue } }).then(data => {
152
+        request({ ...apis.fund.consumeOrderExport, params: { orderType: 'RedPacket', orgId, ...submitValue } }).then(data => {
153
             if (!data) {
153
             if (!data) {
154
                 return
154
                 return
155
             }
155
             }

+ 9
- 9
src/pages/fundManagement/RechargeOrder.jsx View File

41
                 let { LocalDate, ...submitValue } = values
41
                 let { LocalDate, ...submitValue } = values
42
                 if (null != LocalDate && LocalDate.length > 0) {
42
                 if (null != LocalDate && LocalDate.length > 0) {
43
                     const [startDate, endDate] = LocalDate
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
                 } else {
46
                 } else {
47
                     submitValue.startDate = null
47
                     submitValue.startDate = null
48
                     submitValue.endDate = null
48
                     submitValue.endDate = null
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
             const [startDate, endDate] = LocalDate
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
         } else {
61
         } else {
62
             submitValue.startDate = null
62
             submitValue.startDate = null
63
             submitValue.endDate = null
63
             submitValue.endDate = null
156
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
156
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
157
         if (null != LocalDate && LocalDate.length > 0) {
157
         if (null != LocalDate && LocalDate.length > 0) {
158
             const [startDate, endDate] = LocalDate
158
             const [startDate, endDate] = LocalDate
159
-            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
160
-            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
159
+            submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
160
+            submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
161
         } else {
161
         } else {
162
             submitValue.startDate = null
162
             submitValue.startDate = null
163
             submitValue.endDate = null
163
             submitValue.endDate = null

+ 10
- 8
src/pages/fundManagement/RefundOrder.jsx View File

49
                 let { LocalDate, ...submitValue } = values
49
                 let { LocalDate, ...submitValue } = values
50
                 if (null != LocalDate && LocalDate.length > 0) {
50
                 if (null != LocalDate && LocalDate.length > 0) {
51
                     const [startDate, endDate] = LocalDate
51
                     const [startDate, endDate] = LocalDate
52
-                    submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
53
-                    submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
52
+                    submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
53
+                    submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
54
                 } else {
54
                 } else {
55
                     submitValue.startDate = null
55
                     submitValue.startDate = null
56
                     submitValue.endDate = null
56
                     submitValue.endDate = null
64
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
64
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
65
         if (null != LocalDate && LocalDate.length > 0) {
65
         if (null != LocalDate && LocalDate.length > 0) {
66
             const [startDate, endDate] = LocalDate
66
             const [startDate, endDate] = LocalDate
67
-            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
68
-            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
67
+            submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
68
+            submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
69
         } else {
69
         } else {
70
             submitValue.startDate = null
70
             submitValue.startDate = null
71
             submitValue.endDate = null
71
             submitValue.endDate = null
244
         const { LocalDate, ...submitValue } = props.form.getFieldsValue()
244
         const { LocalDate, ...submitValue } = props.form.getFieldsValue()
245
         if (null != LocalDate && LocalDate.length > 0) {
245
         if (null != LocalDate && LocalDate.length > 0) {
246
             const [startDate, endDate] = LocalDate
246
             const [startDate, endDate] = LocalDate
247
-            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
248
-            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
247
+            submitValue.startDate = `${moment(startDate).format('YYYY-MM-DDT00:00:00')}Z`;
248
+            submitValue.endDate = `${moment(endDate).format('YYYY-MM-DDT23:59:59')}Z`;
249
         } else {
249
         } else {
250
             submitValue.startDate = null
250
             submitValue.startDate = null
251
             submitValue.endDate = null
251
             submitValue.endDate = null
290
                 onOk={() => orderRefund()}
290
                 onOk={() => orderRefund()}
291
                 onCancel={() => handleCancel()}
291
                 onCancel={() => handleCancel()}
292
                 footer={[
292
                 footer={[
293
-                    <Button key="back" size="large"><Refund orgId={row.orgId} accountId={row.accountId} amount={row.amount || '0'} onClick={orderRefund} orderId={row.orderId} /></Button>,
293
+                    // <Button key="back" size="large">
294
+                    <Refund key="back" size="large" orgId={row.orgId} accountId={row.accountId} amount={row.amount || '0'} onClick={orderRefund} orderId={row.orderId} />,
295
+                    // {/* </Button>, */}
294
                     //     <span style={{ color: '#FF925C', cursor: 'pointer', display: 'inline-block' }} >
296
                     //     <span style={{ color: '#FF925C', cursor: 'pointer', display: 'inline-block' }} >
295
 
297
 
296
                     // </span>
298
                     // </span>
338
                 <Form.Item>
340
                 <Form.Item>
339
                     <span style={{ marginRight: '10px' }}>退款时间段:</span>
341
                     <span style={{ marginRight: '10px' }}>退款时间段:</span>
340
                     {getFieldDecorator('LocalDate')(
342
                     {getFieldDecorator('LocalDate')(
341
-                        <RangePicker placeholder={['开始时间', '结束时间']} />
343
+                        <RangePicker placeholder={['开始时间', '结束时间']} />,
342
                     )}
344
                     )}
343
                 </Form.Item>
345
                 </Form.Item>
344
                 <Form.Item>
346
                 <Form.Item>

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

46
 
46
 
47
 
47
 
48
     }
48
     }
49
-
49
+// lineHeight: '32px'
50
     const { getFieldDecorator } = props.form;
50
     const { getFieldDecorator } = props.form;
51
     const regMoney = /^(\d+|\d+\.\d{1,2})$/;
51
     const regMoney = /^(\d+|\d+\.\d{1,2})$/;
52
     return (
52
     return (
53
-        <div>
54
-            <span onClick={() => setVisible(true)}>{group.groupName}</span>
53
+        <>
54
+            <Button onClick={() => setVisible(true)} type="primary" style={{ marginRight: '10%'}}>{group.groupName}
55
+                                {/* <Recharge orgId={newsData.orgId || ''} onClick={() => getDetail(orgId)} accountId={newsData.accountId || ''} /> */}
56
+                            </Button>
57
+            {/* <div onClick={() => setVisible(true)} style={{ padding: '0 15px', width: '100%', height: '100%' }}>{group.groupName}</div> */}
55
 
58
 
56
             <Modal
59
             <Modal
57
                 visible={visible}
60
                 visible={visible}
95
 
98
 
96
 
99
 
97
             </Modal>
100
             </Modal>
98
-        </div>
101
+        </>
99
     )
102
     )
100
 }
103
 }
101
 
104
 

+ 6
- 4
src/pages/fundManagement/components/Refund.jsx View File

58
     const balance = regFenToYuan(props.realBalance)
58
     const balance = regFenToYuan(props.realBalance)
59
     const regMoney = /^(\d+|\d+\.\d{1,2})$/;
59
     const regMoney = /^(\d+|\d+\.\d{1,2})$/;
60
     return (
60
     return (
61
-        <div>
62
-            <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> */}
63
 
65
 
64
             <Modal
66
             <Modal
65
                 visible={visible}
67
                 visible={visible}
81
                         </Form.Item>
83
                         </Form.Item>
82
                         <Form.Item label="退款凭证" help="可上传银行转账截图、微信退款订单等截图作为查账线索">
84
                         <Form.Item label="退款凭证" help="可上传银行转账截图、微信退款订单等截图作为查账线索">
83
                             {getFieldDecorator('certificateList', {
85
                             {getFieldDecorator('certificateList', {
84
-                                rules: [{ required: false }],
86
+                                rules: [{ required: true }],
85
                             })(
87
                             })(
86
                                 <Upload />,
88
                                 <Upload />,
87
                             )}
89
                             )}
90
                 </div>
92
                 </div>
91
 
93
 
92
             </Modal>
94
             </Modal>
93
-        </div>
95
+        </>
94
     )
96
     )
95
 }
97
 }
96
 
98
 

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

3
 import request from '../../../utils/request';
3
 import request from '../../../utils/request';
4
 import apis from '../../../services/apis';
4
 import apis from '../../../services/apis';
5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
+import styles from './style.less'
6
 
7
 
7
 const { Column, ColumnGroup } = Table;
8
 const { Column, ColumnGroup } = Table;
8
 const SelectContact = props => {
9
 const SelectContact = props => {
126
 
127
 
127
     return (
128
     return (
128
         <div >
129
         <div >
129
-            <div style={{ color: '#fff', padding: '0 15px', height: '32px', lineHeight: '32px' }} onClick={() => setVisible(true)}>{group.groupName}</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
             <Modal
136
             <Modal
132
                 title="选择联系人"
137
                 title="选择联系人"

+ 6
- 4
src/pages/fundManagement/components/Swiper.jsx View File

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

+ 23
- 2
src/pages/fundManagement/components/style.less View File

1
-.mask{
1
+  .mask{
2
     width: 100vw;
2
     width: 100vw;
3
     height: 100vh;
3
     height: 100vh;
4
     background-color: rgba(0,0,0,0.32);
4
     background-color: rgba(0,0,0,0.32);
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 View File

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
+  }