zhoulisen hace 5 años
padre
commit
4ac85f23c8

+ 6
- 0
config/routes.js Ver fichero

@@ -126,6 +126,12 @@ export default [
126 126
                 name: '关联组织',
127 127
                 component: './eContract/relatedOrganization',
128 128
               },
129
+              {
130
+                path: '/eContract/relatedOrganization/add',
131
+                name: '新增关联组织',
132
+                hideInMenu: true,
133
+                component: './eContract/relatedOrganization/add',
134
+              },
129 135
               {
130 136
                 path: '/eContract/signedContract',
131 137
                 name: '已签署合同',

+ 95
- 0
src/pages/eContract/relatedOrganization/add.jsx Ver fichero

@@ -0,0 +1,95 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
3
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Steps, Pagination, Modal, Breadcrumb } from 'antd';
4
+import router from 'umi/router';
5
+import moment from 'moment';
6
+import styles from './style.less';
7
+import { fetch, apis } from '../../../utils/request';
8
+import request from '../../../utils/request';
9
+import AuthButton from '@/components/AuthButton';
10
+import Enterprise from './components/enterprise';
11
+import Organization from './components/organization';
12
+
13
+const { Step } = Steps;
14
+
15
+let ent = null
16
+
17
+function header(props) {
18
+
19
+  console.log(props, 'props')
20
+
21
+  const [current, setCurrent] = useState()
22
+  const [status, setStatus] = useState({})
23
+
24
+  useEffect(() => {
25
+    setCurrent(0)
26
+    setStatus({
27
+      enttitle: "选择已认证企业",
28
+      ent: "process",
29
+      org: "wait",
30
+      disabled: true,
31
+    })
32
+  }, [])
33
+
34
+
35
+  const relation = (orgId, companyId) => {
36
+    request({ ...apis.relatedOrganization.post, data: { orgId: orgId, companyId: companyId }, }).then(data => {
37
+      message.info("关联成功")
38
+      router.push({
39
+        pathname: '/eContract/relatedOrganization',
40
+        query: {
41
+          //   salesBatchId: data.salesBatchId,
42
+        },
43
+      });
44
+    }).catch((err) => {
45
+      message.info(err.msg || err.message)
46
+    })
47
+  }
48
+  const onChange = current => {
49
+    console.log('onChange:', current);
50
+    setCurrent(current);
51
+  };
52
+
53
+  const onChoiceEnt = (value) => {
54
+    console.log("onChoiceEnt", value);
55
+    ent = value.companyId
56
+    setCurrent(1)
57
+    setStatus({
58
+
59
+      ent: "finish",
60
+      org: "process",
61
+      disabled: false,
62
+    })
63
+  };
64
+
65
+  const onChoiceOrg = (value) => {
66
+    console.log("onChoiceOrg", value);
67
+    console.log("ent", ent);
68
+    relation(value.orgId,ent )
69
+
70
+
71
+  };
72
+
73
+  return (<>
74
+    <div style={{ maxWidth: 600 }}>
75
+      <Steps
76
+        type="navigation"
77
+        current={current}
78
+        onChange={onChange}
79
+        className="site-navigation-steps"
80
+      >
81
+        <Step status={status.ent} title={status.enttitle} disabled />
82
+        <Step status={status.org} title="选择关联的组织" disabled />
83
+        {/* <Step status="wait" title="Step 3" /> */}
84
+
85
+      </Steps>
86
+
87
+    </div>
88
+    {current === 0 && <Enterprise onChoiceEnt={onChoiceEnt} />}
89
+    {current === 1 && <Organization onChoiceOrg={onChoiceOrg} />}
90
+  </>)
91
+}
92
+
93
+
94
+
95
+export default header

+ 140
- 0
src/pages/eContract/relatedOrganization/components/enterprise.jsx Ver fichero

