zhoulisen 5 lat temu
rodzic
commit
1bc0f98c1b

+ 6
- 0
config/routes.js Wyświetl plik

@@ -689,6 +689,12 @@ export default [
689 689
                 name: '合同管理',
690 690
                 component: './eContract/manage/list',
691 691
               },
692
+              {
693
+                path: '/eContract/manage/edit',
694
+                name: '查看详情',
695
+                hideInMenu: true,
696
+                component: './eContract/manage/edit',
697
+              },
692 698
             ],
693 699
           },
694 700
           // {

+ 119
- 0
src/pages/eContract/manage/edit.jsx Wyświetl plik

@@ -0,0 +1,119 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker,Row,Col } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import Styles from './styles.less';
5
+import router from 'umi/router';
6
+import moment from 'moment';
7
+
8
+import apis from '../../../services/apis';
9
+import request from '../../../utils/request';
10
+
11
+
12
+import AuthButton from '@/components/AuthButton';
13
+
14
+ 
15
+const header = props => {
16
+
17
+    const [data, setData] = useState({})
18
+
19
+    useEffect(() => {
20
+   
21
+        // getList({ pageNum: 1, pageSize: 10});
22
+     
23
+      
24
+    }, [])
25
+
26
+const datas =[
27
+    {
28
+        name:"合同标题",
29
+        value:"432"
30
+    },
31
+    {
32
+        name:"关联业务类型",
33
+        value:"4324"
34
+    },
35
+    {
36
+        name:"业务类型",
37
+        value:"4324",
38
+        render:  <><span>111111111111111111</span></>
39
+    },
40
+    {
41
+        name:"关联单据类型",
42
+        value:"4324"
43
+    },
44
+    {
45
+        name:"关联单据编号",
46
+        value:"4324"
47
+    },
48
+    {
49
+        name:"甲方名称",
50
+        value:"4324",
51
+        render:  <><span>{moment().format('MMMM Do YYYY, h:mm:ss a')}</span></>
52
+    },
53
+    {
54
+        name:"甲方签署时间",
55
+        value:"4324"
56
+    },
57
+    {
58
+        name:"乙方名称",
59
+        value:"4324"
60
+    },
61
+    {
62
+        name:"乙方手机号",
63
+        value:"4324"
64
+    },
65
+    {
66
+        name:"乙方身份证号",
67
+        value:"4324"
68
+    },
69
+    {
70
+        name:"乙方签署时间",
71
+        value:"4324"
72
+    },
73
+    {
74
+        name:"已签署合同",
75
+        value:"4324",
76
+        render: (x, row) =><><Button type="primary" className={Styles.btn}>查看合同</Button> <span style={{color:'#1D74D9'}}>下载合同</span> </>
77
+    },
78
+    {
79
+        name:"是否归档",
80
+        value:"4324",
81
+        render: (x, row) =><><span>下载合同</span><span style={{color:'#1D74D9'}}>归档</span>  </>
82
+    },
83
+    {
84
+        name:"归档时间",
85
+        value:"4324"
86
+    },
87
+]
88
+
89
+  
90
+  return (
91
+
92
+    <>
93
+
94
+{datas.map((x) => {
95
+        return <Row style={{margin:'20px 0'}}>
96
+          
97
+          <Col span={5}  className={Styles.title} align="right" >
98
+           { x.name}
99
+          </Col>
100
+          <Col span={9}  offset={2} className={Styles.text}>
101
+            {
102
+            x.render  ?  typeof x.render === 'function' ? x.render(props) : x.render : x.value 
103
+            }
104
+              
105
+          </Col>
106
+          <Col span={2} offset={4}>
107
+
108
+          </Col>
109
+
110
+        </Row>
111
+      })}
112
+      <div align="center"><Button className={Styles.rebtn} >返回</Button></div>
113
+    
114
+    </>
115
+  )
116
+}
117
+
118
+
119
+export default header

