zhoulisen 5 anni fa
parent
commit
040bf563fb

+ 2
- 2
src/pages/eContract/manage/edit.jsx Vedi File

@@ -99,7 +99,7 @@ const header = props => {
99 99
         {
100 100
             name: "已签署合同",
101 101
             // value:data.,
102
-            render: (x, row) => <><a href={data.contractViewUrl}><Button type="primary"  className={Styles.btn}>查看合同</Button></a> <a href={data.contractDownloadUrl} style={{ color: '#1D74D9',marginLeft:'30px' }}>下载合同</a> </>
102
+            render: (x, row) => <><a href={data.contractViewUrl} target = "_blank"><Button type="primary"  className={Styles.btn}>查看合同</Button></a> <a href={data.contractDownloadUrl} download="234.pdf" style={{ color: '#1D74D9',marginLeft:'30px' }}>下载合同</a> </>
103 103
         },
104 104
         {
105 105
             name: "是否归档",
@@ -136,7 +136,7 @@ const header = props => {
136 136
 
137 137
                 </Row>
138 138
             })}
139
-            <div align="center"><Button className={Styles.rebtn} >返回</Button></div>
139
+            <div align="center"><Button className={Styles.rebtn} onClick={()=>router.go(-1)}>返回</Button></div>
140 140
 
141 141
         </>
142 142
     )

+ 113
- 89
src/pages/eContract/manage/list.jsx Vedi File