@@ -0,0 +1,140 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
3
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Steps, Pagination, Modal, Breadcrumb } from 'antd';
4
+import router from 'umi/router';
5
+import moment from 'moment';
6
+import styles from '../style.less';
7
+import { fetch, apis } from '../../../../utils/request';
8
+import request from '../../../../utils/request';
9
+import AuthButton from '@/components/AuthButton';
10
+
11
+
12
+
13
+
14
+function header(props, ref) {
15
+
16
+    console.log(props,'ent')
17
+    console.log(props,'ref')
18
+
19
+    const [ data, setData ] = useState({})
20
+
21
+    useEffect(() => {
22
+        getList({ pageNum: 1, pageSize: 10 });
23
+    }, [])
24
+    // 查询列表
25
+
26
+    const getList = params => { 
27
+        // certifiedStatus: false,
28
+        request({ ...apis.relatedOrganization.listCompany, params: { ...params } }).then(data => {
29
+            setData(data)
30
+        })
31
+    }
32
+    function handleReset() {
33
+        props.form.resetFields();
34
+        getList({ pageNum: 1, pageSize: 10 });
35
+    }
36
+
37
+    const changePageNum = pageNumber => {
38
+        getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
39
+    }
40
+
41
+    const choiceent = value =>{
42
+        console.log(value,'value')
43
+
44
+        // Modal.confirm({
45
+        //     title: '确认将所选数据删除?',
46
+        //     okText: '确定',
47
+        //     cancelText: '取消',
48
+        //     onOk() {
49
+            
50
+        //     },
51
+        // });
52
+        props.onChoiceEnt(value)
53
+    }
54
+
55
+
56
+
57
+
58
+
59
+    const columns = [
60
+        {
61
+            title: '企业名称',
62
+            dataIndex: 'companyName',
63
+            key: 'companyName',
64
+            align: 'center',
65
+
66
+        },
67
+        {
68
+            title: '企业编号',
69
+            dataIndex: 'companyCode',
70
+            key: 'companyCode',
71
+            align: 'center',
72
+           
73
+        },
74
+        {
75
+            title: '法大大客户编号',
76
+            dataIndex: 'fadadaCode',
77
+            key: 'fadadaCode',
78
+            align: 'center',
79
+           
80
+        },
81
+        {
82
+            title: '操作',
83
+            dataIndex: 'handle',
84
+            key: 'handle',
85
+            align: 'center',
86
+            render: (x, row) => (
87
+                <>
88
+
89
+
90
+                    <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={e=>choiceent(row)}>
91
+                    选择<Icon type="form"  className={styles.edit} />
92
+                    </span>
93
+
94
+                </>
95
+            ),
96
+        }
97
+    ]
98
+   
99
+    const { getFieldDecorator } = props.form
100
+    return (<>
101
+        <div>
102
+        <Form layout="inline" style={{ marginTop: '30px' }} onSubmit={e => handleSubmit(e, props)}>
103
+                <Form.Item>
104
+                    {getFieldDecorator('companyName')(
105
+                        <Input
106
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
107
+                            placeholder="企业名称 "
108
+                        />,
109
+                    )}
110
+                </Form.Item>
111
+                <Form.Item>
112
+                    {getFieldDecorator('companyCode')(
113
+                        <Input
114
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
115
+                            placeholder="企业编号 "
116
+                        />,
117
+                    )}
118
+                    </Form.Item>
119
+                    <Form.Item>
120
+                    <Button type="primary" htmlType="submit" className={styles.searchBtn}>搜索</Button>
121
+                    <Button style={{ marginLeft: 8 }} onClick={handleReset}>重置</Button>
122
+                </Form.Item>
123
+            </Form>
124
+
125
+            
126
+
127
+            <Table id='noticeTable' style={{ marginTop: '30px' }}  dataSource={data.records} columns={columns} pagination={false} />
128
+
129
+                <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
130
+                    <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current} />
131
+                </div>
132
+
133
+
134
+        </div>
135
+    </>)
136
+}
137
+
138
+const WrappedHeader = Form.create({ name: 'header' })(header);
139
+
140
+export default WrappedHeader

+ 131
- 0
src/pages/eContract/relatedOrganization/components/organization.jsx Ver fichero

