|
@@ -23,7 +23,7 @@ function header(props) {
|
23
|
23
|
|
24
|
24
|
// 查询列表
|
25
|
25
|
const getList = (params) => {
|
26
|
|
- request({ ...apis.sample.list, params: { ...params } }).then((data) => {
|
|
26
|
+ request({ ...apis.company.list, params: { ...params } }).then((data) => {
|
27
|
27
|
console.log(data)
|
28
|
28
|
setData(data)
|
29
|
29
|
})
|
|
@@ -35,31 +35,14 @@ function header(props) {
|
35
|
35
|
e.preventDefault();
|
36
|
36
|
props.form.validateFields((err, values) => {
|
37
|
37
|
if (!err) {
|
38
|
|
- let {createDate, ...submitValue} = values
|
39
|
|
- if(null != createDate && createDate.length > 0){
|
40
|
|
- const [startCreateDate, endCreateDate] = createDate
|
41
|
|
- submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
|
42
|
|
- submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
|
43
|
|
- }else{
|
44
|
|
- submitValue.startCreateDate = null
|
45
|
|
- submitValue.endCreateDate = null
|
46
|
|
- }
|
47
|
|
- getList({ pageNum: 1, pageSize: 10, ...submitValue })
|
|
38
|
+ getList({ pageNum: 1, pageSize: 10, ...values })
|
48
|
39
|
}
|
49
|
40
|
});
|
50
|
41
|
}
|
51
|
42
|
|
52
|
43
|
const changePageNum = (pageNumber) => {
|
53
|
|
- let {createDate, ...submitValue} = props.form.getFieldsValue()
|
54
|
|
- if(null != createDate && createDate.length > 0){
|
55
|
|
- const [startCreateDate, endCreateDate] = createDate
|
56
|
|
- submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
|
57
|
|
- submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
|
58
|
|
- }else{
|
59
|
|
- submitValue.startCreateDate = null
|
60
|
|
- submitValue.endCreateDate = null
|
61
|
|
- }
|
62
|
|
- getList({ pageNum: pageNumber, pageSize: 10, ...submitValue })
|
|
44
|
+ let values = props.form.getFieldsValue()
|
|
45
|
+ getList({ pageNum: pageNumber, pageSize: 10, ...values })
|
63
|
46
|
}
|
64
|
47
|
|
65
|
48
|
const rowSelection = {
|
|
@@ -71,9 +54,9 @@ function header(props) {
|
71
|
54
|
|
72
|
55
|
|
73
|
56
|
// 跳转到编辑资讯
|
74
|
|
- const toEditDemand = (id) => () => {
|
|
57
|
+ const toEditCompany = (id) => () => {
|
75
|
58
|
router.push({
|
76
|
|
- pathname: '/sample/demand/edit',
|
|
59
|
+ pathname: '/eContract/company/edit',
|
77
|
60
|
query: {
|
78
|
61
|
id
|
79
|
62
|
},
|
|
@@ -81,6 +64,14 @@ function header(props) {
|
81
|
64
|
}
|
82
|
65
|
|
83
|
66
|
|
|
67
|
+ // 跳转到编辑资讯
|
|
68
|
+ const toAddCompany = () => {
|
|
69
|
+ router.push({
|
|
70
|
+ pathname: '/eContract/company/add',
|
|
71
|
+ });
|
|
72
|
+ }
|
|
73
|
+
|
|
74
|
+
|
84
|
75
|
const changeStatus = () => {
|
85
|
76
|
if(demandIdList.length < 1){
|
86
|
77
|
message.error('请先选择要删除的数据!')
|
|
@@ -112,35 +103,34 @@ function header(props) {
|
112
|
103
|
const columns = [
|
113
|
104
|
{
|
114
|
105
|
title: '企业名称',
|
115
|
|
- dataIndex: 'sampleName',
|
116
|
|
- key: 'sampleName',
|
|
106
|
+ dataIndex: 'companyName',
|
|
107
|
+ key: 'companyName',
|
117
|
108
|
align: 'center',
|
118
|
109
|
},
|
119
|
110
|
{
|
120
|
111
|
title: '企业编号',
|
121
|
|
- dataIndex: 'orgName',
|
122
|
|
- key: 'orgName',
|
|
112
|
+ dataIndex: 'companyCode',
|
|
113
|
+ key: 'companyCode',
|
123
|
114
|
align: 'center',
|
124
|
115
|
},
|
125
|
116
|
{
|
126
|
117
|
title: '法大大客户编号',
|
127
|
|
- dataIndex: 'orderer',
|
128
|
|
- key: 'orderer',
|
|
118
|
+ dataIndex: 'fadadaCode',
|
|
119
|
+ key: 'fadadaCode',
|
129
|
120
|
align: 'center',
|
130
|
121
|
|
131
|
122
|
},
|
132
|
123
|
{
|
133
|
124
|
title: '实名认证状态',
|
134
|
|
- dataIndex: 'phone',
|
135
|
|
- key: 'phone',
|
|
125
|
+ dataIndex: 'certifiedStatus',
|
|
126
|
+ key: 'certifiedStatus',
|
136
|
127
|
align: 'center',
|
137
|
128
|
},
|
138
|
129
|
{
|
139
|
130
|
title: '企业管理员身份',
|
140
|
|
- dataIndex: 'createDate',
|
141
|
|
- key: 'createDate',
|
|
131
|
+ dataIndex: 'companyManagerType',
|
|
132
|
+ key: 'companyManagerType',
|
142
|
133
|
align: 'center',
|
143
|
|
- render: (x, row) => <><span>{`${moment(row.createDate).format('YYYY-MM-DD HH:mm:ss')}`}</span></>,
|
144
|
134
|
},
|
145
|
135
|
{
|
146
|
136
|
title: '操作',
|
|
@@ -148,7 +138,7 @@ function header(props) {
|
148
|
138
|
key: 'handle',
|
149
|
139
|
align: 'center',
|
150
|
140
|
render: (x, row) => (
|
151
|
|
- <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditDemand(row.demandId)}>
|
|
141
|
+ <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={toEditCompany(row.companyId)}>
|
152
|
142
|
查看详情<Icon type="form" className={styles.edit} />
|
153
|
143
|
</span>
|
154
|
144
|
),
|
|
@@ -165,7 +155,7 @@ function header(props) {
|
165
|
155
|
<>
|
166
|
156
|
<Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
|
167
|
157
|
<Form.Item>
|
168
|
|
- {getFieldDecorator('sampleName')(
|
|
158
|
+ {getFieldDecorator('companyName')(
|
169
|
159
|
<Input
|
170
|
160
|
prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
|
171
|
161
|
placeholder="企业名称"
|
|
@@ -173,7 +163,7 @@ function header(props) {
|
173
|
163
|
)}
|
174
|
164
|
</Form.Item>
|
175
|
165
|
<Form.Item>
|
176
|
|
- {getFieldDecorator('orgName')(
|
|
166
|
+ {getFieldDecorator('companyCode')(
|
177
|
167
|
<Input
|
178
|
168
|
prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
|
179
|
169
|
placeholder="企业编号"
|
|
@@ -181,7 +171,7 @@ function header(props) {
|
181
|
171
|
)}
|
182
|
172
|
</Form.Item>
|
183
|
173
|
<Form.Item>
|
184
|
|
- {getFieldDecorator('demandStatus')(
|
|
174
|
+ {getFieldDecorator('certifiedStatus')(
|
185
|
175
|
<Select style={{ width: '180px' }} placeholder="实名认证状态">
|
186
|
176
|
<Select.Option value="1">未认证</Select.Option>
|
187
|
177
|
<Select.Option value="2">管理员资料已提交</Select.Option>
|
|
@@ -203,7 +193,10 @@ function header(props) {
|
203
|
193
|
</Form.Item>
|
204
|
194
|
</Form>
|
205
|
195
|
<AuthButton name="admin.taNewsType.post" noRight={null}>
|
206
|
|
- <Button type="danger" className={styles.addBtn} onClick={changeStatus}>删除</Button>
|
|
196
|
+ <Button type="danger" className={styles.addBtn} onClick={toAddCompany}>新增</Button>
|
|
197
|
+ </AuthButton>
|
|
198
|
+ <AuthButton name="admin.taNewsType.post" noRight={null}>
|
|
199
|
+ <Button type="danger" style={{ marginLeft: 15 }} onClick={changeStatus}>删除</Button>
|
207
|
200
|
</AuthButton>
|
208
|
201
|
<Table rowSelection={rowSelection} rowKey="newsType" dataSource={data.records} columns={columns} pagination={false} />
|
209
|
202
|
<div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
|