zhoulisen 5 years ago
parent
commit
fefec21a4a

+ 1
- 7
src/pages/eContract/relatedOrganization/add.jsx View File

37
       message.info("关联成功")
37
       message.info("关联成功")
38
       router.push({
38
       router.push({
39
         pathname: '/eContract/relatedOrganization',
39
         pathname: '/eContract/relatedOrganization',
40
-        query: {
41
-          //   salesBatchId: data.salesBatchId,
42
-        },
43
       });
40
       });
44
     }).catch((err) => {
41
     }).catch((err) => {
45
       message.info(err.msg || err.message)
42
       message.info(err.msg || err.message)
46
     })
43
     })
47
   }
44
   }
45
+
48
   const onChange = current => {
46
   const onChange = current => {
49
-    console.log('onChange:', current);
50
     setCurrent(current);
47
     setCurrent(current);
51
   };
48
   };
52
 
49
 
53
   const onChoiceEnt = (value) => {
50
   const onChoiceEnt = (value) => {
54
-    console.log("onChoiceEnt", value);
55
     ent = value.companyId
51
     ent = value.companyId
56
     setCurrent(1)
52
     setCurrent(1)
57
     setStatus({
53
     setStatus({
80
       >
76
       >
81
         <Step status={status.ent} title="选择已认证企业" disabled />
77
         <Step status={status.ent} title="选择已认证企业" disabled />
82
         <Step status={status.org} title="选择关联的组织" disabled />
78
         <Step status={status.org} title="选择关联的组织" disabled />
83
-        {/* <Step status="wait" title="Step 3" /> */}
84
-
85
       </Steps>
79
       </Steps>
86
 
80
 
87
     </div>
81
     </div>

+ 0
- 8
src/pages/eContract/relatedOrganization/components/organization.jsx View File

16
     const [ data, setData ] = useState({})
16
     const [ data, setData ] = useState({})
17
 
17
 
18
     useEffect(() => {
18
     useEffect(() => {
19
-        console.log('org')
20
         getList({ pageNum: 1, pageSize: 10 });
19
         getList({ pageNum: 1, pageSize: 10 });
21
     }, [])
20
     }, [])
22
     // 查询列表
21
     // 查询列表
41
     }
40
     }
42
 
41
 
43
     const choiceorg = value =>{
42
     const choiceorg = value =>{
44
-        console.log(value,'org')
45
         props.onChoiceOrg(value)
43
         props.onChoiceOrg(value)
46
     }
44
     }
47
 
45
 
117
                     <Button style={{ marginLeft: 8 }} onClick={handleReset}>重置</Button>
115
                     <Button style={{ marginLeft: 8 }} onClick={handleReset}>重置</Button>
118
                 </Form.Item>
116
                 </Form.Item>
119
             </Form>
117
             </Form>
120
-
121
-            
122
-
123
             <Table id='noticeTable' style={{ marginTop: '30px' }}  dataSource={data.records} columns={columns} pagination={false} />
118
             <Table id='noticeTable' style={{ marginTop: '30px' }}  dataSource={data.records} columns={columns} pagination={false} />
124
-
125
                 <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
119
                 <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
126
                     <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current} />
120
                     <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current} />
127
                 </div>
121
                 </div>
128
-
129
-
130
         </div>
122
         </div>
131
     </>)
123
     </>)
132
 }
124
 }

+ 39
- 44
src/pages/eContract/relatedOrganization/index.jsx View File

9
 import AuthButton from '@/components/AuthButton';
9
 import AuthButton from '@/components/AuthButton';
10
 
10
 