@@ -0,0 +1,131 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
3
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Steps, Pagination, Modal, Breadcrumb } from 'antd';
4
+import router from 'umi/router';
5
+import moment from 'moment';
6
+import styles from '../style.less';
7
+import { fetch, apis } from '../../../../utils/request';
8
+import request from '../../../../utils/request';
9
+import AuthButton from '@/components/AuthButton';
10
+
11
+
12
+
13
+
14
+function header(props) {
15
+
16
+    const [ data, setData ] = useState({})
17
+
18
+    useEffect(() => {
19
+        console.log('org')
20
+        getList({ pageNum: 1, pageSize: 10 });
21
+    }, [])
22
+    // 查询列表
23
+
24
+    const getList = params => {
25
+        request({ ...apis.relatedOrganization.listOrg, params: { ...params } }).then(data => {
26
+            setData(data)
27
+        })
28
+    }
29
+    function handleReset() {
30
+        props.form.resetFields();
31
+        getList({ pageNum: 1, pageSize: 10 });
32
+    }
33
+
34
+    const changePageNum = pageNumber => {
35
+        getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
36
+    }
37
+
38
+    const choiceorg = value =>{
39
+        console.log(value,'org')
40
+        props.onChoiceOrg(value)
41
+    }
42
+
43
+    const columns = [
44
+        {
45
+            title: '组织名称',
46
+            dataIndex: 'name',
47
+            key: 'name',
48
+            align: 'center',
49
+
50
+        },
51
+        {
52
+            title: '组织编号',
53
+            dataIndex: 'orgId',
54
+            key: 'orgId',
55
+            align: 'center',
56
+           
57
+        },
58
+        {
59
+            title: '小程序名称',
60
+            dataIndex: 'miniAppName',
61
+            key: 'miniAppName',
62
+            align: 'center',
63
+           
64
+        },
65
+        {
66
+            title: '代理商名称',
67
+            dataIndex: 'channelProxyName',
68
+            key: 'channelProxyName',
69
+            align: 'center',
70
+           
71
+        },
72
+        {
73
+            title: '操作',
74
+            dataIndex: 'handle',
75
+            key: 'handle',
76
+            align: 'center',
77
+            render: (x, row) => (
78
+                <>
79
+
80
+
81
+                    <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={e=>choiceorg(row)}>
82
+                    选择<Icon type="form" className={styles.edit} />
83
+                    </span>
84
+
85
+                </>
86
+            ),
87
+        }
88
+    ]
89
+   
90
+    const { getFieldDecorator } = props.form
91
+    return (<>
92
+        <div>
93
+        <Form layout="inline" style={{ marginTop: '30px' }} onSubmit={e => handleSubmit(e, props) }>
94
+                <Form.Item>
95
+                    {getFieldDecorator('orgName')(
96
+                        <Input
97
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
98
+                            placeholder="组织名称 "
99
+                        />,
100
+                    )}
101
+                </Form.Item>
102
+                <Form.Item>
103
+                    {getFieldDecorator('miniAppName')(
104
+                        <Input
105
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
106
+                            placeholder="小程序名称 "
107
+                        />,
108
+                    )}
109
+                    </Form.Item>
110
+                    <Form.Item>
111
+                    <Button type="primary" htmlType="submit" className={styles.searchBtn}>搜索</Button>
112
+                    <Button style={{ marginLeft: 8 }} onClick={handleReset}>重置</Button>
113
+                </Form.Item>
114
+            </Form>
115
+
116
+            
117
+
118
+            <Table id='noticeTable' style={{ marginTop: '30px' }}  dataSource={data.records} columns={columns} pagination={false} />
119
+
120
+                <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
121
+                    <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current} />
122
+                </div>
123
+
124
+
125
+        </div>
126
+    </>)
127
+}
128
+
129
+const WrappedHeader = Form.create({ name: 'header' })(header);
130
+
131
+export default WrappedHeader

+ 164
- 38
src/pages/eContract/relatedOrganization/index.jsx Ver fichero