+ 289
- 0
src/pages/eContract/manage/list.jsx Wyświetl plik

@@ -0,0 +1,289 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import styles from '../../style/GoodsList.less';
5
+import router from 'umi/router';
6
+import moment from 'moment';
7
+import SelectCity from '../../../components/SelectButton/CitySelect'
8
+import BuildSelect from '../../../components/SelectButton/BuildSelect'
9
+import apis from '../../../services/apis';
10
+import request from '../../../utils/request';
11
+
12
+
13
+import AuthButton from '@/components/AuthButton';
14
+
15
+const { Option } = Select;
16
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
17
+
18
+const header = props => {
19
+  const sampleId  = props.location.query.id;
20
+  const sampleName = props.location.query.sampleName;
21
+  const [data, setData] = useState({})
22
+  const [demend, setDemend] = useState({})
23
+  const [demandIds, setDemandIds] = useState([])
24
+
25
+
26
+  useEffect(() => {
27
+   
28
+      getList({ pageNum: 1, pageSize: 10});
29
+   
30
+    
31
+  }, [])
32
+
33
+  // 查询列表
34
+  const getList = (params) => {
35
+    // console.log(params);
36
+    // request({ ...apis.taH5SampleManager.taH5Demand, params: { ...params } }).then((data) => {
37
+    //   console.log(data)
38
+    //   setData(data)
39
+    // })
40
+  }
41
+
42
+  // 跳转到编辑
43
+  const toDetail = rowData => () => {
44
+    // if(rowData) {
45
+    //   router.push({
46
+    //   pathname: '/h5SampleManager/h5Demand/detail',
47
+    //   query: {
48
+    //     id: rowData.demandId,
49
+    //   },
50
+    // });
51
+    //   return
52
+    // }
53
+  }
54
+
55
+  /**
56
+   *
57
+   *
58
+   * @param {*} props
59
+   * @returns
60
+   */
61
+
62
+  const columns = [
63
+    {
64
+      title: '合同标题',
65
+      dataIndex: 'sampleName',
66
+      key: 'sampleName',
67
+      align: 'center',
68
+    },
69
+    {
70
+      title: '甲方名称',
71
+      dataIndex: 'orderer',
72
+      key: 'orderer',
73
+      align: 'center',
74
+      
75
+    },
76
+    {
77
+      title: '甲方是否签署',
78
+      dataIndex: 'phone',
79
+      key: 'phone',
80
+      align: 'center',
81
+    },
82
+    {
83
+      title: '甲方签署时间',
84
+      dataIndex: 'createDate',
85
+      key: 'createDate',
86
+      align: 'center',
87
+      render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>
88
+    },
89
+    {
90
+        title: '乙方名称',
91
+        dataIndex: 'orderer',
92
+        key: 'orderer',
93
+        align: 'center',
94
+        
95
+      },
96
+    {
97
+      title: '乙方是否签署',
98
+      dataIndex: 'demandStatus',
99
+      key: 'demandStatus',
100
+      align: 'center',
101
+      
102
+    },
103
+    {
104
+        title: '乙方签署时间',
105
+        dataIndex: 'createDate',
106
+        key: 'createDate',
107
+        align: 'center',
108
+        render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>
109
+      },
110
+      {
111
+        title: '是否归档',
112
+        dataIndex: 'demandStatus',
113
+        key: 'demandStatus',
114
+        align: 'center',
115
+        
116
+      },
117
+      {
118
+        title: '归档时间',
119
+        dataIndex: 'createDate',
120
+        key: 'createDate',
121
+        align: 'center',
122
+        render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>
123
+      },
124
+    {
125
+      title: '操作',
126
+      dataIndex: 'handle',
127
+      key: 'handle',
128
+      align: 'center',
129
+      render: (text, record) => (
130
+        <AuthButton name="admin.h5Demand.detail.get" noRight={null}>
131
+          <a style={{ color: '#66B3FF' }} onClick={toDetail(record)} >查看详情</a>
132
+        </AuthButton>
133
+      ),
134
+    },
135
+  ];
136
+  
137
+  const rowSelection = {
138
+    onChange: (selectedRowKeys, selectedRows) => {
139
+      console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
140
+      setDemandIds(selectedRows)
141
+    },
142
+  };
143
+
144
+  const changePageNum = pageNumber => {
145
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
146
+  }
147
+
148
+  // 提交事件
149
+  const handleSubmit = (e, props) => {
150
+    e.preventDefault();
151
+    // props.form.validateFields((err, values) => {
152
+    //   if (!err) {
153
+        
154
+    //     if (values.startCreateDate != null){
155
+    //       values.startCreateDate = moment(values.startCreateDate).format('YYYY-MM-DD HH:mm:ss')
156
+    //     }
157
+    //     if (values.endCreateDate != null){
158
+    //       values.endCreateDate = moment(values.endCreateDate).format('YYYY-MM-DD HH:mm:ss')
159
+    //     }
160
+    //     getList({ pageNum: 1, pageSize: 10, ...values })
161
+    //   }
162
+    // });
163
+  }
164
+
165
+  //重置搜索
166
+  function handleReset () {
167
+    props.form.resetFields();
168
+    getList({ pageNum: 1, pageSize: 10 })
169
+  }
170
+
171
+//   function showBatchDel(e){
172
+  
173
+//     if (demandIds.length <= 0){
174
+//       message.info("请选择数据");
175
+//       return;
176
+//     }
177
+//     setBatchDel(e);
178
+//     if(!e.visable){
179
+//       getList()
180
+//     }
181
+//   }
182
+
183
+
184
+
185
+  const { getFieldDecorator } = props.form
186
+  return (
187
+
188
+    <>
189
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
190
+        <Form.Item>
191
+          {getFieldDecorator('sampleName',{
192
+            initialValue: sampleName
193
+          })(
194
+            <Input
195
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
196
+            placeholder="请输入合同标题"
197
+          />,
198
+          )}
199
+        </Form.Item>
200
+        <Form.Item>
201
+          {getFieldDecorator('orderer')(
202
+            <Input
203
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
204
+            placeholder="请输入甲方名称"
205
+          />,
206
+          )}
207
+        </Form.Item>
208
+        <Form.Item>
209
+          {getFieldDecorator('phone')(
210
+            <Input
211
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
212
+              placeholder="请输入乙方名称"
213
+            />,
214
+          )}
215
+        </Form.Item>
216
+        <Form.Item>
217
+          {getFieldDecorator('demandStatus')(
218
+            <Select style={{ width: '180px' }} placeholder="甲方是否签署">
219
+                <option value="">全部</option>
220
+                <option value="1">已提交</option>
221
+                <option value="2">处理中</option>
222
+                <option value="3">已交付</option>
223
+                <option value="4">作废</option>
224
+            </Select>
225
+          )}
226
+        </Form.Item>
227
+        <Form.Item>
228
+          {getFieldDecorator('demandStatus')(
229
+            <Select style={{ width: '180px' }} placeholder="乙方是否签署">
230
+                <option value="">全部</option>
231
+                <option value="1">已提交</option>
232
+                <option value="2">处理中</option>
233
+                <option value="3">已交付</option>
234
+                <option value="4">作废</option>
235
+            </Select>
236
+          )}
237
+        </Form.Item>
238
+        <Form.Item>
239
+          {getFieldDecorator('demandStatus')(
240
+            <Select style={{ width: '180px' }} placeholder="是否归档">
241
+                <option value="">全部</option>
242
+                <option value="1">已提交</option>
243
+             
244
+            </Select>
245
+          )}
246
+        </Form.Item>
247
+        <Form.Item>
248
+          {getFieldDecorator('startCreateDate')(
249
+            <DatePicker showTime={{ format: 'HH:mm:ss' }} placeholder="归档开始时间"/>,
250
+          )}
251
+        </Form.Item>
252
+        <Form.Item>
253
+          {getFieldDecorator('endCreateDate')(
254
+            <DatePicker showTime={{ format: 'HH:mm:ss' }} placeholder="归档结束时间"/>,
255
+          )}
256
+        </Form.Item>  
257
+       
258
+        <Form.Item>
259
+            <AuthButton name="admin.taShareActivity.search" noRight={null}>
260
+                <Button type="primary" htmlType="submit" className={styles.searchBtn}>
261
+                    搜索
262
+                </Button>
263
+            </AuthButton>
264
+            <AuthButton name="admin.taShareActivity.search" noRight={null}>
265
+                <Button style={{ marginLeft: 8 }} onClick={handleReset}>
266
+                        重置
267
+                </Button>
268
+            </AuthButton>
269
+        </Form.Item>
270
+      </Form>
271
+      <AuthButton name="admin.h5Demand.add.post" noRight={null}>
272
+        {/* <Button type="danger" onClick={() => addDemandInfo({visable:true})} className={styles.addBtn}>新增</Button> */}
273
+      </AuthButton>
274
+      <AuthButton name="admin.h5Demand.del" noRight={null}>
275
+        {/* <Button type="primary" onClick={() => showBatchDel({visable:true, demandIds: demandIds})} className={styles.addBtn} style={{marginLeft:'30px'}}>删除</Button> */}
276
+      </AuthButton>
277
+      {/* <AddDemand visible={addDemand.visable} onCancel={() => addDemandInfo({visable:false})}></AddDemand> */}
278
+      {/* <BatchDel visible={batchDel.visable} demandIds={batchDel.demandIds} onCancel={() => showBatchDel({visable:false, demandIds: ''})} onSuccess={() => showBatchDel({visable:false, demandIds:'' })}/> */}
279
+      <Table 
280
+        style={{marginTop:'30px'}} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
281
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
282
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
283
+      </div>
284
+    </>
285
+  )
286
+}
287
+const WrappedHeader = Form.create({ name: 'header' })(header);
288
+
289
+export default WrappedHeader