11
 function header(props) {
11
 function header(props) {
12
-    
12
+
13
     const [taNoticeList, setTaNoticeList] = useState([])
13
     const [taNoticeList, setTaNoticeList] = useState([])
14
-    const [ data, setData ] = useState({})
14
+    const [data, setData] = useState({})
15
 
15
 
16
     useEffect(() => {
16
     useEffect(() => {
17
         getList({ pageNum: 1, pageSize: 10 });
17
         getList({ pageNum: 1, pageSize: 10 });
25
     }
25
     }
26
 
26
 
27
     const toAdd = (id) => () => {
27
     const toAdd = (id) => () => {
28
-        
29
-            router.push({
30
-                pathname: '/eContract/relatedOrganization/add',
31
-                  query: {
32
-                    id
33
-                  },
34
-            });
35
-        
36
-    }
37
 
28
 
38
-    const onDelete = rowData =>  {
39
-        // if (taNoticeList.length < 1) {
40
-        //     message.error('请至少选择一条数据')
41
-        //     return
42
-        // }
29
+        router.push({
30
+            pathname: '/eContract/relatedOrganization/add',
31
+            query: {
32
+                id
33
+            },
34
+        });
43
 
35
 
36
+    }
37
+
38
+    const onDelete = rowData => {
44
         Modal.confirm({
39
         Modal.confirm({
45
             title: '删除后组织将不能使用企业电子签章,确认删除?',
40
             title: '删除后组织将不能使用企业电子签章,确认删除?',
46
             okText: '确定',
41
             okText: '确定',
47
             cancelText: '取消',
42
             cancelText: '取消',
48
             onOk() {
43
             onOk() {
49
-                request({ ...apis.relatedOrganization.delete, urlData: { id: rowData.companyOrgId }}).then((data) => {
44
+                request({ ...apis.relatedOrganization.delete, urlData: { id: rowData.companyOrgId } }).then((data) => {
50
                     message.info("操作成功")
45
                     message.info("操作成功")
51
                     getList({ pageNum: 1, pageSize: 10 });
46
                     getList({ pageNum: 1, pageSize: 10 });
52
-                  
53
-                  }).catch((err) => {
54
-                  })
47
+
48
+                }).catch((err) => {
49
+                })
55
             },
50
             },
56
         });
51
         });
57
     }
52
     }
84
             dataIndex: 'companyCode',
79
             dataIndex: 'companyCode',
85
             key: 'companyCode',
80
             key: 'companyCode',
86
             align: 'center',
81
             align: 'center',
87
-           
82
+
88
         },
83
         },
89
         {
84
         {
90
             title: '实名认证状态',
85
             title: '实名认证状态',
92
             key: 'companyStatus',
87
             key: 'companyStatus',
93
             align: 'center',
88
             align: 'center',
94
             render: (companyStatus) => <>
89
             render: (companyStatus) => <>
95
-            {companyStatus === 0 && <span>未认证</span>}
96
-            {companyStatus === 1 && <span>管理员资料已提交</span>}
97
-            {companyStatus === 2 && <span>企业基本资料(没有申请表)已提交</span>}
98
-            {companyStatus === 3 && <span>已提交待审核</span>}
99
-            {companyStatus === 4 && <span>审核通过</span>}
100
-            {companyStatus === 5 && <span>审核不通过</span>}
101
-            {companyStatus === 6 && <span>人工初核通过</span>}
102
-           
90
+                {companyStatus === 0 && <span>未认证</span>}
91
+                {companyStatus === 1 && <span>管理员资料已提交</span>}
92
+                {companyStatus === 2 && <span>企业基本资料(没有申请表)已提交</span>}
93
+                {companyStatus === 3 && <span>已提交待审核</span>}
94
+                {companyStatus === 4 && <span>审核通过</span>}
95
+                {companyStatus === 5 && <span>审核不通过</span>}
96
+                {companyStatus === 6 && <span>人工初核通过</span>}
97
+
103
             </>,
98
             </>,
104
-          
99
+
105
         },
100
         },
106
         {
101
         {
107
             title: '关联组织名',
102
             title: '关联组织名',
114
             dataIndex: 'orgId',
109
             dataIndex: 'orgId',
115
             key: 'orgId',
110
             key: 'orgId',
116
             align: 'center',
111
             align: 'center',
117
-           
118
-        }, 
112
+
113
+        },
119
         {
114
         {
120
             title: '小程序名称',
115
             title: '小程序名称',
121
             dataIndex: 'miniAppName',
116
             dataIndex: 'miniAppName',
122
             key: 'miniAppName',
117
             key: 'miniAppName',
123
             align: 'center',
118
             align: 'center',
124
-            
119
+
125
         },
120
         },
126
-        
121
+
127
         {
122
         {
128
             title: '关联时间',
123
             title: '关联时间',
129
             dataIndex: 'createDate',
124
             dataIndex: 'createDate',
130
             key: 'createDate',
125
             key: 'createDate',
131
             align: 'center',
126
             align: 'center',
132
-            render: (x, row) => <><span>{row.createDate?`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`:''}</span></>,
127
+            render: (x, row) => <><span>{row.createDate ? `${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>,
133
         },
128
         },
134
         {
129
         {
135
             title: '操作',
130
             title: '操作',
140
                 <>
135
                 <>
141
 
136
 
142
 
137
 
143
-                    <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={e=>onDelete(row)}>
144
-                    删除<Icon type="form" className={styles.edit} />
138
+                    <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={e => onDelete(row)}>
139
+                        删除<Icon type="form" className={styles.edit} />
145
                     </span>
140
                     </span>
146
 
141
 
147
                 </>
142
                 </>
148
             ),
143
             ),
149
         },
144
         },
150
-        
145
+
151
     ];
146
     ];
152
 
147
 
153
-     
148
+
154
     const { getFieldDecorator } = props.form
149
     const { getFieldDecorator } = props.form
155
- 
150
+
156
     return (
151
     return (
157
 
152
 
158
         <>
153
         <>
210
             </Form>
205
             </Form>
211
             <Button type="danger" className={styles.addBtn} onClick={toAdd()}>新增</Button>
206
             <Button type="danger" className={styles.addBtn} onClick={toAdd()}>新增</Button>
212
 
207
 
213
-            <Table id='noticeTable'   dataSource={data.records} columns={columns} pagination={false} />
208
+            <Table id='noticeTable' dataSource={data.records} columns={columns} pagination={false} />
214
 
209
 
215
-                <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
216
-                    <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current} />
217
-                </div>
210
+            <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
211
+                <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current} />
212
+            </div>
218
         </>
213
         </>
219
     )
214
     )
220
 }
215
 }

+ 40
- 34
src/pages/eContract/signedContract/index.jsx View File

57
                     submitValue.settlementStartTime = null
57
                     submitValue.settlementStartTime = null
58
                     submitValue.settlementEndTime = null
58
                     submitValue.settlementEndTime = null
59
                 }
59
                 }
60
-              
60
+
61
                 getList({ pageNum: 1, pageSize: 10, ...submitValue });
61
                 getList({ pageNum: 1, pageSize: 10, ...submitValue });
62
             }
62
             }
63
         });
63
         });
64
-       
64
+
65
     }
65
     }
66
 
66
 
67
     function handleReset() {
67
     function handleReset() {
69
         getList({ pageNum: 1, pageSize: 10 });
69
         getList({ pageNum: 1, pageSize: 10 });
70
     }
70
     }
71
 
71
 
72
-    const toDelBatch = rowData => () => {
73
-        // if (taContractList.length < 1) {
74
-        //     message.error('请至少选择一条数据')
75
-        //     return
76
-        // }
77
-
78
-        Modal.confirm({
79
-            title: '确认将所选数据删除?',
80
-            okText: '确定',
81
-            cancelText: '取消',
82
-            onOk() {
83
-            
84
-                console.log(price,'price')
85
-            },
86
-        });
87
-    }
88
-
89
     const changePageNum = pageNumber => {
72
     const changePageNum = pageNumber => {
90
-        getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
73
+
74
+        props.form.validateFields((err, values) => {
75
+            if (!err) {
76
+                let { signatoryTime, settlementTime, ...submitValue } = values
77
+                if (null != signatoryTime && signatoryTime.length > 0) {
78
+                    const [signatoryStartTime, signatoryEndTime] = signatoryTime
79
+                    submitValue.signatoryStartTime = moment(signatoryStartTime).format('YYYY-MM-DD');
80
+                    submitValue.signatoryEndTime = moment(signatoryEndTime).format('YYYY-MM-DD');
81
+                } else {
82
+                    submitValue.signatoryStartTime = null
83
+                    submitValue.signatoryEndTime = null
84
+                }
85
+
86
+                if (null != settlementTime && settlementTime.length > 0) {
87
+                    const [settlementStartTime, settlementEndTime] = settlementTime
88
+                    submitValue.settlementStartTime = moment(settlementStartTime).format('YYYY-MM-DD');
89
+                    submitValue.settlementEndTime = moment(settlementEndTime).format('YYYY-MM-DD');
90
+                } else {
91
+                    submitValue.settlementStartTime = null
92
+                    submitValue.settlementEndTime = null
93
+                }
94
+
95
+                getList({ pageNum: pageNumber, pageSize: 10, ...submitValue });
96
+            }
97
+        });
98
+        // getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
91
     }
99
     }
92
 
100
 
93
 
101
 
161
             dataIndex: 'settlement',
169
             dataIndex: 'settlement',
162
             key: 'settlement',
170
             key: 'settlement',
163
             align: 'center',
171
             align: 'center',
164
-        render: (x, row) =><><span>{row.settlement?'是':'否'}</span></>
172
+            render: (x, row) => <><span>{row.settlement ? '是' : '否'}</span></>
165
         },
173
         },
166
         {
174
         {
167
             title: '结算时间',
175
             title: '结算时间',
174
             title: '结算单价',
182
             title: '结算单价',
175
             dataIndex: 'settlementPrice',
183
             dataIndex: 'settlementPrice',
176
             key: 'settlementPrice',
184
             key: 'settlementPrice',
177
-         
178
-            render: (x, row) =><><span>{row.settlementPrice? `¥ ${row.settlementPrice/100}`.replace(/\B(?=(\d{3})+(?!\d))/g, ','):row.settlementPrice===0?0:''}</span></>
185
+
186
+            render: (x, row) => <><span>{row.settlementPrice ? `¥ ${row.settlementPrice / 100}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',') : row.settlementPrice === 0 ? 0 : ''}</span></>
179
         },
187
         },
180
     ];