@@ -19,25 +19,41 @@ function header(props) {
19 19
     // 查询列表
20 20
 
21 21
     const getList = params => {
22
-       
22
+        request({ ...apis.relatedOrganization.get, params: { ...params } }).then(data => {
23
+            setData(data)
24
+        })
23 25
     }
24 26
 
25
-    const toEditResource = (id) => () => {
26
-        if(id){
27
-        router.push({
28
-            pathname: '/resource/openScreen/edit',
29
-              query: {
30
-                id
31
-              },
32
-        });
33
-    }else{
27
+    const toAdd = (id) => () => {
28
+        
34 29
             router.push({
35
-                pathname: '/resource/openScreen/add',
30
+                pathname: '/eContract/relatedOrganization/add',
36 31
                   query: {
37 32
                     id
38 33
                   },
39 34
             });
40
-        }
35
+        
36
+    }
37
+
38
+    const onDelete = rowData =>  {
39
+        // if (taNoticeList.length < 1) {
40
+        //     message.error('请至少选择一条数据')
41
+        //     return
42
+        // }
43
+
44
+        Modal.confirm({
45
+            title: '删除后组织将不能使用企业电子签章,确认删除?',
46
+            okText: '确定',
47
+            cancelText: '取消',
48
+            onOk() {
49
+                request({ ...apis.relatedOrganization.delete, urlData: { id: rowData.companyOrgId }}).then((data) => {
50
+                    message.info("操作成功")
51
+                    getList({ pageNum: 1, pageSize: 10 });
52
+                  
53
+                  }).catch((err) => {
54
+                  })
55
+            },
56
+        });
41 57
     }
42 58
 
43 59
     const handleSubmit = (e, props) => {
@@ -50,43 +66,153 @@ function header(props) {
50 66
         getList({ pageNum: 1, pageSize: 10 });
51 67
     }
52 68
 
53
-    const toDelBatch = rowData => () => {
54
-        console.log(taNoticeList, 'taNoticeList')
55
-        if (taNoticeList.length < 1) {
56
-            message.error('请至少选择一条数据')
57
-            return
58
-        }
59
-
60
-        Modal.confirm({
61
-            title: '确认将所选数据删除?',
62
-            okText: '确定',
63
-            cancelText: '取消',
64
-            onOk() {
65
-              
66
-            },
67
-        });
68
-    }
69 69
 
70 70
     const changePageNum = pageNumber => {
71 71
         getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
72 72
     }
73 73
 
74
-     
75
-    const { getFieldDecorator } = props.form
74
+    const columns = [
75
+        {
76
+            title: '企业名称',
77
+            dataIndex: 'companyName',
78
+            key: 'companyName',
79
+            align: 'center',
76 80
 
77
-    const rowSelection = {
78
-        onChange: (selectedRowKeys, selectedRows) => {
79
-          console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
80
-          setTaNoticeList(selectedRows)
81 81
         },
82
-      };
82
+        {
83
+            title: '企业编号',
84
+            dataIndex: 'companyCode',
85
+            key: 'companyCode',
86
+            align: 'center',
87
+           
88
+        },
89
+        {
90
+            title: '实名认证状态',
91
+            dataIndex: 'certifiedStatus',
92
+            key: 'certifiedStatus',
93
+            align: 'center',
94
+            render: (certifiedStatus) => <>
95
+            {certifiedStatus === 0 && <span>管理员资料已提交</span>}
96
+            {certifiedStatus === 1 && <span>企业基本资料(没有申请表)已提交</span>}
97
+            {certifiedStatus === 2 && <span>已提交待审核</span>}
98
+            {certifiedStatus === 3 && <span>审核通过</span>}
99
+            {certifiedStatus === 4 && <span>审核不通过</span>}
100
+            {certifiedStatus === 5 && <span>人工初核通过</span>}
101
+           
102
+            </>,
103
+          
104
+        },
105
+        {
106
+            title: '关联组织名',
107
+            dataIndex: 'orgName',
108
+            key: 'orgName',
109
+            align: 'center',
110
+        },
111
+        {
112
+            title: '组织编号',
113
+            dataIndex: 'orgId',
114
+            key: 'orgId',
115
+            align: 'center',
116
+           
117
+        }, 
118
+        {
119
+            title: '小程序名称',
120
+            dataIndex: 'miniAppName',
121
+            key: 'miniAppName',
122
+            align: 'center',
123
+            
124
+        },
125
+        
126
+        {
127
+            title: '关联时间',
128
+            dataIndex: 'createDate',
129
+            key: 'createDate',
130
+            align: 'center',
131
+            render: (x, row) => <><span>{row.createDate?`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`:''}</span></>,
132
+        },
133
+        {
134
+            title: '操作',
135
+            dataIndex: 'handle',
136
+            key: 'handle',
137
+            align: 'center',
138
+            render: (x, row) => (
139
+                <>
140
+
141
+
142
+                    <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={e=>onDelete(row)}>
143
+                    删除<Icon type="form" className={styles.edit} />
144
+                    </span>
145
+
146
+                </>
147
+            ),
148
+        },
149
+        
150
+    ];
151
+
152
+     
153
+    const { getFieldDecorator } = props.form
83 154
  
84 155
     return (
85 156
 
86 157
         <>
87
-            <div>
88
-           234
89
-            </div>
158
+            <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
159
+                <Form.Item>
160
+                    {getFieldDecorator('companyName')(
161
+                        <Input
162
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
163
+                            placeholder="企业名称 "
164
+                        />,
165
+                    )}
166
+                </Form.Item>
167
+                <Form.Item>
168
+                    {getFieldDecorator('companyCode')(
169
+                        <Input
170
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
171
+                            placeholder="企业编号 "
172
+                        />,
173
+                    )}
174
+                </Form.Item>
175
+                <Form.Item>
176
+                    {getFieldDecorator('certifiedStatus')(
177
+                        <Select style={{ width: '280px' }} placeholder="实名认证状态">
178
+                            <Select.Option value="">全部</Select.Option>
179
+                            <Select.Option value="0">管理员资料已提交</Select.Option>
180
+                            <Select.Option value="1">企业基本资料(没有申请表)已提交</Select.Option>
181
+                            <Select.Option value="2">已提交待审核</Select.Option>
182
+                            <Select.Option value="3">审核通过</Select.Option>
183
+                            <Select.Option value="4">审核不通过</Select.Option>
184
+                            <Select.Option value="5">人工初核通过</Select.Option>
185
+                        </Select>,
186
+                    )}
187
+                </Form.Item>
188
+                <Form.Item>
189
+                    {getFieldDecorator('orgName')(
190
+                        <Input
191
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
192
+                            placeholder="关联组织名 "
193
+                        />,
194
+                    )}
195
+                </Form.Item>
196
+                <Form.Item>
197
+                    {getFieldDecorator('miniAppName')(
198
+                        <Input
199
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
200
+                            placeholder="小程序名称 "
201
+                        />,
202
+                    )}
203
+                </Form.Item>
204
+                <Form.Item>
205
+                    <Button type="primary" htmlType="submit" className={styles.searchBtn}>搜索</Button>
206
+                    <Button style={{ marginLeft: 8 }} onClick={handleReset}>重置</Button>
207
+                </Form.Item>
208
+            </Form>
209
+            <Button type="danger" className={styles.addBtn} onClick={toAdd()}>新增</Button>
210
+
211
+            <Table id='noticeTable'   dataSource={data.records} columns={columns} pagination={false} />
212
+
213
+                <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
214
+                    <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current} />
215
+                </div>
90 216
         </>
91 217
     )
92 218
 }

+ 6
- 0
src/pages/eContract/relatedOrganization/style.less Ver fichero

@@ -45,4 +45,10 @@
45 45
     color: #bebebe;
46 46
     margin-left: 6px;
47 47
     font-size: 15px;
48
+  }
49
+
50
+  .site-navigation-steps {
51
+    width: 300px;
52
+    margin-bottom: 60px;
53
+    box-shadow: 0px -1px 0 0 #e8e8e8 inset;
48 54
   }

+ 271
- 36
src/pages/eContract/signedContract/index.jsx Ver fichero

@@ -1,6 +1,6 @@
1 1
 import React, { useState, useEffect } from 'react';
2 2
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
3
-import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, Breadcrumb } from 'antd';
3
+import { Form, Input, Button, Icon, Select, message, Table, InputNumber, Divider, Tag, DatePicker, Pagination, Modal, Breadcrumb } from 'antd';
4 4
 import router from 'umi/router';
