xujing 4 年之前
父節點
當前提交
3ecf23cfec

+ 2
- 2
config/config.js 查看文件

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

二進制
src/assets/close.png 查看文件


+ 81
- 0
src/components/uploadImage/Upload.jsx 查看文件

1
+import React from 'react';
2
+import { Upload, Icon, message, Modal } from 'antd';
3
+import './style.less';
4
+import { uploaderProps } from '../../utils/upload';
5
+
6
+
7
+
8
+class ImageUpload extends React.Component {
9
+
10
+  state = {
11
+    loading: false,
12
+    previewVisible: false,
13
+    previewImage: '',
14
+    fileList: this.getPropsFileList(),
15
+  };
16
+
17
+  componentDidUpdate(prevProps) {
18
+    // 直接 setState 会死循环
19
+    if (prevProps.value !== this.props.value) {
20
+      this.setState({ fileList: this.getPropsFileList() })
21
+    }
22
+  }
23
+
24
+  getPropsFileList() {
25
+    return !this.props.value ? [] : [{
26
+      uid: '-1',
27
+      name: 'image.png',
28
+      status: 'done',
29
+      url: this.props.value,
30
+    }]
31
+  }
32
+
33
+
34
+  handleChange = ({ file, fileList }) => {
35
+    const { status, response } = file
36
+    this.setState({ fileList, loading: status === "uploading" })
37
+
38
+    if (typeof this.props.onChange === 'function' && status != "uploading") {
39
+      const image = status === 'done' ? response : undefined
40
+      this.props.onChange(image);
41
+    }
42
+  };
43
+
44
+  handleCancel = () => this.setState({ previewVisible: false });
45
+
46
+  handlePreview = async file => {
47
+    console.log(file)
48
+    this.setState({
49
+      previewImage: file.url,
50
+      previewVisible: true,
51
+    });
52
+  };
53
+
54
+  render() {
55
+    const uploadButton = (
56
+      <div>
57
+        <Icon style={{ fontSize: '2em', color: '#aaa' }} type={this.state.loading ? "loading" : "plus"} />
58
+      </div>
59
+    );
60
+
61
+    return (
62
+      <>
63
+      <Upload
64
+        {...uploaderProps}
65
+        listType="picture-card"
66
+        className="avatar-uploader"
67
+        onChange={this.handleChange}
68
+        fileList={this.state.fileList}
69
+        onPreview={this.handlePreview}
70
+      >
71
+        {this.state.fileList.length >= 6 ? null : uploadButton}  
72
+      </Upload>
73
+      <Modal visible={this.state.previewVisible} footer={null} onCancel={this.handleCancel}>
74
+      <img alt="example" style={{ width: '100%' }} src={this.state.previewImage} />
75
+      </Modal>
76
+      </>
77
+    );
78
+  }
79
+}
80
+
81
+export default ImageUpload;

+ 1
- 1
src/pages/contact/contact/list.jsx 查看文件

17
     }, [])
17
     }, [])
18
     // 查询列表
18
     // 查询列表
19
     const getList = params => {
19
     const getList = params => {
20
-        request({ ...apis.contact.listContactByCondition, params: { ...params } }).then(data => {
20
+        request({ ...apis.contact.list, params: { ...params } }).then(data => {
21
             console.log(data)
21
             console.log(data)
22
             setData(data)
22
             setData(data)
23
         })
23
         })

+ 28
- 11
src/pages/fundManagement/AccountDetail.jsx 查看文件

14
 
14
 
15
 
15
 
16
 function header(props) {
16
 function header(props) {
17
+    const orgId = props.location.query.id || ''
18
+    const [newsData, setNewsData] = useState({})
19
+    if (orgId) {
20
+        useEffect(() => {
21
+            getDetail(orgId);
22
+        }, [])
17
 
23
 
24
+        // 查询详情
25
+        const getDetail = (orgId) => {
26
+            request({
27
+                ...apis.fund.accountDetail,
28
+                urlData: { id: orgId }
29
+            }).then((data) => {
30
+                console.log(data)
31
+                setNewsData(data)
32
+            })
33
+        }
34
+    }
18
     const [tab, changeTab] = useState('basic')
35
     const [tab, changeTab] = useState('basic')
19
 
36
 
20
     const fields = [
37
     const fields = [
22
             label: '小程序名',
39
             label: '小程序名',
23
             name: 'orgName',
40
             name: 'orgName',
24
             type: FieldTypes.Message,
41
             type: FieldTypes.Message,
25
-            value: '444444444444444',
42
+            value: newsData.miniappName || '',
26
         },
43
         },
27
         {
44
         {
28
             label: '公司/组织名称',
45
             label: '公司/组织名称',
29
             name: 'company',
46
             name: 'company',
30
             type: FieldTypes.Message,
47
             type: FieldTypes.Message,
31
-            value: '444444444444444',
48
+            value: newsData.orgName || '',
32
         },
49
         },
33
         {
50
         {
34
             label: '代理商',
51
             label: '代理商',
35
             name: 'agent',
52
             name: 'agent',
36
             type: FieldTypes.Message,
53
             type: FieldTypes.Message,
37
-            value: '444444444444444',
54
+            value: newsData.channelProxyName || '',
38
         },
55
         },
39
         {
56
         {
40
             label: '总充值金额',
57
             label: '总充值金额',
41
             name: 'recharge',
58
             name: 'recharge',
42
             type: FieldTypes.Message,
59
             type: FieldTypes.Message,
43
-            value: '444444444444444元',
60
+            value: newsData.totalRechargeAmount || '0',
44
             help: '对账请在充值订单中查看充值状态为“已支付”的充值记录',
61
             help: '对账请在充值订单中查看充值状态为“已支付”的充值记录',
45
         },
62
         },
46
         {
63
         {
47
             label: '已消费金额',
64
             label: '已消费金额',
48
             name: 'consume',
65
             name: 'consume',
49
             type: FieldTypes.Message,
66
             type: FieldTypes.Message,
50
-            value: '444444444444444元',
67
+            value: newsData.purchaseAmount || '0',
51
             help: '对账请在充值订单中查看充值状态为“成功”的充值记录',
68
             help: '对账请在充值订单中查看充值状态为“成功”的充值记录',
52
         },
69
         },
53
         {
70
         {
54
             label: '已退款金额',
71
             label: '已退款金额',
55
             name: 'refund',
72
             name: 'refund',
56
             type: FieldTypes.Message,
73
             type: FieldTypes.Message,
57
-            value: '444444444444444元',
74
+            value: newsData.totalRefund || '0',
58
             help: '对账请在充值订单中查看充值状态为“已退款”的退款记录',
75
             help: '对账请在充值订单中查看充值状态为“已退款”的退款记录',
59
         },
76
         },
60
         {
77
         {
61
             label: '退款冻结金额',
78
             label: '退款冻结金额',
62
             name: 'consume',
79
             name: 'consume',
63
             type: FieldTypes.Message,
80
             type: FieldTypes.Message,
64
-            value: '444444444444444元',
81
+            value: newsData.refundBlockedAmonut || '0',
65
             help: '对账请在充值订单中查看充值状态为“已申请”的退款记录',
82
             help: '对账请在充值订单中查看充值状态为“已申请”的退款记录',
66
         },
83
         },
67
         {
84
         {
68
             label: '账户余额',
85
             label: '账户余额',
69
             name: 'consume',
86
             name: 'consume',
70
             type: FieldTypes.Message,
87
             type: FieldTypes.Message,
71
-            value: '444444444444444元',
88
+            value: newsData.realBalance || '0',
72
             help: '对账户余额=总充值金额-已消费金额-已退款额-退款冻结额',
89
             help: '对账户余额=总充值金额-已消费金额-已退款额-退款冻结额',
73
         },
90
         },
74
     ]
91
     ]
97
                         </div>
114
                         </div>
98
                     </div>
115
                     </div>
99
                 }
116
                 }
100
-                {tab === 'recharge' && <RechargeOrder />}
101
-                {tab === 'consume' && <ConsumeOrder />}
102
-                {tab === 'refund' && <RefundOrder />}
117
+                {tab === 'recharge' && <RechargeOrder orgId={orgId} />}
118
+                {tab === 'consume' && <ConsumeOrder orgId={orgId} />}
119
+                {tab === 'refund' && <RefundOrder orgId={orgId} />}
103
             </div>
120
             </div>
104
         </>
121
         </>
105
     )
122
     )

+ 29
- 41
src/pages/fundManagement/AccountManagement.jsx 查看文件

9
 import { fetch, apis } from '../../utils/request';
9
 import { fetch, apis } from '../../utils/request';
10
 import request from '../../utils/request';
10
 import request from '../../utils/request';
11
 import AuthButton from '@/components/AuthButton';
11
 import AuthButton from '@/components/AuthButton';
12
+import Recharge from './components/Recharge'
12
 
13
 
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 
15
 
23
 
24
 
24
     // 查询列表
25
     // 查询列表
25
     const getList = (params) => {
26
     const getList = (params) => {
26
-        request({ ...apis.sample.list, params: { ...params } }).then((data) => {
27
+        request({ ...apis.fund.account, params: { ...params } }).then((data) => {
27
             console.log(data)
28
             console.log(data)
28
             setData(data)
29
             setData(data)
29
         })
30
         })
35
         e.preventDefault();
36
         e.preventDefault();
36
         props.form.validateFields((err, values) => {
37
         props.form.validateFields((err, values) => {
37
             if (!err) {
38
             if (!err) {
38
-                let { createDate, ...submitValue } = values
39
-                if (null != createDate && createDate.length > 0) {
40
-                    const [startCreateDate, endCreateDate] = createDate
41
-                    submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
42
-                    submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
43
-                } else {
44
-                    submitValue.startCreateDate = null
45
-                    submitValue.endCreateDate = null
46
-                }
47
-                getList({ pageNum: 1, pageSize: 10, ...submitValue })
39
+                let { miniAppName } = values
40
+
41
+                getList({ pageNum: 1, pageSize: 10, miniAppName, })
48
             }
42
             }
49
         });
43
         });
50
     }
44
     }
51
 
45
 