+ 41
- 0
src/pages/eContract/manage/styles.less Wyświetl plik

@@ -0,0 +1,41 @@
1
+.title {
2
+    height     : 45px;
3
+    font-size  : 20px;
4
+    font-family: PingFangSC-Regular, PingFang SC;
5
+    font-weight: 400;
6
+    color      : rgba(102, 102, 102, 1);
7
+    line-height: 45px;
8
+   
9
+}
10
+.text {
11
+    font-size  : 18px;
12
+    font-family: PingFangSC-Regular, PingFang SC;
13
+    font-weight: 400;
14
+    color      : rgba(51, 51, 51, 1);
15
+    line-height: 45px;
16
+}
17
+
18
+.btn {
19
+    width        : 140px;
20
+    height       : 45px;
21
+    background   : rgba(255, 126, 72, 1);
22
+    border-radius: 7px;
23
+    line-height  : 43px;
24
+    font-size    : 20px;
25
+    font-family  : PingFangSC-Regular, PingFang SC;
26
+    font-weight  : 400;
27
+    color        : rgba(255, 255, 255, 1);
28
+    
29
+}
30
+
31
+.rebtn {
32
+    width:140px;
33
+    height:45px;
34
+    background:rgba(255,255,255,1);
35
+    border-radius:7px;
36
+    border:1px solid rgba(156,156,156,1);
37
+    font-size:20px;
38
+font-weight:400;
39
+color:rgba(102,102,102,1);
40
+line-height:28px;
41
+}

+ 4
- 0
src/services/apis.js Wyświetl plik

@@ -1466,4 +1466,8 @@ export default {
1466 1466
       action: 'admin.taH5Demand.get',
1467 1467
     }
1468 1468
   },
1469
+  contract: {
1470
+   
1471
+    
1472
+  },
1469 1473
 }