5 5
 import moment from 'moment';
6 6
 import styles from './style.less';
@@ -8,41 +8,60 @@ import { fetch, apis } from '../../../utils/request';
8 8
 import request from '../../../utils/request';
9 9
 import AuthButton from '@/components/AuthButton';
10 10
 
11
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
12
+
11 13
 function header(props) {
12
-    
13
-    const [taNoticeList, setTaNoticeList] = useState([])
14
-    const [ data, setData ] = useState({})
14
+
15
+    const [taContractList, setTaContractList] = useState([])
16
+    const [data, setData] = useState({})
17
+    const [checkData, setCheckData] = useState()
18
+    const [visible, setVisible] = useState()
19
+    const [price, setPrice] = useState()
15 20
 
16 21
     useEffect(() => {
22
+        setVisible(false)
23
+        setCheckData(0)
17 24
         getList({ pageNum: 1, pageSize: 10 });
18 25
     }, [])
19 26
     // 查询列表
20 27
 
21 28
     const getList = params => {
22
-       
23
-    }
24 29
 
25
-    const toEditResource = (id) => () => {
26
-        if(id){
27
-        router.push({
28
-            pathname: '/resource/openScreen/edit',
29
-              query: {
30
-                id
31
-              },
32
-        });
33
-    }else{
34
-            router.push({
35
-                pathname: '/resource/openScreen/add',
36
-                  query: {
37
-                    id
38
-                  },
39
-            });
40
-        }
30
+        request({ ...apis.signedContract.get, params: { ...params } }).then(data => {
31
+            setData(data)
32
+        })
33
+
41 34
     }
42 35
 
36
+
43 37
     const handleSubmit = (e, props) => {
44 38
         e.preventDefault();
45
-        getList({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue() });
39
+        console.log(e, props)
40
+        props.form.validateFields((err, values) => {
41
+            if (!err) {
42
+                let { signatoryTime, settlementTime, ...submitValue } = values
43
+                if (null != signatoryTime && signatoryTime.length > 0) {
44
+                    const [signatoryStartTime, signatoryEndTime] = signatoryTime
45
+                    submitValue.signatoryStartTime = moment(signatoryStartTime).format('YYYY-MM-DD');
46
+                    submitValue.signatoryEndTime = moment(signatoryEndTime).format('YYYY-MM-DD');
47
+                } else {
48
+                    submitValue.signatoryStartTime = null
49
+                    submitValue.signatoryEndTime = null
50
+                }
51
+
52
+                if (null != settlementTime && settlementTime.length > 0) {
53
+                    const [settlementStartTime, settlementEndTime] = settlementTime
54
+                    submitValue.settlementStartTime = moment(settlementStartTime).format('YYYY-MM-DD');
55
+                    submitValue.settlementEndTime = moment(settlementEndTime).format('YYYY-MM-DD');
56
+                } else {
57
+                    submitValue.settlementStartTime = null
58
+                    submitValue.settlementEndTime = null
59
+                }
60
+              
61
+                getList({ pageNum: 1, pageSize: 10, ...submitValue });
62
+            }
63
+        });
64
+       
46 65
     }
47 66
 
48 67
     function handleReset() {
@@ -51,18 +70,18 @@ function header(props) {
51 70
     }
52 71
 
53 72
     const toDelBatch = rowData => () => {
54
-        console.log(taNoticeList, 'taNoticeList')
55
-        if (taNoticeList.length < 1) {
56
-            message.error('请至少选择一条数据')
57
-            return
58
-        }
73
+        // if (taContractList.length < 1) {
74
+        //     message.error('请至少选择一条数据')
75
+        //     return
76
+        // }
59 77
 
60 78
         Modal.confirm({
61 79
             title: '确认将所选数据删除?',
62 80
             okText: '确定',
63 81
             cancelText: '取消',
64 82
             onOk() {
65
-              
83
+            
84
+                console.log(price,'price')
66 85
             },
67 86
         });
68 87
     }
@@ -71,22 +90,238 @@ function header(props) {
71 90
         getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
72 91
     }
73 92
 
74
-     
93
+
75 94
     const { getFieldDecorator } = props.form
76 95
 
77 96
     const rowSelection = {
78 97
         onChange: (selectedRowKeys, selectedRows) => {
79
-          console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
80
-          setTaNoticeList(selectedRows)
98
+            console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
99
+            setTaContractList(selectedRows)
100
+        },
101
+    };
102
+
103
+    const onChange = (value) => {
104
+        console.log(value, 'value')
105
+        setPrice(value)
106
+    }
107
+
108
+
109
+
110
+    const columns = [
111
+        {
112
+            title: '企业名称',
113
+            dataIndex: 'companyName',
114
+            key: 'companyName',
115
+            align: 'center',
116
+
117
+        },
118
+        {
119
+            title: '企业编号',
120
+            dataIndex: 'companyNumber',
121
+            key: 'companyNumber',
122
+            align: 'center',
123
+
124
+        },
125
+        {
126
+            title: '代理商名称',
127
+            dataIndex: 'channelProxyName',
128
+            key: 'channelProxyName',
129
+            align: 'center',
130
+
131
+        },
132
+        {
133
+            title: '组织名称',
134
+            dataIndex: 'orgName',
135
+            key: 'orgName',
136
+            align: 'center',
81 137
         },
82
-      };
83
- 
138
+        {
139
+            title: '小程序名称',
140
+            dataIndex: 'miniAppName',
141
+            key: 'miniAppName',
142
+            align: 'center',
143
+
144
+        },
145
+        {
146
+            title: '合同编号',
147
+            dataIndex: 'contractId',
148
+            key: 'contractId',
149
+            align: 'center',
150
+
151
+        },
152
+        {
153
+            title: '甲方签署时间',
154
+            dataIndex: 'signatoryTime',
155
+            key: 'signatoryTime',
156
+            align: 'center',
157
+            render: (x, row) => <><span>{row.signatoryStartTime ? `${moment(row.signatoryStartTime).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>,
158
+        },
159
+        {
160
+            title: '是否结算',
161
+            dataIndex: 'settlement',
162
+            key: 'settlement',
163
+            align: 'center',
164
+        render: (x, row) =><><span>{row.settlement?'是':'否'}</span></>
165
+        },
166
+        {
167
+            title: '结算时间',
168
+            dataIndex: 'settlementTime',
169
+            key: 'settlementTime',
170
+            align: 'center',
171
+            render: (x, row) => <><span>{row.creatsettlementTimeeDate ? `${moment(row.settlementTime).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>,
172
+        },
173
+        {
174
+            title: '结算单价',
175
+            dataIndex: 'settlementPrice',
176
+            key: 'settlementPrice',
177
+            align: 'center',
178
+            render: (x, row) =><><span>{row.settlementPrice?row.settlementPrice/100:''}</span></>
179
+        },
180
+    ];
181
+
182
+    const handleShowModel = val => {
183
+
184
+        // if (taContractList.length < 1) {
185
+        //     message.error('请至少选择一条数据')
186
+        //     return
187
+        // }
188
+        let count = 0
189
+        taContractList.map((x)=>{
190
+         
191
+            if(x.settlement) {
192
+                count++
193
+            }
194
+        })
195
+        setCheckData(count)
196
+   
197
+ setVisible(true);
198
+
199
+    }
200
+
201
+    const handleCancel = val => {
202
+        setVisible(false);
203
+    }
204
+
205
+    const handleOk = val => {
206
+
207
+        console.log(price,'price')
208
+        request({ ...apis.signedContract.put, data:  { price: price, taContractList: taContractList }}).then(data => {
209
+            message.info("操作成功")
210
+            setVisible(false);
211
+            getList({ pageNum: 1, pageSize: 10 })
212
+            
213
+        })
214
+        
215
+    }
216
+
217
+
84 218
     return (
85 219
 
86 220
         <>
87
-            <div>
88
-           234
221
+            <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
222
+                <Form.Item>
223
+                    {getFieldDecorator('companyName')(
224
+                        <Input
225
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
226
+                            placeholder="企业名称 "
227
+                        />,
228
+                    )}
229
+                </Form.Item>
230
+                <Form.Item>
231
+                    {getFieldDecorator('companyNumber')(
232
+                        <Input
233
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
234
+                            placeholder="企业编号 "
235
+                        />,
236
+                    )}
237
+                </Form.Item>
238
+                <Form.Item>
239
+                    {getFieldDecorator('channelProxyName')(
240
+                        <Input
241
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
242
+                            placeholder="代理商名称 "
243
+                        />,
244
+                    )}
245
+                </Form.Item>
246
+                <Form.Item>
247
+                    {getFieldDecorator('orgName')(
248
+                        <Input
249
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
250
+                            placeholder="组织名称 "
251
+                        />,
252
+                    )}
253
+                </Form.Item>
254
+                <Form.Item>
255
+                    {getFieldDecorator('miniAppName')(
256
+                        <Input
257
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
258
+                            placeholder="小程序名称 "
259
+                        />,
260
+                    )}
261
+                </Form.Item>
262
+                <Form.Item>
263
+                    {getFieldDecorator('contractId')(
264
+                        <Input
265
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
266
+                            placeholder="合同编号 "
267
+                        />,
268
+                    )}
269
+                </Form.Item>
270
+                <Form.Item>
271
+                    {getFieldDecorator('contractName')(
272
+                        <Input
273
+                            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
274
+                            placeholder="合同标题 "
275
+                        />,
276
+                    )}
277
+                </Form.Item>
278
+
279
+                <Form.Item>
280
+                    <span style={{ marginRight: '10px' }}>甲方签署时间:</span>
281
+                    {getFieldDecorator('signatoryTime')(
282
+                        <RangePicker placeholder={['开始时间', '结束时间']} />
283
+                    )}
284
+                </Form.Item>
285
+                <Form.Item>
286
+                    {getFieldDecorator('settlement')(
287
+                        <Select style={{ width: '180px' }} placeholder="是否结算">
288
+                            <Select.Option value={true}>是</Select.Option>
289
+                            <Select.Option value={false}>否</Select.Option>
290
+                        </Select>,
291
+                    )}
292
+                </Form.Item>
293
+                <Form.Item>
294
+                    <span style={{ marginRight: '10px' }}>结算时间</span>
295
+                    {getFieldDecorator('settlementTime')(
296
+                        <RangePicker placeholder={['开始时间', '结束时间']} />
297
+                    )}
298
+                </Form.Item>
299
+                <Form.Item>
300
+                    <Button type="primary" htmlType="submit" className={styles.searchBtn}>搜索</Button>
301
+                    <Button style={{ marginLeft: 8 }} onClick={handleReset}>重置</Button>
302
+                </Form.Item>
303
+            </Form>
304
+            <Button type="primary" className={styles.addBtn} onClick={e => handleShowModel()} style={{ marginLeft: '30px' }} >批量结算</Button>
305
+            <Table id='noticeTable' rowSelection={rowSelection} rowKey={r => r.contractId} dataSource={data.records} columns={columns} pagination={false} />
306
+            {/*  */}
307
+            <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
308
+                <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current} />
89 309
             </div>
310
+            <Modal
311
+                title="批量结算"
312
+                visible={visible}
313
+                onOk={handleOk}
314
+
315
+                onCancel={handleCancel}
316
+            // footer={null}
317
+            >
318
+                <p>确认结算所选{taContractList.length}份合同手续费?其中{checkData}份已结算过,若不想再结算,请取消勾选。</p>
319
+                <div>结算单价:<InputNumber defaultValue={0} precision={2} onChange={onChange} />元/份</div>
320
+
321
+
322
+
323
+            </Modal>
324
+
90 325
         </>
91 326
     )
92 327
 }

+ 48
- 0
src/services/apis.js Ver fichero

@@ -191,7 +191,55 @@ const apis = {
191 191
       method: 'GET',
192 192
       action: 'channel',
193 193
     },
194
+  },
195
+  relatedOrganization:{
196
+    get:{
197
+      url: `${prefix}/contract/listCompanyOrg`,
198
+      method: 'GET',
199
+      action: 'channel',
200
+    },
201
+    listCompany:{
202
+      url: `${prefix}/contract/listCompany`,
203
+      method: 'GET',
204
+      action: 'channel',
205
+    },
206
+    listOrg:{
207
+      url: `${prefix}/contract/listOrg`,
208
+      method: 'GET',
209
+      action: 'channel',
210
+    },
211
+    post:{
212
+      url: `${prefix}/contract/taCompanyOrg`,
213
+      method: 'post',
214
+      action: 'channel',
215
+    },
216
+    delete:{
217
+      url: `${prefix}/taCompanyOrg/:id`,
218
+      method: 'delete',
219
+      action: 'channel',
220
+
221
+    },
222
+ 
223
+  },
224
+  signedContract:{
225
+    get:{
226
+      url: `${prefix}/contract/list`,
227
+      method: 'GET',
228
+      action: 'channel',
229
+    },
230
+    check:{
231
+      url: `${prefix}/contract/checkBeforeBatchUpdatePrice`,
232
+      method: 'post',
233
+      action: 'channel',
234
+    },
235
+    put: {
236
+      url: `${prefix}/contract/batchUpdatePrice`,
237
+      method: 'put',
238
+      action: 'channel',
239
+    },
240
+    
194 241
   }
242
+
195 243
   
196 244
 }
197 245