zhoulisen 5 年前
父节点
当前提交
fefec21a4a

+ 1
- 7
src/pages/eContract/relatedOrganization/add.jsx 查看文件

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

+ 0
- 8
src/pages/eContract/relatedOrganization/components/organization.jsx 查看文件

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

+ 39
- 44
src/pages/eContract/relatedOrganization/index.jsx 查看文件

@@ -9,9 +9,9 @@ import request from '../../../utils/request';
9 9
 import AuthButton from '@/components/AuthButton';
10 10
 
11 11
 function header(props) {
12
-    
12
+
13 13
     const [taNoticeList, setTaNoticeList] = useState([])
14
-    const [ data, setData ] = useState({})
14
+    const [data, setData] = useState({})
15 15
 
16 16
     useEffect(() => {
17 17
         getList({ pageNum: 1, pageSize: 10 });
@@ -25,33 +25,28 @@ function header(props) {
25 25
     }
26 26
 
27 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 39
         Modal.confirm({
45 40
             title: '删除后组织将不能使用企业电子签章,确认删除?',
46 41
             okText: '确定',
47 42
             cancelText: '取消',
48 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 45
                     message.info("操作成功")
51 46
                     getList({ pageNum: 1, pageSize: 10 });
52
-                  
53
-                  }).catch((err) => {
54
-                  })
47
+
48
+                }).catch((err) => {
49
+                })
55 50
             },
56 51
         });
57 52
     }
@@ -84,7 +79,7 @@ function header(props) {
84 79
             dataIndex: 'companyCode',
85 80
             key: 'companyCode',
86 81
             align: 'center',
87
-           
82
+
88 83
         },
89 84
         {
90 85
             title: '实名认证状态',
@@ -92,16 +87,16 @@ function header(props) {
92 87
             key: 'companyStatus',
93 88
             align: 'center',
94 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 102
             title: '关联组织名',
@@ -114,22 +109,22 @@ function header(props) {
114 109
             dataIndex: 'orgId',
115 110
             key: 'orgId',
116 111
             align: 'center',
117
-           
118
-        }, 
112
+
113
+        },
119 114
         {
120 115
             title: '小程序名称',
121 116
             dataIndex: 'miniAppName',
122 117
             key: 'miniAppName',
123 118
             align: 'center',
124
-            
119
+
125 120
         },
126
-        
121
+
127 122
         {
128 123
             title: '关联时间',
129 124
             dataIndex: 'createDate',
130 125
             key: 'createDate',
131 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 130
             title: '操作',
@@ -140,19 +135,19 @@ function header(props) {
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 140
                     </span>
146 141
 
147 142
                 </>
148 143
             ),
149 144
         },
150
-        
145
+
151 146
     ];
152 147
 
153
-     
148
+
154 149
     const { getFieldDecorator } = props.form
155
- 
150
+
156 151
     return (
157 152
 
158 153
         <>
@@ -210,11 +205,11 @@ function header(props) {
210 205
             </Form>
211 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 查看文件

@@ -57,11 +57,11 @@ function header(props) {
57 57
                     submitValue.settlementStartTime = null
58 58
                     submitValue.settlementEndTime = null
59 59
                 }
60
-              
60
+
61 61
                 getList({ pageNum: 1, pageSize: 10, ...submitValue });
62 62
             }
63 63
         });
64
-       
64
+
65 65
     }
66 66
 
67 67
     function handleReset() {
@@ -69,25 +69,33 @@ function header(props) {
69 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 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,7 +169,7 @@ function header(props) {
161 169
             dataIndex: 'settlement',
162 170
             key: 'settlement',
163 171
             align: 'center',
164
-        render: (x, row) =><><span>{row.settlement?'是':'否'}</span></>
172
+            render: (x, row) => <><span>{row.settlement ? '是' : '否'}</span></>
165 173
         },
166 174
         {
167 175
             title: '结算时间',
@@ -174,8 +182,8 @@ function header(props) {
174 182
             title: '结算单价',
175 183
             dataIndex: 'settlementPrice',
176 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,15 +194,15 @@ function header(props) {
186 194
             return
187 195
         }
188 196
         let count = 0
189
-        taContractList.map((x)=>{
190
-         
191
-            if(x.settlement) {
197
+        taContractList.map((x) => {
198
+
199
+            if (x.settlement) {
192 200
                 count++
193 201
             }
194 202
         })
195 203
         setCheckData(count)
196
-   
197
- setVisible(true);
204
+
205
+        setVisible(true);
198 206
 
199 207
     }
200 208
 
@@ -203,15 +211,13 @@ function header(props) {
203 211
     }
204 212
 
205 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 215
             message.info("操作成功")
210 216
             setVisible(false);
211 217
             getList({ pageNum: 1, pageSize: 10 })
212
-            
218
+
213 219
         })
214
-        
220
+
215 221
     }
216 222
 
217 223
 
@@ -316,7 +322,7 @@ function header(props) {
316 322
             // footer={null} 
317 323
             >
318 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