@@ -21,10 +21,10 @@ const header = props => {
21 21
 
22 22
 
23 23
   useEffect(() => {
24
-   
25
-      getList({ pageNum: 1, pageSize: 10});
26
-   
27
-    
24
+
25
+    getList({ pageNum: 1, pageSize: 10 });
26
+
27
+
28 28
   }, [])
29 29
 
30 30
   // 查询列表
@@ -38,13 +38,13 @@ const header = props => {
38 38
 
39 39
   // 跳转到编辑
40 40
   const toDetail = id => () => {
41
-    if(id) {
41
+    if (id) {
42 42
       router.push({
43
-      pathname: '/eContract/manage/edit',
44
-      query: {
45
-        id: id,
46
-      },
47
-    });
43
+        pathname: '/eContract/manage/edit',
44
+        query: {
45
+          id: id,
46
+        },
47
+      });
48 48
       return
49 49
     }
50 50
   }
@@ -68,57 +68,59 @@ const header = props => {
68 68
       dataIndex: 'signatoryName',
69 69
       key: 'signatoryName',
70 70
       align: 'center',
71
-      
71
+
72 72
     },
73 73
     {
74 74
       title: '甲方是否签署',
75 75
       dataIndex: 'signatoryStatus',
76 76
       key: 'signatoryStatus',
77 77
       align: 'center',
78
+      render: (x, row) => <><span>{row.signatoryStatus === 1 ? '是' :  row.signatoryStatus===0?'否':''}</span></>
78 79
     },
79 80
     {
80 81
       title: '甲方签署时间',
81 82
       dataIndex: 'signatoryTime',
82 83
       key: 'signatoryTime',
83 84
       align: 'center',
84
-      render: (x, row) => <><span>{row.invalidTime?`${moment(row.signatoryTime).format('YYYY-MM-DD HH:mm:ss')}`:''}</span></>
85
+      render: (x, row) => <><span>{row.signatoryTime ? `${moment(row.signatoryTime).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>
85 86
     },
86 87
     {
87
-        title: '乙方名称',
88
-        dataIndex: 'customerName',
89
-        key: 'customerName',
90
-        align: 'center',
91
-        
92
-      },
88
+      title: '乙方名称',
89
+      dataIndex: 'customerName',
90
+      key: 'customerName',
91
+      align: 'center',
92
+
93
+    },
93 94
     {
94 95
       title: '乙方是否签署',
95 96
       dataIndex: 'demandStatus',
96 97
       key: 'demandStatus',
97 98
       align: 'center',
98
-      
99
+      render: (x, row) => <><span>{row.demandStatus === 1 ? '是' : row.demandStatus===0?'否':''}</span></>
100
+
99 101
     },
100 102
     {
101
-        title: '乙方签署时间',
102
-        dataIndex: 'customerTime',
103
-        key: 'customerTime',
104
-        align: 'center',
105
-        render: (x, row) => <><span>{row.invalidTime?`${moment(row.customerTime).format('YYYY-MM-DD HH:mm:ss')}`:''}</span></>
106
-      },
107
-      {
108
-        title: '是否归档',
109
-        dataIndex: 'archives',
110
-        key: 'archives',
111
-        align: 'center',
112
-        render: (x, row) =><><span>{row.archives?'是':'否'}</span></>
113
-        
114
-      },
115
-      {
116
-        title: '归档时间',
117
-        dataIndex: 'archivesTime',
118
-        key: 'archivesTime',
119
-        align: 'center',
120
-        render: (x, row) => <><span>{row.invalidTime?`${moment(row.archivesTime).format('YYYY-MM-DD HH:mm:ss')}`:''}</span></>
121
-      },
103
+      title: '乙方签署时间',
104
+      dataIndex: 'customerTime',
105
+      key: 'customerTime',
106
+      align: 'center',
107
+      render: (x, row) => <><span>{row.customerTime ? `${moment(row.customerTime).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>
108
+    },
109
+    {
110
+      title: '是否归档',
111
+      dataIndex: 'archives',
112
+      key: 'archives',
113
+      align: 'center',
114
+      render: (x, row) => <><span>{row.archives ? '是' : '否'}</span></>
115
+
116
+    },
117
+    {
118
+      title: '归档时间',
119
+      dataIndex: 'archivesTime',
120
+      key: 'archivesTime',
121
+      align: 'center',
122
+      render: (x, row) => <><span>{row.archivesTime ? `${moment(row.archivesTime).format('YYYY-MM-DD HH:mm:ss')}` : ''}</span></>
123
+    },
122 124
     {
123 125
       title: '操作',
124 126
       dataIndex: 'handle',
@@ -131,7 +133,7 @@ const header = props => {
131 133
       ),
132 134
     },
133 135
   ];
134
-  
136
+
135 137
   const rowSelection = {
136 138
     onChange: (selectedRowKeys, selectedRows) => {
137 139
       console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
@@ -146,37 +148,53 @@ const header = props => {
146 148
   // 提交事件
147 149
   const handleSubmit = (e, props) => {
148 150
     e.preventDefault();
151
+    props.form.validateFields((err, values) => {
152
+      if (!err) {
153
+        let {archivesDate, ...submitValue} = values
154
+        if(null != archivesDate && archivesDate.length > 0){
155
+          const [archivesStartDate, archivesEndDate] = archivesDate
156
+          submitValue.archivesStartDate = moment(archivesStartDate).format('YYYY-MM-DD');
157
+          submitValue.archivesEndDate = moment(archivesEndDate).format('YYYY-MM-DD');
158
+        }else{
159
+          submitValue.archivesStartDate = null
160
+          submitValue.archivesEndDate = null
161
+        }        
162
+        console.log(submitValue)
163
+        getList({ pageNum: 1, pageSize: 10, ...submitValue })
164
+      }
165
+    });
149 166
     // props.form.validateFields((err, values) => {
150 167
     //   if (!err) {
151
-        
152
-    //     if (values.startCreateDate != null){
153
-    //       values.startCreateDate = moment(values.startCreateDate).format('YYYY-MM-DD HH:mm:ss')
168
+
169
+    //     if (values.startCreateDate != null) {
170
+    //       values.archivesStartDate = moment(values.startCreateDate).format('YYYY-MM-DD HH:mm:ss')
154 171
     //     }
155
-    //     if (values.endCreateDate != null){
172
+    //     if (values.endCreateDate != null) {
156 173
     //       values.endCreateDate = moment(values.endCreateDate).format('YYYY-MM-DD HH:mm:ss')
157 174
     //     }
158 175
     //     getList({ pageNum: 1, pageSize: 10, ...values })
159 176
     //   }
160 177
     // });
178
+    // getList({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue() })
161 179
   }
162 180
 
163 181
   //重置搜索
164
-  function handleReset () {
182
+  function handleReset() {
165 183
     props.form.resetFields();
166 184
     getList({ pageNum: 1, pageSize: 10 })
167 185
   }
168 186
 
169
-//   function showBatchDel(e){
170
-  
171
-//     if (demandIds.length <= 0){
172
-//       message.info("请选择数据");
173
-//       return;
174
-//     }
175
-//     setBatchDel(e);
176
-//     if(!e.visable){
177
-//       getList()
178
-//     }
179
-//   }
187
+  //   function showBatchDel(e){
188
+
189
+  //     if (demandIds.length <= 0){
190
+  //       message.info("请选择数据");
191
+  //       return;
192
+  //     }
193
+  //     setBatchDel(e);
194
+  //     if(!e.visable){
195
+  //       getList()
196
+  //     }
197
+  //   }
180 198
 
181 199
 
182 200
 
@@ -186,21 +204,21 @@ const header = props => {
186 204
     <>
187 205
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
188 206
         <Form.Item>
189
-          {getFieldDecorator('contractName',{
207
+          {getFieldDecorator('contractName', {
190 208
             // initialValue: sampleName
191 209
           })(
192 210
             <Input
193
-            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
194
-            placeholder="合同标题"
195
-          />,
211
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
212
+              placeholder="合同标题"
213
+            />,
196 214
           )}
197 215
         </Form.Item>
198 216
         <Form.Item>
199 217
           {getFieldDecorator('signatoryName')(
200 218
             <Input
201
-            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
202
-            placeholder="请输入甲方名称"
203
-          />,
219
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
220
+              placeholder="请输入甲方名称"
221
+            />,
204 222
           )}
205 223
         </Form.Item>
206 224
         <Form.Item>
@@ -214,55 +232,61 @@ const header = props => {
214 232
         <Form.Item>
215 233
           {getFieldDecorator('customerStatus')(
216 234
             <Select style={{ width: '180px' }} placeholder="甲方是否签署">
217
-                <option value="2">全部</option>
218
-                <option value="1">已提交</option>
219
-                <option value="0">处理中</option>
220
-               
235
+              <option value="">全部</option>
236
+              <option value="1">是</option>
237
+              <option value="0">否</option>
238
+
221 239
             </Select>
222 240
           )}
223 241
         </Form.Item>
224 242
         <Form.Item>
225 243
           {getFieldDecorator('demandStatus')(
226 244
             <Select style={{ width: '180px' }} placeholder="乙方是否签署">
227
-                <option value="">全部</option>
228
-                <option value="1">已提交</option>
229
-                <option value="2">处理中</option>
230
-                <option value="3">已交付</option>
231
-                <option value="4">作废</option>
245
+              <option value="">全部</option>
246
+              <option value="1">是</option>
247
+              <option value="0">否</option>
232 248
             </Select>
233 249
           )}
234 250
         </Form.Item>
235 251
         <Form.Item>
236 252
           {getFieldDecorator('archives')(
237 253
             <Select style={{ width: '180px' }} placeholder="是否归档">
238
-                <option value="">全部</option>
239
-                <option value={true}>是</option>
240
-                <option value={false}>否</option>
254
+              <option value="">全部</option>
255
+              <option value={true}>是</option>
256
+              <option value={false}>否</option>
241 257
             </Select>
242 258
           )}
243 259
         </Form.Item>
260
+
244 261
         <Form.Item>
262
+        
263
+          {getFieldDecorator('archivesDate')(
264
+            <RangePicker placeholder={['归档开始时间', '归档结束时间']} />
265
+          )}
266
+        </Form.Item>
267
+
268
+        {/* <Form.Item>
245 269
           {getFieldDecorator('archivesStartDate')(
246
-            <DatePicker showTime={{ format: 'HH:mm:ss' }} placeholder="归档开始时间"/>,
270
+            <DatePicker showTime={{ format: 'HH:mm:ss' }} placeholder="归档开始时间" />,
247 271
           )}
248 272
         </Form.Item>
249 273
         <Form.Item>
250 274
           {getFieldDecorator('archivesEndDate')(
251
-            <DatePicker showTime={{ format: 'HH:mm:ss' }} placeholder="归档结束时间"/>,
275
+            <DatePicker showTime={{ format: 'HH:mm:ss' }} placeholder="归档结束时间" />,
252 276
           )}
253
-        </Form.Item>  
254
-       
277
+        </Form.Item> */}
278
+
255 279
         <Form.Item>
256
-            <AuthButton name="admin.taShareActivity.search" noRight={null}>
257
-                <Button type="primary" htmlType="submit" className={styles.searchBtn}>
258
-                    搜索
280
+          <AuthButton name="admin.taShareActivity.search" noRight={null}>
281
+            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
282
+              搜索
259 283
                 </Button>
260
-            </AuthButton>
261
-            <AuthButton name="admin.taShareActivity.search" noRight={null}>
262
-                <Button style={{ marginLeft: 8 }} onClick={handleReset}>
263
-                        重置
284
+          </AuthButton>
285
+          <AuthButton name="admin.taShareActivity.search" noRight={null}>
286
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
287
+              重置
264 288
                 </Button>
265
-            </AuthButton>
289
+          </AuthButton>
266 290
         </Form.Item>
267 291
       </Form>
268 292
       <AuthButton name="admin.h5Demand.add.post" noRight={null}>
@@ -273,7 +297,7 @@ const header = props => {
273 297
       </AuthButton>
274 298
       {/* <AddDemand visible={addDemand.visable} onCancel={() => addDemandInfo({visable:false})}></AddDemand> */}
275 299
       {/* <BatchDel visible={batchDel.visable} demandIds={batchDel.demandIds} onCancel={() => showBatchDel({visable:false, demandIds: ''})} onSuccess={() => showBatchDel({visable:false, demandIds:'' })}/> */}
276
-      <Table  style={{marginTop:'30px'}} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
300
+      <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
277 301
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
278 302
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
279 303
       </div>

+ 0
- 0
src/pages/eContract/template/pdfDetail.jsx Vedi File