zhoulisen 5 years ago
parent
commit
d0891aa354

+ 1
- 1
config/config.js View File

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

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

@@ -17,21 +17,25 @@ import { regFenToYuan } from '@/utils/money';
17 17
 function header(props) {
18 18
     const orgId = props.location.query.id || ''
19 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 40
     const [tab, changeTab] = useState('basic')
37 41
 
@@ -108,9 +112,9 @@ function header(props) {
108 112
                     <div>
109 113
                         <XForm buttonVisible={false} fields={fields}></XForm>
110 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 118
                             <Button onClick={() => router.go(-1)}>返回</Button>
115 119
                         </div>
116 120
                     </div>

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

@@ -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
     /**
@@ -136,20 +136,20 @@ function header(props) {
136 136
 
137 137
     function handleReset() {
138 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 142
     const exportList = () => {
143 143
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
144 144
         if (null != LocalDate && LocalDate.length > 0) {
145 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 148
         } else {
149 149
             submitValue.startDate = null
150 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 153
             if (!data) {
154 154
                 return
155 155
             }

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

@@ -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
@@ -156,8 +156,8 @@ function header(props) {
156 156
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
157 157
         if (null != LocalDate && LocalDate.length > 0) {
158 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 161
         } else {
162 162
             submitValue.startDate = null
163 163
             submitValue.endDate = null

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

@@ -49,8 +49,8 @@ function header(props) {
49 49
                 let { LocalDate, ...submitValue } = values
50 50
                 if (null != LocalDate && LocalDate.length > 0) {
51 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 54
                 } else {
55 55
                     submitValue.startDate = null
56 56
                     submitValue.endDate = null
@@ -64,8 +64,8 @@ function header(props) {
64 64
         let { LocalDate, ...submitValue } = props.form.getFieldsValue()
65 65
         if (null != LocalDate && LocalDate.length > 0) {
66 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 69
         } else {
70 70
             submitValue.startDate = null
71 71
             submitValue.endDate = null
@@ -244,8 +244,8 @@ function header(props) {
244 244
         const { LocalDate, ...submitValue } = props.form.getFieldsValue()
245 245
         if (null != LocalDate && LocalDate.length > 0) {
246 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 249
         } else {
250 250
             submitValue.startDate = null
251 251
             submitValue.endDate = null
@@ -290,7 +290,9 @@ function header(props) {
290 290
                 onOk={() => orderRefund()}
291 291
                 onCancel={() => handleCancel()}
292 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 296
                     //     <span style={{ color: '#FF925C', cursor: 'pointer', display: 'inline-block' }} >
295 297
 
296 298
                     // </span>
@@ -338,7 +340,7 @@ function header(props) {
338 340
                 <Form.Item>
339 341
                     <span style={{ marginRight: '10px' }}>退款时间段:</span>
340 342
                     {getFieldDecorator('LocalDate')(
341
-                        <RangePicker placeholder={['开始时间', '结束时间']} />
343
+                        <RangePicker placeholder={['开始时间', '结束时间']} />,
342 344
                     )}
343 345
                 </Form.Item>
344 346
                 <Form.Item>

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

@@ -46,12 +46,15 @@ const SelectContact = props => {
46 46
 
47 47
 
48 48
     }
49
-
49
+// lineHeight: '32px'
50 50
     const { getFieldDecorator } = props.form;
51 51
     const regMoney = /^(\d+|\d+\.\d{1,2})$/;
52 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 59
             <Modal
57 60
                 visible={visible}
@@ -95,7 +98,7 @@ const SelectContact = props => {
95 98
 
96 99
 
97 100
             </Modal>
98
-        </div>
101
+        </>
99 102
     )
100 103
 }
101 104
 

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

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

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

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

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

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

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

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