188
     ];
181
 
189
 
186
             return
194
             return
187
         }
195
         }
188
         let count = 0
196
         let count = 0
189
-        taContractList.map((x)=>{
190
-         
191
-            if(x.settlement) {
197
+        taContractList.map((x) => {
198
+
199
+            if (x.settlement) {
192
                 count++
200
                 count++
193
             }
201
             }
194
         })
202
         })
195
         setCheckData(count)
203
         setCheckData(count)
196
-   
197
- setVisible(true);
204
+
205
+        setVisible(true);
198
 
206
 
199
     }
207
     }
200
 
208
 
203
     }
211
     }
204
 
212
 
205
     const handleOk = val => {
213
     const handleOk = val => {
206
-
207
-        console.log(price,'price')
208
-        request({ ...apis.signedContract.put, data:  { price: price||0, taContractList: taContractList }}).then(data => {
214
+        request({ ...apis.signedContract.put, data: { price: price || 0, taContractList: taContractList } }).then(data => {
209
             message.info("操作成功")
215
             message.info("操作成功")
210
             setVisible(false);
216
             setVisible(false);
211
             getList({ pageNum: 1, pageSize: 10 })
217
             getList({ pageNum: 1, pageSize: 10 })
212
-            
218
+
213
         })
219
         })
214
-        
220
+
215
     }
221
     }
216
 
222
 
217
 
223
 
316
             // footer={null} 
322
             // footer={null} 
317
             >
323
             >
318
                 <p>确认结算所选{taContractList.length}份合同手续费?其中{checkData}份已结算过,若不想再结算,请取消勾选。</p>
324
                 <p>确认结算所选{taContractList.length}份合同手续费?其中{checkData}份已结算过,若不想再结算,请取消勾选。</p>
319
-                <div style={{  marginTop: '50px',textAlign:'center' }}>结算单价:<InputNumber  style={{  marginLeft: '10px',width:'150px' }} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} defaultValue={0} precision={2} onChange={onChange} />元/份</div>
325
+                <div style={{ marginTop: '50px', textAlign: 'center' }}>结算单价:<InputNumber style={{ marginLeft: '10px', width: '150px' }} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} defaultValue={0} precision={2} onChange={onChange} />元/份</div>
320
 
326
 
321
 
327
 
322
 
328