|
@@ -1,30 +1,22 @@
|
1
|
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';
|
|
2
|
+import { Form, Input, Button, Icon, Select, Table, Pagination, DatePicker } from 'antd';
|
5
|
3
|
import router from 'umi/router';
|
6
|
4
|
import moment from 'moment';
|
7
|
|
-import SelectCity from '../../../components/SelectButton/CitySelect'
|
8
|
|
-import BuildSelect from '../../../components/SelectButton/BuildSelect'
|
|
5
|
+import withActions from '@/components/ActionList';
|
|
6
|
+import EditIcon from '@/components/EditIcon';
|
|
7
|
+import AuthButton from '@/components/AuthButton';
|
|
8
|
+import styles from '../../style/GoodsList.less';
|
9
|
9
|
import apis from '../../../services/apis';
|
10
|
10
|
import request from '../../../utils/request';
|
11
|
11
|
|
12
|
12
|
|
13
|
|
-import AuthButton from '@/components/AuthButton';
|
14
|
|
-
|
15
|
|
-const { Option } = Select;
|
16
|
|
-const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
|
|
13
|
+const { RangePicker } = DatePicker;
|
17
|
14
|
|
18
|
15
|
const header = props => {
|
19
|
|
-
|
20
|
16
|
const [data, setData] = useState({})
|
21
|
17
|
|
22
|
|
-
|
23
|
18
|
useEffect(() => {
|
24
|
|
-
|
25
|
19
|
getList({ pageNum: 1, pageSize: 10 });
|
26
|
|
-
|
27
|
|
-
|
28
|
20
|
}, [])
|
29
|
21
|
|
30
|
22
|
// 查询列表
|
|
@@ -41,10 +33,10 @@ const header = props => {
|
41
|
33
|
router.push({
|
42
|
34
|
pathname: '/eContract/manage/edit',
|
43
|
35
|
query: {
|
44
|
|
- id: id,
|
|
36
|
+ id,
|
45
|
37
|
},
|
46
|
38
|
});
|
47
|
|
- return
|
|
39
|
+
|
48
|
40
|
}
|
49
|
41
|
}
|
50
|
42
|
|
|
@@ -121,11 +113,11 @@ const header = props => {
|
121
|
113
|
dataIndex: 'handle',
|
122
|
114
|
key: 'handle',
|
123
|
115
|
align: 'center',
|
124
|
|
- render: (text, row) => (
|
|
116
|
+ render: withActions((text, record) => [
|
125
|
117
|
<AuthButton name="admin.eContractManager.detail.get" noRight={null}>
|
126
|
|
- <a style={{ color: '#66B3FF' }} onClick={toDetail(row.contractId)} >查看详情</a>
|
127
|
|
- </AuthButton>
|
128
|
|
- ),
|
|
118
|
+ <EditIcon text="查看详情" type="look" onClick={toDetail(record.contractId)} />
|
|
119
|
+ </AuthButton>,
|
|
120
|
+ ]),
|
129
|
121
|
},
|
130
|
122
|
];
|
131
|
123
|
|
|
@@ -145,26 +137,25 @@ const header = props => {
|
145
|
137
|
e.preventDefault();
|
146
|
138
|
props.form.validateFields((err, values) => {
|
147
|
139
|
if (!err) {
|
148
|
|
- let {archivesDate, ...submitValue} = values
|
149
|
|
- if(null != archivesDate && archivesDate.length > 0){
|
|
140
|
+ const { archivesDate, ...submitValue } = values
|
|
141
|
+ if (null != archivesDate && archivesDate.length > 0) {
|
150
|
142
|
const [archivesStartDate, archivesEndDate] = archivesDate
|
151
|
143
|
submitValue.archivesStartDate = moment(archivesStartDate).format('YYYY-MM-DD');
|
152
|
144
|
submitValue.archivesEndDate = moment(archivesEndDate).format('YYYY-MM-DD');
|
153
|
|
- }
|
|
145
|
+ }
|
154
|
146
|
console.log(submitValue)
|
155
|
147
|
getList({ pageNum: 1, pageSize: 10, ...submitValue })
|
156
|
148
|
}
|
157
|
149
|
});
|
158
|
150
|
}
|
159
|
151
|
|
160
|
|
- //重置搜索
|
|
152
|
+ // 重置搜索
|
161
|
153
|
function handleReset() {
|
162
|
154
|
props.form.resetFields();
|
163
|
155
|
getList({ pageNum: 1, pageSize: 10 })
|
164
|
156
|
}
|
165
|
157
|
|
166
|
158
|
|
167
|
|
-
|
168
|
159
|
const { getFieldDecorator } = props.form
|
169
|
160
|
return (
|
170
|
161
|
|
|
@@ -200,8 +191,7 @@ const header = props => {
|
200
|
191
|
<option value="">全部</option>
|
201
|
192
|
<option value="1">是</option>
|
202
|
193
|
<option value="0">否</option>
|
203
|
|
-
|
204
|
|
- </Select>
|
|
194
|
+ </Select>,
|
205
|
195
|
)}
|
206
|
196
|
</Form.Item>
|
207
|
197
|
<Form.Item>
|
|
@@ -210,7 +200,7 @@ const header = props => {
|
210
|
200
|
<option value="">全部</option>
|
211
|
201
|
<option value="1">是</option>
|
212
|
202
|
<option value="0">否</option>
|
213
|
|
- </Select>
|
|
203
|
+ </Select>,
|
214
|
204
|
)}
|
215
|
205
|
</Form.Item>
|
216
|
206
|
<Form.Item>
|
|
@@ -219,14 +209,14 @@ const header = props => {
|
219
|
209
|
<option value="">全部</option>
|
220
|
210
|
<option value="1">是</option>
|
221
|
211
|
<option value="0">否</option>
|
222
|
|
- </Select>
|
|
212
|
+ </Select>,
|
223
|
213
|
)}
|
224
|
214
|
</Form.Item>
|
225
|
215
|
|
226
|
216
|
<Form.Item>
|
227
|
|
-
|
|
217
|
+
|
228
|
218
|
{getFieldDecorator('archivesDate')(
|
229
|
|
- <RangePicker placeholder={['归档开始时间', '归档结束时间']} />
|
|
219
|
+ <RangePicker placeholder={['归档开始时间', '归档结束时间']} />,
|
230
|
220
|
)}
|
231
|
221
|
</Form.Item>
|
232
|
222
|
<Form.Item>
|
|
@@ -242,9 +232,9 @@ const header = props => {
|
242
|
232
|
</AuthButton>
|
243
|
233
|
</Form.Item>
|
244
|
234
|
</Form>
|
245
|
|
-
|
246
|
|
-
|
247
|
|
- <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+ <Table style={{ marginTop: '30px' }} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
|
248
|
238
|
<div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
|
249
|
239
|
<Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
|
250
|
240
|
</div>
|