52
     const changePageNum = (pageNumber) => {
46
     const changePageNum = (pageNumber) => {
53
-        let { createDate, ...submitValue } = props.form.getFieldsValue()
54
-        if (null != createDate && createDate.length > 0) {
55
-            const [startCreateDate, endCreateDate] = createDate
56
-            submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
57
-            submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
58
-        } else {
59
-            submitValue.startCreateDate = null
60
-            submitValue.endCreateDate = null
61
-        }
62
-        getList({ pageNum: pageNumber, pageSize: 10, ...submitValue })
47
+        let { miniAppName } = props.form.getFieldsValue()
48
+
49
+        getList({ pageNum: pageNumber, pageSize: 10, miniAppName, })
63
     }
50
     }
64
 
51
 
65
     /**
52
     /**
71
     const columns = [
58
     const columns = [
72
         {
59
         {
73
             title: '账户',
60
             title: '账户',
74
-            dataIndex: 'sampleName',
75
-            key: 'sampleName',
61
+            dataIndex: 'miniappName',
62
+            key: 'miniappName',
76
             align: 'center',
63
             align: 'center',
77
             render: (x, row) => (
64
             render: (x, row) => (
78
                 <>
65
                 <>
79
-                    <span style={{ color: '#FF925C', cursor: 'pointer', marginRight: '16px' }} onClick={() => toDeatil()} >
80
-                        {row.sampleName}
66
+                    <span style={{ color: '#FF925C', cursor: 'pointer', marginRight: '16px' }} onClick={() => toDeatil(row)} >
67
+                        {row.miniappName}
81
                     </span>
68
                     </span>
82
                 </>
69
                 </>
83
             ),
70
             ),
84
         },
71
         },
85
         {
72
         {
86
             title: '总充值金额',
73
             title: '总充值金额',
87
-            dataIndex: 'orgName',
88
-            key: 'orgName',
74
+            dataIndex: 'totalRechargeAmount',
75
+            key: 'totalRechargeAmount',
89
             align: 'center',
76
             align: 'center',
90
         },
77
         },
91
         {
78
         {
92
             title: '已消费金额',
79
             title: '已消费金额',
93
-            dataIndex: 'orderer',
94
-            key: 'orderer',
80
+            dataIndex: 'purchaseAmount',
81
+            key: 'purchaseAmount',
95
             align: 'center',
82
             align: 'center',
96
         },
83
         },
97
         {
84
         {
98
             title: '已退款金额',
85
             title: '已退款金额',
99
-            dataIndex: 'orderer',
100
-            key: 'orderer',
86
+            dataIndex: 'totalRefund',
87
+            key: 'totalRefund',
101
             align: 'center',
88
             align: 'center',
102
         },
89
         },
103
         {
90
         {
104
             title: '余额',
91
             title: '余额',
105
-            dataIndex: 'orderer',
106
-            key: 'orderer',
92
+            dataIndex: 'realBalance',
93
+            key: 'realBalance',
107
             align: 'center',
94
             align: 'center',
108
         },
95
         },
109
         {
96
         {
110
             title: '操作',
97
             title: '操作',
111
-            dataIndex: 'createDate',
112
-            key: 'createDate',
98
+            dataIndex: 'handle',
99
+            key: 'handle',
113
             align: 'center',
100
             align: 'center',
114
             width: '120px',
101
             width: '120px',
115
             render: (x, row) => (
102
             render: (x, row) => (
116
                 <>
103
                 <>
117
-                    <span style={{ color: '#FF925C', cursor: 'pointer', marginRight: '16px' }} >
118
-                        充值
119
-                    </span>
104
+                    <span style={{ color: '#FF925C', cursor: 'pointer', marginRight: '16px', display: 'inline-block' }}><Recharge orgId={row.orgId} accountId={row.accountId} /></span>
120
                     <span style={{ color: '#FF925C', cursor: 'pointer' }} >
105
                     <span style={{ color: '#FF925C', cursor: 'pointer' }} >
121
                         退款
106
                         退款
122
                     </span>
107
                     </span>
130
         getList({ pageNum: 1, pageSize: 10 })
115
         getList({ pageNum: 1, pageSize: 10 })
131
     }
116
     }
132
 
117
 
133
-    const toDeatil = () => {
118
+    const toDeatil = (row) => {
134
         router.push({
119
         router.push({
135
             pathname: '/fundManagement/AccountDetail',
120
             pathname: '/fundManagement/AccountDetail',
121
+            query: {
122
+                id: row.orgId
123
+            },
136
         });
124
         });
137
     }
125
     }
138
 
126
 
142
         <>
130
         <>
143
             <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{ marginBottom: '16px' }}>
131
             <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{ marginBottom: '16px' }}>
144
                 <Form.Item>
132
                 <Form.Item>
145
-                    {getFieldDecorator('orgName')(
133
+                    {getFieldDecorator('miniAppName')(
146
                         <Input
134
                         <Input
147
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
135
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
148
                             placeholder="输入小程序名"
136
                             placeholder="输入小程序名"
159
                     </Button>
147
                     </Button>
160
                 </Form.Item>
148
                 </Form.Item>
161
             </Form>
149
             </Form>
162
-            <Table rowKey="newsType" dataSource={data.records} columns={columns} pagination={false} />
150
+            <Table rowKey={r => r.accountId} dataSource={data.records} columns={columns} pagination={false} />
163
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
151
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
164
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
152
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
165
             </div>
153
             </div>

+ 70
- 46
src/pages/fundManagement/ConsumeOrder.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
2
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
3
-import { Form, Pagination, Card, Button, Icon, Tooltip, message, notification, Modal, Table, Select, Input, DatePicker } from 'antd';
3
+import { Form, Pagination, Button, Icon, message, Modal, Table, Select, Input, DatePicker } from 'antd';
4
 import router from 'umi/router';
4
 import router from 'umi/router';
5
 import moment from 'moment';
5
 import moment from 'moment';
6
 import className from 'classnames';
6
 import className from 'classnames';
15
 function header(props) {
15
 function header(props) {
16
     // 获取初始化数据
16
     // 获取初始化数据
17
     const [data, setData] = useState({})
17
     const [data, setData] = useState({})
18
+    const [visible, setVisible] = useState(false)
18
     const [demandIdList, setDemandIdList] = useState([])
19
     const [demandIdList, setDemandIdList] = useState([])
19
-
20
+    const [personInfo, setPersonInfo] = useState({})
21
+    const orgId = props.orgId || ''
20
     useEffect(() => {
22
     useEffect(() => {
21
-        getList({ pageNum: 1, pageSize: 10 });
23
+        getList({ pageNum: 1, pageSize: 10, orderType: 'redPacket' });
22
     }, [])
24
     }, [])
23
 
25
 
24
     // 查询列表
26
     // 查询列表
25
     const getList = (params) => {
27
     const getList = (params) => {
26
-        request({ ...apis.sample.list, params: { ...params } }).then((data) => {
28
+        request({ ...apis.fund.taOrgOrder, params: { ...params, orgId } }).then((data) => {
27
             console.log(data)
29
             console.log(data)
28
             setData(data)
30
             setData(data)
29
         })
31
         })
35
         e.preventDefault();
37
         e.preventDefault();
36
         props.form.validateFields((err, values) => {
38
         props.form.validateFields((err, values) => {
37
             if (!err) {
39
             if (!err) {
38
-                let { createDate, ...submitValue } = values
39
-                if (null != createDate && createDate.length > 0) {
40
-                    const [startCreateDate, endCreateDate] = createDate
41
-                    submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
42
-                    submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
40
+                let { LocalDate, ...submitValue } = values
41
+                if (null != LocalDate && LocalDate.length > 0) {
42
+                    const [startDate, endDate] = LocalDate
43
+                    submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
44
+                    submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
43
                 } else {
45
                 } else {
44
-                    submitValue.startCreateDate = null
45
-                    submitValue.endCreateDate = null
46
+                    submitValue.startDate = null
47
+                    submitValue.endDate = null
46
                 }
48
                 }
47
-                getList({ pageNum: 1, pageSize: 10, ...submitValue })
49
+                getList({ pageNum: 1, pageSize: 10, orderType: 'redPacket', ...submitValue })
48
             }
50
             }
49
         });
51
         });
50
     }
52
     }
51
 
53
 
52
     const changePageNum = (pageNumber) => {
54
     const changePageNum = (pageNumber) => {
53
-        let { createDate, ...submitValue } = props.form.getFieldsValue()
54
-        if (null != createDate && createDate.length > 0) {
55
-            const [startCreateDate, endCreateDate] = createDate
56
-            submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
57
-            submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
55
+        let { LocalDate, ...submitValue } = props.form.getFieldsValue()
56
+        if (null != LocalDate && LocalDate.length > 0) {
57
+            const [startDate, endDate] = LocalDate
58
+            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
59
+            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
58
         } else {
60
         } else {
59
-            submitValue.startCreateDate = null
60
-            submitValue.endCreateDate = null
61
+            submitValue.startDate = null
62
+            submitValue.endDate = null
61
         }
63
         }
62
-        getList({ pageNum: pageNumber, pageSize: 10, ...submitValue })
64
+        getList({ pageNum: pageNumber, pageSize: 10, orderType: 'redPacket', ...submitValue })
63
     }
65
     }
64
 
66
 
65
     /**
67
     /**
66
-     *
67
      *
68
      *
68
      * @param {*} props
69
      * @param {*} props
69
      * @returns
70
      * @returns
71
     const columns = [
72
     const columns = [
72
         {
73
         {
73
             title: '订单编号',
74
             title: '订单编号',
74
-            dataIndex: 'sampleName',
75
-            key: 'sampleName',
75
+            dataIndex: 'tradeNo',
76
+            key: 'tradeNo',
76
             align: 'center',
77
             align: 'center',
77
         },
78
         },
78
         {
79
         {
79
             title: '消费组织',
80
             title: '消费组织',
80
-            dataIndex: 'orgName',
81
-            key: 'orgName',
81
+            dataIndex: 'miniAppName',
82
+            key: 'miniAppName',
82
             align: 'center',
83
             align: 'center',
83
         },
84
         },
84
         {
85
         {
85
             title: '消费金额',
86
             title: '消费金额',
86
-            dataIndex: 'orderer',
87
-            key: 'orderer',
87
+            dataIndex: 'amount',
88
+            key: 'amount',
88
             align: 'center',
89
             align: 'center',
89
 
90
 
90
         },
91
         },
91
         {
92
         {
92
             title: '消费方式',
93
             title: '消费方式',
93
-            dataIndex: 'phone',
94
-            key: 'phone',
94
+            dataIndex: 'consumeType',
95
+            key: 'consumeType',
95
             align: 'center',
96
             align: 'center',
96
         },
97
         },
97
         {
98
         {
98
             title: '活动名称',
99
             title: '活动名称',
99
-            dataIndex: 'phone',
100
-            key: 'phone',
100
+            dataIndex: 'activityName',
101
+            key: 'activityName',
101
             align: 'center',
102
             align: 'center',
102
         },
103
         },
103
         {
104
         {
112
             dataIndex: 'phone',
113
             dataIndex: 'phone',
113
             key: 'phone',
114
             key: 'phone',
114
             align: 'center',
115
             align: 'center',
116
+            render: (x, row) => <><span className={styles.blue} onClick={() => Info(row)}>{row.phone || '13160056114'}</span></>
115
         },
117
         },
116
         {
118
         {
117
             title: '消费状态',
119
             title: '消费状态',
118
-            dataIndex: 'orderer',
119
-            key: 'orderer',
120
+            dataIndex: 'tradingStatus',
121
+            key: 'tradingStatus',
120
             align: 'center',
122
             align: 'center',
123
+            render: (x, row) => <><span>{row.tradingStatus == '1' ? '成功' : '失败'}</span></>
121
         },
124
         },
122
 
125
 
123
     ];
126
     ];
127
+    const Info = (row) => {
128
+        request({ ...apis.fund.receiveInfo, params: { phone: row.phone, orgId: row.orgId } }).then((data) => {
129
+            setPersonInfo(data)
130
+            setVisible(true)
131
+        })
132
+    }
133
+
124
     function handleReset() {
134
     function handleReset() {
125
         props.form.resetFields();
135
         props.form.resetFields();
126
-        getList({ pageNum: 1, pageSize: 10 })
136
+        getList({ pageNum: 1, pageSize: 10, orderType: 'redPacket' })
127
     }
137
     }
128
 
138
 
129
     const { getFieldDecorator } = props.form
139
     const { getFieldDecorator } = props.form
130
     return (
140
     return (
131
 
141
 
132
         <>
142
         <>
143
+            <Modal
144
+                visible={visible}
145
+                title="接收人消息"
146
+                onCancel={() => setVisible(false)}
147
+                footer={null}
148
+            >
149
+                <div style={{ paddingLeft:'36%'}}>
150
+                    <p>昵称:{personInfo.nickname || ''}</p>
151
+                    <p>头像:<img src={personInfo.avatarurl || ''} className={styles.touxiang} /></p>
152
+                    <p>姓名:{personInfo.name || ''}</p>
153
+                    <p>手机号:{personInfo.phone || ''}</p>
154
+                </div>
155
+
156
+            </Modal>
133
             <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{ marginBottom: '16px' }}>
157
             <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{ marginBottom: '16px' }}>
134
                 <Form.Item>
158
                 <Form.Item>
135
-                    {getFieldDecorator('sampleName')(
159
+                    {getFieldDecorator('tradeNo')(
136
                         <Input
160
                         <Input
137
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
161
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
138
                             placeholder="订单编号"
162
                             placeholder="订单编号"
140
                     )}
164
                     )}
141
                 </Form.Item>
165
                 </Form.Item>
142
                 <Form.Item>
166
                 <Form.Item>
143
-                    {getFieldDecorator('orgName')(
167
+                    {getFieldDecorator('miniAppName')(
144
                         <Input
168
                         <Input
145
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
169
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
146
                             placeholder="消费组织"
170
                             placeholder="消费组织"
149
                 </Form.Item>
173
                 </Form.Item>
150
                 <Form.Item>
174
                 <Form.Item>
151
                     <span style={{ marginRight: '10px' }}>消费时间段:</span>
175
                     <span style={{ marginRight: '10px' }}>消费时间段:</span>
152
-                    {getFieldDecorator('createDate')(
176
+                    {getFieldDecorator('LocalDate')(
153
                         <RangePicker placeholder={['开始时间', '结束时间']} />
177
                         <RangePicker placeholder={['开始时间', '结束时间']} />
154
                     )}
178
                     )}
155
                 </Form.Item>
179
                 </Form.Item>
156
                 <Form.Item>
180
                 <Form.Item>
157
-                    {getFieldDecorator('payType')(
181
+                    {getFieldDecorator('itemType')(
158
                         <Select style={{ width: '180px' }} placeholder="消费方式">
182
                         <Select style={{ width: '180px' }} placeholder="消费方式">
159
-                            <Select.Option value="1">全部</Select.Option>
160
-                            <Select.Option value="2">红包</Select.Option>
183
+                            <Select.Option value="">全部</Select.Option>
184
+                            <Select.Option value="redPacket">红包</Select.Option>
161
                         </Select>,
185
                         </Select>,
162
                     )}
186
                     )}
163
                 </Form.Item>
187
                 </Form.Item>
164
                 <Form.Item>
188
                 <Form.Item>
165
-                    {getFieldDecorator('payStatus')(
189
+                    {getFieldDecorator('tradingStatus')(
166
                         <Select style={{ width: '180px' }} placeholder="消费状态">
190
                         <Select style={{ width: '180px' }} placeholder="消费状态">
167
-                            <Select.Option value="1">全部</Select.Option>
168
-                            <Select.Option value="2">成功</Select.Option>
169
-                            <Select.Option value="3">失败</Select.Option>
191
+                            <Select.Option value="">全部</Select.Option>
192
+                            <Select.Option value="1">成功</Select.Option>
193
+                            <Select.Option value="2">失败</Select.Option>
170
                         </Select>,
194
                         </Select>,
171
                     )}
195
                     )}
172
                 </Form.Item>
196
                 </Form.Item>
173
                 <Form.Item>
197
                 <Form.Item>
174
-                    {getFieldDecorator('phone')(
198
+                    {getFieldDecorator('receivePhone')(
175
                         <Input
199
                         <Input
176
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
200
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
177
                             placeholder="接收人手机号"
201
                             placeholder="接收人手机号"
187
           </Button>
211
           </Button>
188
                 </Form.Item>
212
                 </Form.Item>
189
             </Form>
213
             </Form>
190
-            <Table rowKey="newsType" dataSource={data.records} columns={columns} pagination={false} />
214
+            <Table rowKey={r => r.tradeNo} dataSource={data.records} columns={columns} pagination={false} />
191
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
215
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
192
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
216
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
193
             </div>
217
             </div>

+ 31
- 54
src/pages/fundManagement/Finance.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
2
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
3
-import { Form, Pagination, Card, Button, Icon, Tooltip, message, notification, Modal, Table, Select, Input, DatePicker } from 'antd';
3
+import { Form, Pagination, Button, Icon, message, Modal, Table, Input } from 'antd';
4
 import router from 'umi/router';
4
 import router from 'umi/router';
5
 import moment from 'moment';
5
 import moment from 'moment';
6
 import className from 'classnames';
6
 import className from 'classnames';
11
 import AuthButton from '@/components/AuthButton';
11
 import AuthButton from '@/components/AuthButton';
12
 import SelectContact from './components/SelectContact';
12
 import SelectContact from './components/SelectContact';
13
 
13
 
14
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15
 
14
 
16
 function header(props) {
15
 function header(props) {
17
     // 获取初始化数据
16
     // 获取初始化数据
18
     const [data, setData] = useState({})
17
     const [data, setData] = useState({})
19
     const [contactList, setContactList] = useState([])
18
     const [contactList, setContactList] = useState([])
20
-    const [contactVisible, setContactVisible] = useState(false)
21
 
19
 
22
     useEffect(() => {
20
     useEffect(() => {
23
         getList({ pageNum: 1, pageSize: 10 });
21
         getList({ pageNum: 1, pageSize: 10 });
25
 
23
 
26
     // 查询列表
24
     // 查询列表
27
     const getList = (params) => {
25
     const getList = (params) => {
28
-        request({ ...apis.sample.list, params: { ...params } }).then((data) => {
26
+        request({ ...apis.fund.contactList, params: { ...params } }).then((data) => {
29
             console.log(data)
27
             console.log(data)
30
             setData(data)
28
             setData(data)
31
         })
29
         })
37
         e.preventDefault();
35
         e.preventDefault();
38
         props.form.validateFields((err, values) => {
36
         props.form.validateFields((err, values) => {
39
             if (!err) {
37
             if (!err) {
40
-                let { createDate, ...submitValue } = values
41
-                if (null != createDate && createDate.length > 0) {
42
-                    const [startCreateDate, endCreateDate] = createDate
43
-                    submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
44
-                    submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
45
-                } else {
46
-                    submitValue.startCreateDate = null
47
-                    submitValue.endCreateDate = null
48
-                }
38
+                let { ...submitValue } = values
39
+
49
                 getList({ pageNum: 1, pageSize: 10, ...submitValue })
40
                 getList({ pageNum: 1, pageSize: 10, ...submitValue })
50
             }
41
             }
51
         });
42
         });
52
     }
43
     }
53
 
44
 
54
     const changePageNum = (pageNumber) => {
45
     const changePageNum = (pageNumber) => {
55
-        let { createDate, ...submitValue } = props.form.getFieldsValue()
56
-        if (null != createDate && createDate.length > 0) {
57
-            const [startCreateDate, endCreateDate] = createDate
58
-            submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
59
-            submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
60
-        } else {
61
-            submitValue.startCreateDate = null
62
-            submitValue.endCreateDate = null
63
-        }
46
+        let { ...submitValue } = props.form.getFieldsValue()
47
+
64
         getList({ pageNum: pageNumber, pageSize: 10, ...submitValue })
48
         getList({ pageNum: pageNumber, pageSize: 10, ...submitValue })
65
     }
49
     }
66
 
50
 
73
     const columns = [
57
     const columns = [
74
         {
58
         {
75
             title: '姓名',
59
             title: '姓名',
76
-            dataIndex: 'sampleName',
77
-            key: 'sampleName',
60
+            dataIndex: 'contactName',
61
+            key: 'contactName',
78
             align: 'center',
62
             align: 'center',
79
         },
63
         },
80
         {
64
         {
81
             title: '性别',
65
             title: '性别',
82
-            dataIndex: 'orgName',
83
-            key: 'orgName',
66
+            dataIndex: 'sex',
67
+            key: 'sex',
84
             align: 'center',
68
             align: 'center',
69
+            render: (text, record) => <span>{record.sex == '1' ? '男' : record.sex == '2' ? '女' : '未知'}</span>
70
+
85
         },
71
         },
86
         {
72
         {
87
             title: '头像',
73
             title: '头像',
92
         },
78
         },
93
         {
79
         {
94
             title: '固话',
80
             title: '固话',
95
-            dataIndex: 'orderer',
96
-            key: 'orderer4',
81
+            dataIndex: 'telephone',
82
+            key: 'telephone',
97
             align: 'center',
83
             align: 'center',
98
         },
84
         },
99
         {
85
         {
100
             title: '手机号',
86
             title: '手机号',
101
-            dataIndex: 'orderer',
102
-            key: 'orderer3',
87
+            dataIndex: 'phone',
88
+            key: 'phone',
103
             align: 'center',
89
             align: 'center',
104
         },
90
         },
105
         {
91
         {
106
             title: '对外头衔',
92
             title: '对外头衔',
107
-            dataIndex: 'orderer',
108
-            key: 'orderer2',
93
+            dataIndex: 'appellation',
94
+            key: 'appellation',
109
             align: 'center',
95
             align: 'center',
110
         },
96
         },
111
         {
97
         {
112
             title: '权重',
98
             title: '权重',
113
-            dataIndex: 'orderer',
114
-            key: 'orderer1',
99
+            dataIndex: 'orderNo',
100
+            key: 'orderNo',
115
             align: 'center',
101
             align: 'center',
116
         },
102
         },
117
 
103
 
121
         getList({ pageNum: 1, pageSize: 10 })
107
         getList({ pageNum: 1, pageSize: 10 })
122
     }
108
     }
123
 
109
 
124
-    const toDeatil = () => {
125
-        router.push({
126
-            pathname: '/fundManagement/AccountDetail',
127
-        });
128
-    }
129
 
110
 
130
     const rowSelection = {
111
     const rowSelection = {
131
         onChange: (selectedRowKeys, selectedRows) => {
112
         onChange: (selectedRowKeys, selectedRows) => {
133
             setContactList(selectedRows)
114
             setContactList(selectedRows)
134
         },
115
         },
135
     };
116
     };
136
-    const toAdd = (id) => () => {
137
-        console.log('hhhhhhhhhhhhhhh')
138
-        setContactVisible(true)
139
-    }
140
-    const toDel = rowData => () => {
117
+
118
+    const toDel = () => {
141
         if (contactList.length < 1) {
119
         if (contactList.length < 1) {
142
             message.info('请至少选择一条数据')
120
             message.info('请至少选择一条数据')
143
             return
121
             return
144
         }
122
         }
145
-
146
         Modal.confirm({
123
         Modal.confirm({
147
-            title: '确定删除联系人信息吗',
124
+            title: `确认将所选的${contactList.length}条数据删除`,
148
             okText: '确定',
125
             okText: '确定',
149
             cancelText: '取消',
126
             cancelText: '取消',
150
             onOk() {
127
             onOk() {
151
-                request({ ...apis.contact.batchDeleteContact, data: contactList, }).then((data) => {
128
+                request({ ...apis.fund.delContact, data: contactList, }).then((data) => {
152
                     message.info("操作成功")
129
                     message.info("操作成功")
153
                     getList({ pageNum: 1, pageSize: 10 });
130
                     getList({ pageNum: 1, pageSize: 10 });
131
+                    setContactList([])
154
                 }).catch((err) => {
132
                 }).catch((err) => {
155
 
133
 
156
                 })
134
                 })
162
     return (
140
     return (
163
 
141
 
164
         <>
142
         <>
165
-            {/* {contactVisible && <SelectContact />} */}
166
             <Form layout="inline" onSubmit={e => handleSubmit(e, props)} >
143
             <Form layout="inline" onSubmit={e => handleSubmit(e, props)} >
167
                 <Form.Item>
144
                 <Form.Item>
168
-                    {getFieldDecorator('name')(
145
+                    {getFieldDecorator('contactName')(
169
                         <Input
146
                         <Input
170
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
147
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
171
                             placeholder="姓名"
148
                             placeholder="姓名"
173
                     )}
150
                     )}
174
                 </Form.Item>
151
                 </Form.Item>
175
                 <Form.Item>
152
                 <Form.Item>
176
-                    {getFieldDecorator('Telephone')(
153
+                    {getFieldDecorator('telephone')(
177
                         <Input
154
                         <Input
178
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
155
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
179
                             placeholder="固话"
156
                             placeholder="固话"
189
                     )}
166
                     )}
190
                 </Form.Item>
167
                 </Form.Item>
191
                 <Form.Item>
168
                 <Form.Item>
192
-                    {getFieldDecorator('title')(
169
+                    {getFieldDecorator('appellation')(
193
                         <Input
170
                         <Input
194
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
171
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
195
                             placeholder="对外头衔"
172
                             placeholder="对外头衔"
206
                 </Form.Item>
183
                 </Form.Item>
207
             </Form>
184
             </Form>
208
             <div style={{ margin: '10px 0 16px 0' }}>
185
             <div style={{ margin: '10px 0 16px 0' }}>
209
-                <Button type="danger" className={styles.addBtn} onClick={toAdd()}><SelectContact /></Button>
210
-                <Button type="primary" className={styles.addBtn} onClick={toDel()} style={{ marginLeft: '30px' }} >删除</Button>
186
+                <Button type="danger" className={styles.addBtn} ><SelectContact onClick={() => getList({ pageNum: 1, pageSize: 10 })} /></Button>
187
+                <Button type="primary" className={styles.addBtn} onClick={() => toDel()} style={{ marginLeft: '30px' }} >删除</Button>
211
             </div>
188
             </div>
212
-            <Table rowSelection={rowSelection} rowKey="newsType" dataSource={data.records} columns={columns} pagination={false} />
189
+            <Table rowSelection={rowSelection} rowKey={r => r.contactId} dataSource={data.records} columns={columns} pagination={false} />
213
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
190
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
214
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
191
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
215
             </div>
192
             </div>

+ 50
- 48
src/pages/fundManagement/RechargeOrder.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
2
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
3
-import { Form, Pagination, Button, Icon, message,  Modal, Table, Select, Input, DatePicker } from 'antd';
3
+import { Form, Pagination, Button, Icon, message, Modal, Table, Select, Input, DatePicker } from 'antd';
4
 import router from 'umi/router';
4
 import router from 'umi/router';
5
 import moment from 'moment';
5
 import moment from 'moment';
6
 import className from 'classnames';
6
 import className from 'classnames';
16
     // 获取初始化数据
16
     // 获取初始化数据
17
     const [data, setData] = useState({})
17
     const [data, setData] = useState({})
18
     const [demandIdList, setDemandIdList] = useState([])
18
     const [demandIdList, setDemandIdList] = useState([])
19
-
19
+    const orgId = props.orgId || ''
20
     useEffect(() => {
20
     useEffect(() => {
21
-        getList({ pageNum: 1, pageSize: 10 });
21
+        getList({ pageNum: 1, pageSize: 10, orderType: 'recharge' });
22
     }, [])
22
     }, [])
23
 
23
 
24
     // 查询列表
24
     // 查询列表
25
     const getList = (params) => {
25
     const getList = (params) => {
26
-        request({ ...apis.sample.list, params: { ...params } }).then((data) => {
26
+        request({ ...apis.fund.taOrgOrder, params: { ...params, orgId } }).then((data) => {
27
             console.log(data)
27
             console.log(data)
28
             setData(data)
28
             setData(data)
29
         })
29
         })
35
         e.preventDefault();
35
         e.preventDefault();
36
         props.form.validateFields((err, values) => {
36
         props.form.validateFields((err, values) => {
37
             if (!err) {
37
             if (!err) {
38
-                let { createDate, ...submitValue } = values
39
-                if (null != createDate && createDate.length > 0) {
40
-                    const [startCreateDate, endCreateDate] = createDate
41
-                    submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
42
-                    submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
38
+                let { LocalDate, ...submitValue } = values
39
+                if (null != LocalDate && LocalDate.length > 0) {
40
+                    const [startDate, endDate] = LocalDate
41
+                    submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
42
+                    submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
43
                 } else {
43
                 } else {
44
-                    submitValue.startCreateDate = null
45
-                    submitValue.endCreateDate = null
44
+                    submitValue.startDate = null
45
+                    submitValue.endDate = null
46
                 }
46
                 }
47
-                getList({ pageNum: 1, pageSize: 10, ...submitValue })
47
+                getList({ pageNum: 1, pageSize: 10, orderType: 'recharge', ...submitValue })
48
             }
48
             }
49
         });
49
         });
50
     }
50
     }
51
 
51
 
52
     const changePageNum = (pageNumber) => {
52
     const changePageNum = (pageNumber) => {
53
-        let { createDate, ...submitValue } = props.form.getFieldsValue()
54
-        if (null != createDate && createDate.length > 0) {
55
-            const [startCreateDate, endCreateDate] = createDate
56
-            submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
57
-            submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
53
+        let { LocalDate, ...submitValue } = props.form.getFieldsValue()
54
+        if (null != LocalDate && LocalDate.length > 0) {
55
+            const [startDate, endDate] = LocalDate
56
+            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
57
+            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
58
         } else {
58
         } else {
59
-            submitValue.startCreateDate = null
60
-            submitValue.endCreateDate = null
59
+            submitValue.startDate = null
60
+            submitValue.endDate = null
61
         }
61
         }
62
-        getList({ pageNum: pageNumber, pageSize: 10, ...submitValue })
62
+        getList({ pageNum: pageNumber, pageSize: 10, orderType: 'recharge', ...submitValue })
63
     }
63
     }
64
 
64
 
65
     /**
65
     /**
71
     const columns = [
71
     const columns = [
72
         {
72
         {
73
             title: '订单编号',
73
             title: '订单编号',
74
-            dataIndex: 'sampleName',
75
-            key: 'sampleName',
74
+            dataIndex: 'tradeNo',
75
+            key: 'tradeNo',
76
             align: 'center',
76
             align: 'center',
77
         },
77
         },
78
         {
78
         {
79
             title: '充值组织',
79
             title: '充值组织',
80
-            dataIndex: 'orgName',
81
-            key: 'orgName',
80
+            dataIndex: 'miniAppName',
81
+            key: 'miniAppName',
82
             align: 'center',
82
             align: 'center',
83
         },
83
         },
84
         {
84
         {
85
             title: '充值金额',
85
             title: '充值金额',
86
-            dataIndex: 'orderer',
87
-            key: 'orderer',
86
+            dataIndex: 'amount',
87
+            key: 'amount',
88
             align: 'center',
88
             align: 'center',
89
 
89
 
90
         },
90
         },
91
         {
91
         {
92
             title: '充值方式',
92
             title: '充值方式',
93
-            dataIndex: 'phone',
94
-            key: 'phone',
93
+            dataIndex: 'isOffline',
94
+            key: 'isOffline',
95
             align: 'center',
95
             align: 'center',
96
+            render: (x, row) => <><span>{row.isOffline ? '运营手动充值' : '业务线上充值'}</span></>
96
         },
97
         },
97
         {
98
         {
98
             title: '下单时间',
99
             title: '下单时间',
109
         },
110
         },
110
         {
111
         {
111
             title: '充值状态',
112
             title: '充值状态',
112
-            dataIndex: 'orderer',
113
-            key: 'orderer',
113
+            dataIndex: 'tradingStatus',
114
+            key: 'tradingStatus',
114
             align: 'center',
115
             align: 'center',
116
+            render: (x, row) => <><span>{row.tradingStatus == '0' ? '待支付' : row.tradingStatus == '1' ? '已支付' : '已超时'}</span></>
115
         },
117
         },
116
         {
118
         {
117
             title: '支付时间',
119
             title: '支付时间',
118
-            dataIndex: 'createDate',
119
-            key: 'createDate',
120
+            dataIndex: 'payDate',
121
+            key: 'payDate',
120
             align: 'center',
122
             align: 'center',
121
-            render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
123
+            render: (x, row) => <><span>{row.payDate ? `${moment(row.payDate).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>,
122
         },
124
         },
123
 
125
 
124
     ];
126
     ];
125
     function handleReset() {
127
     function handleReset() {
126
         props.form.resetFields();
128
         props.form.resetFields();
127
-        getList({ pageNum: 1, pageSize: 10 })
129
+        getList({ pageNum: 1, pageSize: 10, orderType: 'recharge' })
128
     }
130
     }
129
 
131
 
130
     const { getFieldDecorator } = props.form
132
     const { getFieldDecorator } = props.form
131
     return (
133
     return (
132
 
134
 
133
         <>
135
         <>
134
-            <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{marginBottom:'16px'}}>
136
+            <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{ marginBottom: '16px' }}>
135
                 <Form.Item>
137
                 <Form.Item>
136
-                    {getFieldDecorator('sampleName')(
138
+                    {getFieldDecorator('tradeNo')(
137
                         <Input
139
                         <Input
138
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
140
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
139
                             placeholder="订单编号"
141
                             placeholder="订单编号"
141
                     )}
143
                     )}
142
                 </Form.Item>
144
                 </Form.Item>
143
                 <Form.Item>
145
                 <Form.Item>
144
-                    {getFieldDecorator('orgName')(
146
+                    {getFieldDecorator('miniAppName')(
145
                         <Input
147
                         <Input
146
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
148
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
147
                             placeholder="充值组织"
149
                             placeholder="充值组织"
150
                 </Form.Item>
152
                 </Form.Item>
151
                 <Form.Item>
153
                 <Form.Item>
152
                     <span style={{ marginRight: '10px' }}>支付时间段:</span>
154
                     <span style={{ marginRight: '10px' }}>支付时间段:</span>
153
-                    {getFieldDecorator('createDate')(
155
+                    {getFieldDecorator('LocalDate')(
154
                         <RangePicker placeholder={['开始时间', '结束时间']} />
156
                         <RangePicker placeholder={['开始时间', '结束时间']} />
155
                     )}
157
                     )}
156
                 </Form.Item>
158
                 </Form.Item>
157
                 <Form.Item>
159
                 <Form.Item>
158
-                    {getFieldDecorator('payType')(
160
+                    {getFieldDecorator('isOffline')(
159
                         <Select style={{ width: '180px' }} placeholder="充值方式">
161
                         <Select style={{ width: '180px' }} placeholder="充值方式">
160
-                            <Select.Option value="1">全部</Select.Option>
161
-                            <Select.Option value="2">业务线上充值</Select.Option>
162
-                            <Select.Option value="3">运营手动充值</Select.Option>
162
+                            <Select.Option value="">全部</Select.Option>
163
+                            <Select.Option value="0">业务线上充值</Select.Option>
164
+                            <Select.Option value="1">运营手动充值</Select.Option>
163
                         </Select>,
165
                         </Select>,
164
                     )}
166
                     )}
165
                 </Form.Item>
167
                 </Form.Item>
166
                 <Form.Item>
168
                 <Form.Item>
167
-                    {getFieldDecorator('payStatus')(
169
+                    {getFieldDecorator('tradingStatus')(
168
                         <Select style={{ width: '180px' }} placeholder="充值状态">
170
                         <Select style={{ width: '180px' }} placeholder="充值状态">
169
-                            <Select.Option value="1">全部</Select.Option>
170
-                            <Select.Option value="2">待支付</Select.Option>
171
-                            <Select.Option value="3">已交付</Select.Option>
172
-                            <Select.Option value="4">已超时</Select.Option>
171
+                            <Select.Option value="">全部</Select.Option>
172
+                            <Select.Option value="0">待支付</Select.Option>
173
+                            <Select.Option value="1">已支付</Select.Option>
174
+                            <Select.Option value="2">已超时</Select.Option>
173
                         </Select>,
175
                         </Select>,
174
                     )}
176
                     )}
175
                 </Form.Item>
177
                 </Form.Item>
182
           </Button>
184
           </Button>
183
                 </Form.Item>
185
                 </Form.Item>
184
             </Form>
186
             </Form>
185
-            <Table rowKey="newsType" dataSource={data.records} columns={columns} pagination={false} />
187
+            <Table rowKey={r => r.tradeNo} dataSource={data.records} columns={columns} pagination={false} />
186
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
188
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
187
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
189
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
188
             </div>
190
             </div>

+ 153
- 45
src/pages/fundManagement/RefundOrder.jsx 查看文件

9
 import { fetch, apis } from '../../utils/request';
9
 import { fetch, apis } from '../../utils/request';
10
 import request from '../../utils/request';
10
 import request from '../../utils/request';
11
 import AuthButton from '@/components/AuthButton';
11
 import AuthButton from '@/components/AuthButton';
12
+import Swiper from './components/Swiper';
12
 
13
 
13
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
14
 
15
 
15
 function header(props) {
16
 function header(props) {
16
     // 获取初始化数据
17
     // 获取初始化数据
17
     const [data, setData] = useState({})
18
     const [data, setData] = useState({})
19
+    const [row, setRow] = useState({})
18
     const [demandIdList, setDemandIdList] = useState([])
20
     const [demandIdList, setDemandIdList] = useState([])
19
     const [visible, setVisible] = useState(false)
21
     const [visible, setVisible] = useState(false)
22
+    const [refundVisible, setRefundVisible] = useState(false)
23
+    const [inputValue, setValue] = useState('')
24
+    const [swiperList, setSwiperList] = useState([])
25
+
26
+    const orgId = props.orgId || ''
20
 
27
 
21
     useEffect(() => {
28
     useEffect(() => {
22
-        getList({ pageNum: 1, pageSize: 10 });
29
+        getList({ pageNum: 1, pageSize: 10, orderType: 'refund' });
23
     }, [])
30
     }, [])
24
 
31
 
25
     // 查询列表
32
     // 查询列表
26
     const getList = (params) => {
33
     const getList = (params) => {
27
-        request({ ...apis.sample.list, params: { ...params } }).then((data) => {
34
+        request({ ...apis.fund.taOrgOrder, params: { ...params, orgId, } }).then((data) => {
28
             console.log(data)
35
             console.log(data)
29
             setData(data)
36
             setData(data)
30
         })
37
         })
36
         e.preventDefault();
43
         e.preventDefault();
37
         props.form.validateFields((err, values) => {
44
         props.form.validateFields((err, values) => {
38
             if (!err) {
45
             if (!err) {
39
-                let { createDate, ...submitValue } = values
40
-                if (null != createDate && createDate.length > 0) {
41
-                    const [startCreateDate, endCreateDate] = createDate
42
-                    submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
43
-                    submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
46
+                let { LocalDate, ...submitValue } = values
47
+                if (null != LocalDate && LocalDate.length > 0) {
48
+                    const [startDate, endDate] = LocalDate
49
+                    submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
50
+                    submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
44
                 } else {
51
                 } else {
45
-                    submitValue.startCreateDate = null
46
-                    submitValue.endCreateDate = null
52
+                    submitValue.startDate = null
53
+                    submitValue.endDate = null
47
                 }
54
                 }
48
-                getList({ pageNum: 1, pageSize: 10, ...submitValue })
55
+                getList({ pageNum: 1, pageSize: 10, orderType: 'refund', ...submitValue })
49
             }
56
             }
50
         });
57
         });
51
     }
58
     }
52
 
59
 
53
     const changePageNum = (pageNumber) => {
60
     const changePageNum = (pageNumber) => {
54
-        let { createDate, ...submitValue } = props.form.getFieldsValue()
55
-        if (null != createDate && createDate.length > 0) {
56
-            const [startCreateDate, endCreateDate] = createDate
57
-            submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
58
-            submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
61
+        let { LocalDate, ...submitValue } = props.form.getFieldsValue()
62
+        if (null != LocalDate && LocalDate.length > 0) {
63
+            const [startDate, endDate] = LocalDate
64
+            submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
65
+            submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
59
         } else {
66
         } else {
60
-            submitValue.startCreateDate = null
61
-            submitValue.endCreateDate = null
67
+            submitValue.startDate = null
68
+            submitValue.endDate = null
62
         }
69
         }
63
-        getList({ pageNum: pageNumber, pageSize: 10, ...submitValue })
70
+        getList({ pageNum: pageNumber, pageSize: 10, orderType: 'refund', ...submitValue })
71
+    }
72
+    const look = (list) => {
73
+        // setSwiperList([
74
+        //     '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',
75
+        //     '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',
76
+        //     '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'
77
+        // ])
78
+        setSwiperList(list)
64
     }
79
     }
65
-
66
     /**
80
     /**
67
      *
81
      *
68
      *
82
      *
72
     const columns = [
86
     const columns = [
73
         {
87
         {
74
             title: '订单编号',
88
             title: '订单编号',
75
-            dataIndex: 'sampleName',
76
-            key: 'sampleName',
89
+            dataIndex: 'tradeNo',
90
+            key: 'tradeNo',
77
             align: 'center',
91
             align: 'center',
78
         },
92
         },
79
         {
93
         {
80
             title: '退款组织',
94
             title: '退款组织',
81
-            dataIndex: 'orgName',
82
-            key: 'orgName',
95
+            dataIndex: 'miniAppName',
96
+            key: 'miniAppName',
83
             align: 'center',
97
             align: 'center',
84
         },
98
         },
85
         {
99
         {
86
             title: '退款金额',
100
             title: '退款金额',
87
-            dataIndex: 'orderer',
88
-            key: 'orderer',
101
+            dataIndex: 'amount',
102
+            key: 'amount',
89
             align: 'center',
103
             align: 'center',
90
         },
104
         },
91
         {
105
         {
97
         },
111
         },
98
         {
112
         {
99
             title: '退款状态',
113
             title: '退款状态',
100
-            dataIndex: 'orderer',
101
-            key: 'orderer1',
114
+            dataIndex: 'tradingStatus',
115
+            key: 'tradingStatus',
102
             align: 'center',
116
             align: 'center',
117
+            render: (x, row) => <><span>{row.tradingStatus == '0' ? '已申请' : row.tradingStatus == '1' ? '已退款' : '已驳回'}</span></>
103
         },
118
         },
104
         {
119
         {
105
             title: '驳回原因',
120
             title: '驳回原因',
106
-            dataIndex: 'orderer',
107
-            key: 'ordere2r',
121
+            dataIndex: 'auditResult',
122
+            key: 'auditResult',
108
             align: 'center',
123
             align: 'center',
124
+            render: (x, row) => <>{row.tradingStatus == '2' && <span>{row.auditResult}</span>}</>
109
         },
125
         },
110
         {
126
         {
111
             title: '退款凭证',
127
             title: '退款凭证',
112
-            dataIndex: 'orderer',
113
-            key: 'o2rderer',
128
+            dataIndex: 'certificateUrlList',
129
+            key: 'certificateUrlList',
114
             align: 'center',
130
             align: 'center',
131
+            render: (x, row) => (
132
+                <>
133
+                    {
134
+                        (x || []).length > 0 &&
135
+                        <>
136
+
137
+                            <span className={styles.blue} onClick={() => look(row.certificateUrlList)}>
138
+                                查看
139
+                         </span></>
140
+                    }
141
+                </>
142
+            ),
115
         },
143
         },
116
         {
144
         {
117
             title: '操作',
145
             title: '操作',
118
-            dataIndex: 'createDate',
119
-            key: 'crea2teDate',
146
+            dataIndex: 'handle',
147
+            key: 'handle',
120
             align: 'center',
148
             align: 'center',
121
             width: '120px',
149
             width: '120px',
122
             render: (x, row) => (
150
             render: (x, row) => (
123
                 <>
151
                 <>
124
-                    <span style={{ color: '#FF925C', cursor: 'pointer', marginRight: '16px' }} >
125
-                        退款
126
-                    </span>
127
-                    <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={() => setVisible(true)}>
128
-                        驳回
152
+                    {
153
+                        row.tradingStatus == '0' &&
154
+                        <>
155
+                            <span style={{ color: '#FF925C', cursor: 'pointer', marginRight: '16px' }} onClick={() => refund(row)}>
156
+                                退款
129
                     </span>
157
                     </span>
158
+                            <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={() => reject(row)}>
159
+                                驳回
160
+                    </span></>
161
+                    }
162
+
130
                 </>
163
                 </>
131
             ),
164
             ),
132
         },
165
         },
134
     ];
167
     ];
135
     function handleReset() {
168
     function handleReset() {
136
         props.form.resetFields();
169
         props.form.resetFields();
137
-        getList({ pageNum: 1, pageSize: 10 })
170
+        getList({ pageNum: 1, pageSize: 10, orderType: 'refund' })
138
     }
171
     }
139
     const handleOk = () => {
172
     const handleOk = () => {
173
+        if (inputValue) {
174
+            request({
175
+                ...apis.fund.reject, urlData: { id: row.orderId }, data: {
176
+                    auditResult: inputValue,
177
+                    orgId: row.orgId,
178
+                }
179
+            }).then((data) => {
180
+                console.log(data)
181
+                getList({ pageNum: 1, pageSize: 10, orderType: 'refund' });
140
 
182
 
141
-        setVisible(false)
183
+            })
184
+
185
+            setVisible(false)
186
+            setValue('')
187
+        } else {
188
+            message.warning('驳回原因不能为空');
189
+        }
142
 
190
 
143
     }
191
     }
192
+
144
     const handleCancel = () => {
193
     const handleCancel = () => {
145
         setVisible(false)
194
         setVisible(false)
195
+        setRefundVisible(false)
196
+    }
197
+    const reject = (row) => {
198
+        setVisible(true)
199
+        setRow(row)
200
+    }
201
+    const refund = (row) => {
202
+        setRefundVisible(true)
203
+        setRow(row)
204
+    }
205
+
206
+    const toDeatil = () => {
207
+        router.push({
208
+            pathname: '/fundManagement/AccountDetail',
209
+            query: {
210
+                id: row.orgId
211
+            },
212
+        });
213
+    }
214
+    const bohui = () => {
215
+        setRefundVisible(false)
216
+        setVisible(true)
217
+    }
218
+
219
+    const orderRefund = () => {
220
+        request({
221
+            ...apis.fund.refund, urlData: { id: row.orderId }, data: {
222
+                orgId: row.orgId,
223
+                amount: row.amount,
224
+            }
225
+        }).then((data) => {
226
+            console.log(data)
227
+            getList({ pageNum: 1, pageSize: 10, orderType: 'refund' });
228
+
229
+        })
230
+
231
+        setRefundVisible(false)
146
     }
232
     }
147
 
233
 
148
     const { getFieldDecorator } = props.form
234
     const { getFieldDecorator } = props.form
235
+    const list = []
149
     return (
236
     return (
150
 
237
 
151
         <>
238
         <>
160
                 ]}
247
                 ]}
161
             >
248
             >
162
                 <div style={{ display: 'flex', alignItems: 'center', margin: '30px 0' }}>驳回原因
249
                 <div style={{ display: 'flex', alignItems: 'center', margin: '30px 0' }}>驳回原因
163
-                <span style={{ color: 'red' }}>*</span><Input style={{ marginLeft: '10px', width: '80%' }} placeholder="请输入驳回原因" />
250
+                <span style={{ color: 'red' }}>*</span><Input value={inputValue} onChange={e => setValue(e.target.value)} style={{ marginLeft: '10px', width: '80%' }} placeholder="请输入驳回原因" />
251
+                </div>
252
+            </Modal>
253
+            <Modal
254
+                visible={refundVisible}
255
+                title="退款审核"
256
+                onOk={() => orderRefund()}
257
+                onCancel={() => handleCancel()}
258
+                footer={[
259
+                    <Button key="back" size="large" onClick={() => orderRefund()}>退款</Button>,
260
+                    <Button key="submit" type="primary" size="large" onClick={() => bohui()}>驳回</Button>,
261
+                ]}
262
+            ><div>
263
+                    <p>1.请核对账户余额等是否正常,且预留了足够的活动余额。异常请核对企业账单后与企业相关人员沟通并确认点击驳回申请</p>
264
+                    <p className={styles.flexRow}>
265
+                        <span>退款金额: <span className={styles.red}>{row.amount || '0'}元</span></span>
266
+                        <span>账户余额:<span className={styles.red}>{row.realBalance || '0'}元</span></span>
267
+                        <span className={styles.blue} onClick={() => toDeatil()}>查看账户详情</span>
268
+                    </p>
269
+                    <p>2.请到微信商户平台使用企业付款或充值订单退款等方式退款,或使用微信转账/银行卡转账/企业对公转账等方式退款</p>
270
+                    <p>3.退款完成后,截图保留凭证并点击确认退款</p>
164
                 </div>
271
                 </div>
165
             </Modal>
272
             </Modal>
273
+            < Swiper list={swiperList} onClose={() => setSwiperList([])} />
166
             <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{ marginBottom: '16px' }}>
274
             <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{ marginBottom: '16px' }}>
167
                 <Form.Item>
275
                 <Form.Item>
168
-                    {getFieldDecorator('sampleName')(
276
+                    {getFieldDecorator('tradeNo')(
169
                         <Input
277
                         <Input
170
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
278
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
171
                             placeholder="订单编号"
279
                             placeholder="订单编号"
173
                     )}
281
                     )}
174
                 </Form.Item>
282
                 </Form.Item>
175
                 <Form.Item>
283
                 <Form.Item>
176
-                    {getFieldDecorator('orgName')(
284
+                    {getFieldDecorator('miniAppName')(
177
                         <Input
285
                         <Input
178
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
286
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
179
                             placeholder="退款组织"
287
                             placeholder="退款组织"
182
                 </Form.Item>
290
                 </Form.Item>
183
                 <Form.Item>
291
                 <Form.Item>
184
                     <span style={{ marginRight: '10px' }}>退款时间段:</span>
292
                     <span style={{ marginRight: '10px' }}>退款时间段:</span>
185
-                    {getFieldDecorator('createDate')(
293
+                    {getFieldDecorator('LocalDate')(
186
                         <RangePicker placeholder={['开始时间', '结束时间']} />
294
                         <RangePicker placeholder={['开始时间', '结束时间']} />
187
                     )}
295
                     )}
188
                 </Form.Item>
296
                 </Form.Item>
195
                     </Button>
303
                     </Button>
196
                 </Form.Item>
304
                 </Form.Item>
197
             </Form>
305
             </Form>
198
-            <Table rowKey="newsType" dataSource={data.records} columns={columns} pagination={false} />
306
+            <Table rowKey={r => r.tradeNo} dataSource={data.records} columns={columns} pagination={false} />
199
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
307
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
200
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
308
                 <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
201
             </div>
309
             </div>

+ 99
- 0
src/pages/fundManagement/components/Recharge.jsx 查看文件

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Modal, Button, Table, message, Input, Icon, Pagination } from 'antd';
3
+import XForm, { FieldTypes } from '../../../components/XForm';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import router from 'umi/router';
7
+import Upload from '../../../components/uploadImage/Upload'
8
+
9
+const { Column, ColumnGroup } = Table;
10
+
11
+const formItemLayout = {
12
+    labelCol: {
13
+        xs: { span: 6 },
14
+        sm: { span: 6 },
15
+    },
16
+    wrapperCol: {
17
+        xs: { span: 18 },
18
+        sm: { span: 18 },
19
+    },
20
+};
21
+
22
+const SelectContact = props => {
23
+
24
+    const [data, setData] = useState([]);
25
+    const [visible, setVisible] = useState(false);
26
+    const [group, setGroup] = useState({ groupId: undefined, groupName: '充值' })
27
+
28
+    useEffect(() => {
29
+
30
+    }, [props.value])
31
+
32
+
33
+
34
+
35
+    const handleSubmit = (e) => {
36
+
37
+
38
+    }
39
+    const handleOk = (e) => {
40
+        props.form.validateFieldsAndScroll((err, values) => {
41
+            console.log(values, "valuesvaluesvaluesvaluesvaluesvaluesvalues")
42
+            if (!err) {
43
+                request({ ...apis.fund.recharge, urlData: { id: props.accountId || '' }, data: { ...values, orgId: props.orgId } }).then((data) => {
44
+                    message.info("操作成功")
45
+                    setVisible(false)
46
+                })
47
+            }
48
+        });
49
+
50
+
51
+    }
52
+
53
+    const { getFieldDecorator } = props.form;
54
+    return (
55
+        <div>
56
+            <span onClick={() => setVisible(true)}>{group.groupName}</span>
57
+
58
+            <Modal
59
+                visible={visible}
60
+                title="确认充值"
61
+                onOk={() => handleOk()}
62
+                onCancel={() => setVisible(false)}
63
+                footer={[
64
+                    <Button key="back" size="large" onClick={() => setVisible(false)}>取消</Button>,
65
+                    <Button key="submit" type="primary" size="large" onClick={() => handleOk()}>确认</Button>,
66
+                ]}
67
+            >
68
+                <div>
69
+                    <p style={{ color: 'red' }}>请先进行线下实际充值操作后再执行线上充值存档</p>
70
+                    <Form {...formItemLayout} onSubmit={handleSubmit}>
71
+
72
+                        <Form.Item label="充值金额" >
73
+                            {getFieldDecorator('rechargeAmount', {
74
+                                rules: [{ required: true, message: '充值金额不能为空' },
75
+                                { max: 20 }],
76
+                            })(<Input type='number' placeholder="支持2位小数" />)}
77
+                        </Form.Item>
78
+
79
+                        <Form.Item label="充值凭证" help="可上传银行转账截图等作为查账线索">
80
+                            {getFieldDecorator('certificateList', {
81
+                                rules: [{ required: false }],
82
+                            })(
83
+                                <Upload />,
84
+                            )}
85
+                        </Form.Item>
86
+
87
+                    </Form>
88
+                </div>
89
+
90
+
91
+
92
+
93
+            </Modal>
94
+        </div>
95
+    )
96
+}
97
+
98
+const WrappedRegistrationForm = Form.create()(SelectContact);
99
+export default WrappedRegistrationForm;

+ 8
- 6
src/pages/fundManagement/components/SelectContact.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Select, Modal, Button, Table, Divider, Tag, Input, Row, Col, Icon, Pagination } from 'antd';
2
+import { Form, Modal, Button, Table, message, Input, Icon, Pagination } from 'antd';
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';
29
 
29
 
30
 
30
 
31
 
31
 
32
-    const handleChange = val => {
33
-    }
34
-
35
-
36
-
37
 
32
 
38
     // 提交事件
33
     // 提交事件
39
     const handleSubmit = (e, props) => {
34
     const handleSubmit = (e, props) => {
61
         });
56
         });
62
     }
57
     }
63
 
58
 
59
+    const selectData = (record) => {
60
+        request({ ...apis.fund.addContact, urlData: { id: record.contactId } }).then((data) => {
61
+            message.success('新增成功!');
62
+            props.onClick()
63
+            setVisible(false)
64
+        })
65
+    }
64
 
66
 
65
 
67
 
66
     const columns = [
68
     const columns = [

+ 63
- 0
src/pages/fundManagement/components/Swiper.jsx 查看文件

1
+import React, { useEffect } from "react";
2
+import Swiper from 'swiper';
3
+import styles from './style.less'
4
+import classNames from 'classnames';
5
+import closeImg from '../../../assets/close.png';
6
+import 'swiper/css/swiper.min.css';
7
+
8
+
9
+const swiper = ({ list, onClose }) => {
10
+
11
+    useEffect(() => {
12
+        if (list.length > 0) {
13
+            //swiper初始化
14
+            if (list.length > 1) {
15
+                this.swiper = new Swiper('.swiper-container', {
16
+                    slidesPerView: 1,
17
+                    loop: true,
18
+                    autoplay: {
19
+                        disableOnInteraction: false,
20
+                    },
21
+                    touchRatio: 1.5,
22
+                    pagination: {
23
+                        el: '.swiper-pagination',
24
+                        bulletElement: 'li',
25
+                        clickable: true,
26
+                        bulletActiveClass: 'antd-pro-pages-swiper-style-active',
27
+                    },
28
+                    observer: true,//修改swiper自己或子元素时,自动初始化swiper
29
+                    observeParents: true,//修改swiper的父元素时,自动初始化swiper
30
+                })
31
+            } else {
32
+                this.swiper = new Swiper('.swiper-container', {
33
+                    loop: false,
34
+                    observer: true,//修改swiper自己或子元素时,自动初始化swiper
35
+                    observeParents: true,//修改swiper的父元素时,自动初始化swiper
36
+                })
37
+            }
38
+
39
+        }
40
+    }, [])
41
+
42
+    return (
43
+        <>
44
+            {list.length > 0 && <div className={styles.mask}>
45
+                <div className={styles.content}>
46
+                    <img src={closeImg} alt="" className={styles.close} onClick={onClose} />
47
+                    <div className={classNames(['swiper-container', styles.carousel])}  >
48
+                        <div className={classNames(['swiper-wrapper', styles.carousel])} >
49
+                            {list.map((item, index) =>
50
+                                <div key={'swiper' + index} className={classNames(['swiper-slide', styles.carouselItem])} >
51
+                                    <img style={{ width: '100%', height: '100%', borderRadius: '10px' }} src={item} alt="" />
52
+                                </div>
53
+                            )}
54
+                        </div>
55
+                        <div className={classNames(['swiper-pagination', styles.dots])}  ></div>
56
+                    </div>
57
+                </div>
58
+            </div>}
59
+        </>
60
+    )
61
+};
62
+
63
+export default swiper;

+ 88
- 0
src/pages/fundManagement/components/style.less 查看文件

1
+.mask{
2
+    width: 100vw;
3
+    height: 100vh;
4
+    background-color: rgba(0,0,0,0.32);
5
+    position: fixed;
6
+    z-index: 999;
7
+    top: 0;
8
+    left: 0;
9
+}
10
+
11
+.content{
12
+    width: 32vw;
13
+    min-width: 757px;
14
+    height: 21.3vw;
15
+    min-height: 504px;
16
+    position: absolute;
17
+    left: 50%;
18
+    top: 110px;
19
+    transform: translateX(-50%);
20
+    border-radius: 10px;
21
+    .close{
22
+        width: 40px;
23
+        height: 40px;
24
+        position: absolute;
25
+        top: -22px;
26
+        right: -22px;
27
+        z-index: 9;
28
+    }
29
+}
30
+
31
+.dots{
32
+    position: absolute;
33
+    bottom: 11px;
34
+    width: 100%;
35
+    padding: 0;
36
+    margin: 0;
37
+    list-style: none;
38
+    text-align: center;
39
+    li {
40
+        position: relative;
41
+        display: inline-block;
42
+        width: 14px;
43
+        height: 2px;
44
+        margin: 0 3px;
45
+        padding: 0;
46
+        cursor: pointer;
47
+        background: #fff;
48
+        opacity: 0.6;
49
+        &.active{
50
+            width: 16px;
51
+            height: 3px;
52
+            background: #fff;
53
+            opacity: 1;
54
+        }
55
+    }
56
+}
57
+.carousel {
58
+    width: 32vw;
59
+    min-width: 757px;
60
+    height: 21.3vw;
61
+    min-height: 504px;
62
+    border-radius: 10px;
63
+    // overflow: hidden;
64
+    
65
+    .carouselItem{
66
+        width: 32vw;
67
+        min-width: 757px;
68
+        height: 21.3vw;
69
+        min-height: 504px;
70
+        position: relative;
71
+        display: inline-block;
72
+        .title{
73
+            font-size: 0.12rem;
74
+            color: #fff;
75
+            position: absolute;
76
+            display: block;
77
+            width: 100%;
78
+            height: 0.16rem;
79
+            bottom: 30px ;
80
+            padding: 0 40px;
81
+            text-align: center;
82
+            overflow: hidden;
83
+            white-space: nowrap;
84
+            text-overflow: ellipsis;
85
+
86
+        }
87
+    }
88
+}

+ 12
- 0
src/pages/fundManagement/style.less 查看文件

23
   .touxiang {
23
   .touxiang {
24
     width: 93px;
24
     width: 93px;
25
     height: 93px;
25
     height: 93px;
26
+  }
27
+  .flexRow{
28
+    display: flex;
29
+    align-items: center;
30
+    justify-content: space-between;
31
+  }
32
+  .red{
33
+    color: red;
34
+  }
35
+  .blue{
36
+    color: #1890FF;
37
+    cursor: pointer;
26
   }
38
   }

+ 11
- 27
src/pages/sample/h5/h5Sample.jsx 查看文件

14
 function header(props) {
14
 function header(props) {
15
     // 获取初始化数据
15
     // 获取初始化数据
16
     const [data, setData] = useState({})
16
     const [data, setData] = useState({})
17
-    const [demandIdList, setDemandIdList] = useState([])
18
 
17
 
19
     useEffect(() => {
18
     useEffect(() => {
20
         getList({ pageNum: 1, pageSize: 10 });
19
         getList({ pageNum: 1, pageSize: 10 });
22
 
21
 
23
     // 查询列表
22
     // 查询列表
24
     const getList = (params) => {
23
     const getList = (params) => {
25
-        request({ ...apis.sample.list, params: { ...params } }).then((data) => {
24
+        request({ ...apis.sample.h5Template, params: { ...params } }).then((data) => {
26
             console.log(data)
25
             console.log(data)
27
             setData(data)
26
             setData(data)
28
         })
27
         })
34
         e.preventDefault();
33
         e.preventDefault();
35
         props.form.validateFields((err, values) => {
34
         props.form.validateFields((err, values) => {
36
             if (!err) {
35
             if (!err) {
37
-                let { createDate, ...submitValue } = values
38
-                if (null != createDate && createDate.length > 0) {
39
-                    const [startCreateDate, endCreateDate] = createDate
40
-                    submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
41
-                    submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
42
-                } else {
43
-                    submitValue.startCreateDate = null
44
-                    submitValue.endCreateDate = null
45
-                }
36
+                let { ...submitValue } = values
46
                 getList({ pageNum: 1, pageSize: 10, ...submitValue })
37
                 getList({ pageNum: 1, pageSize: 10, ...submitValue })
47
             }
38
             }
48
         });
39
         });
49
     }
40
     }
50
 
41
 
51
     const changePageNum = (pageNumber) => {
42
     const changePageNum = (pageNumber) => {
52
-        let { createDate, ...submitValue } = props.form.getFieldsValue()
53
-        if (null != createDate && createDate.length > 0) {
54
-            const [startCreateDate, endCreateDate] = createDate
55
-            submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
56
-            submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
57
-        } else {
58
-            submitValue.startCreateDate = null
59
-            submitValue.endCreateDate = null
60
-        }
43
+        let { ...submitValue } = props.form.getFieldsValue()
44
+
61
         getList({ pageNum: pageNumber, pageSize: 10, ...submitValue })
45
         getList({ pageNum: pageNumber, pageSize: 10, ...submitValue })
62
     }
46
     }
63
 
47
 
72
     const columns = [
56
     const columns = [
73
         {
57
         {
74
             title: '模板编号',
58
             title: '模板编号',
75
-            dataIndex: 'sampleName',
76
-            key: 'sampleName',
59
+            dataIndex: 'h5TemplateId',
60
+            key: 'h5TemplateId',
77
             align: 'center',
61
             align: 'center',
78
         },
62
         },
79
         {
63
         {
80
             title: '模板名称',
64
             title: '模板名称',
81
-            dataIndex: 'orgName',
82
-            key: 'orgName',
65
+            dataIndex: 'name',
66
+            key: 'name',
83
             align: 'center',
67
             align: 'center',
84
         },
68
         },
85
         {
69
         {
99
     return (
83
     return (
100
 
84
 
101
         <>
85
         <>
102
-            <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{marginBottom:'16px'}}>
86
+            <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{ marginBottom: '16px' }}>
103
                 <Form.Item>
87
                 <Form.Item>
104
-                    {getFieldDecorator('sampleName')(
88
+                    {getFieldDecorator('name')(
105
                         <Input
89
                         <Input
106
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
90
                             prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
107
-                            placeholder="样例名"
91
+                            placeholder="模板名"
108
                         />,
92
                         />,
109
                     )}
93
                     )}
110
                 </Form.Item>
94
                 </Form.Item>

+ 81
- 18
src/services/apis.js 查看文件

109
       url: `${prefix}/put/h5Sample/:id`,
109
       url: `${prefix}/put/h5Sample/:id`,
110
       method: 'PUT',
110
       method: 'PUT',
111
       action: 'channel',
111
       action: 'channel',
112
-    }
112
+    },
113
+    h5Template: {
114
+      url: `${prefix}/taH5Template`,
115
+      method: 'GET',
116
+      action: 'channel',
117
+    },
113
   },
118
   },
114
   image: {
119
   image: {
115
     uploadForAnt: {
120
     uploadForAnt: {
141
       action: 'channel',
146
       action: 'channel',
142
     },
147
     },
143
 
148
 
144
-   
145
-    get:{
149
+
150
+    get: {
146
       url: `${prefix}/taNotice/:id`,
151
       url: `${prefix}/taNotice/:id`,
147
       method: 'GET',
152
       method: 'GET',
148
       action: 'channel',
153
       action: 'channel',
149
     },
154
     },
150
-    delete:{
155
+    delete: {
151
       url: `${prefix}/taNotice/batchDelete`,
156
       url: `${prefix}/taNotice/batchDelete`,
152
       method: 'put',
157
       method: 'put',
153
       action: 'channel',
158
       action: 'channel',
154
     },
159
     },
155
-    getSample:{
160
+    getSample: {
156
       url: `${prefix}/listH5SampleByCondition`,
161
       url: `${prefix}/listH5SampleByCondition`,
157
       method: 'GET',
162
       method: 'GET',
158
       action: 'channel',
163
       action: 'channel',
159
     }
164
     }
160
     // /api/admin/ListH5SampleByCondition
165
     // /api/admin/ListH5SampleByCondition
161
   },
166
   },
162
-  
163
-  contact:{
167
+
168
+  contact: {
164
     listContactByCondition: {
169
     listContactByCondition: {
165
       url: `${prefix}/listContactByCondition`,
170
       url: `${prefix}/listContactByCondition`,
166
       method: 'GET',
171
       method: 'GET',
192
       action: 'channel',
197
       action: 'channel',
193
     },
198
     },
194
   },
199
   },
195
-  relatedOrganization:{
196
-    get:{
200
+  fund: {
201
+    account: {
202
+      url: `${prefix}/taOrgAccount`,
203
+      method: 'GET',
204
+      action: 'channel',
205
+    },
206
+    accountDetail: {
207
+      url: `${prefix}/taOrgAccount/:id`,
208
+      method: 'GET',
209
+      action: 'channel',
210
+    },
211
+    taOrgOrder: {
212
+      url: `${prefix}/taOrgOrder`,
213
+      method: 'GET',
214
+      action: 'channel',
215
+    },
216
+    refund: {
217
+      url: `${prefix}/taOrgOrder/refund/:id`,
218
+      method: 'PUT',
219
+      action: 'channel',
220
+    },
221
+    reject: {
222
+      url: `${prefix}/taOrgOrder/reject/:id`,
223
+      method: 'PUT',
224
+      action: 'channel',
225
+    },
226
+    receiveInfo: {
227
+      url: `${prefix}/receiveInfo`,
228
+      method: 'GET',
229
+      action: 'channel',
230
+    },
231
+    recharge: {
232
+      url: `${prefix}/taOrgAccount/recharge/:id`,
233
+      method: 'PUT',
234
+      action: 'channel',
235
+    },
236
+    accoutRefund: {
237
+      url: `${prefix}/taOrgAccount/refund/:id`,
238
+      method: 'PUT',
239
+      action: 'channel',
240
+    },
241
+    addContact: {
242
+      url: `${prefix}/taContactFinance/:id`,
243
+      method: 'PUT',
244
+      action: 'channel',
245
+    },
246
+    delContact: {
247
+      url: `${prefix}/taContactFinanceDel`,
248
+      method: 'PUT',
249
+      action: 'channel',
250
+    },
251
+    contactList: {
252
+      url: `${prefix}/listContactByCondition`,
253
+      method: 'GET',
254
+      action: 'channel',
255
+    },
256
+
257
+  },
258
+  relatedOrganization: {
259
+    get: {
197
       url: `${prefix}/contract/listCompanyOrg`,
260
       url: `${prefix}/contract/listCompanyOrg`,
198
       method: 'GET',
261
       method: 'GET',
199
       action: 'channel',
262
       action: 'channel',
200
     },
263
     },
201
-    listCompany:{
264
+    listCompany: {
202
       url: `${prefix}/contract/listCompany`,
265
       url: `${prefix}/contract/listCompany`,
203
       method: 'GET',
266
       method: 'GET',
204
       action: 'channel',
267
       action: 'channel',
205
     },
268
     },
206
-    listOrg:{
269
+    listOrg: {
207
       url: `${prefix}/contract/listOrg`,
270
       url: `${prefix}/contract/listOrg`,
208
       method: 'GET',
271
       method: 'GET',
209
       action: 'channel',
272
       action: 'channel',
210
     },
273
     },
211
-    post:{
274
+    post: {
212
       url: `${prefix}/contract/taCompanyOrg`,
275
       url: `${prefix}/contract/taCompanyOrg`,
213
       method: 'post',
276
       method: 'post',
214
       action: 'channel',
277
       action: 'channel',
215
     },
278
     },
216
-    delete:{
279
+    delete: {
217
       url: `${prefix}/taCompanyOrg/:id`,
280
       url: `${prefix}/taCompanyOrg/:id`,
218
       method: 'delete',
281
       method: 'delete',
219
       action: 'channel',
282
       action: 'channel',
220
 
283
 
221
     },
284
     },
222
- 
285
+
223
   },
286
   },
224
-  signedContract:{
225
-    get:{
287
+  signedContract: {
288
+    get: {
226
       url: `${prefix}/contract/list`,
289
       url: `${prefix}/contract/list`,
227
       method: 'GET',
290
       method: 'GET',
228
       action: 'channel',
291
       action: 'channel',
229
     },
292
     },
230
-    check:{
293
+    check: {
231
       url: `${prefix}/contract/checkBeforeBatchUpdatePrice`,
294
       url: `${prefix}/contract/checkBeforeBatchUpdatePrice`,
232
       method: 'post',
295
       method: 'post',
233
       action: 'channel',
296
       action: 'channel',
333
       method: 'POST',
396
       method: 'POST',
334
       action: 'channel',
397
       action: 'channel',
335
     }
398
     }
336
-  }  
399
+  }
337
 }
400
 }
338
 
401
 
339
 export default apis;
402
 export default apis;