|
@@ -18,8 +18,8 @@ class ModalTable extends React.Component {
|
18
|
18
|
constructor(props) {
|
19
|
19
|
super(props);
|
20
|
20
|
this.state = {
|
21
|
|
- dataSource: { records: [] },
|
22
|
|
- visibleData: { visible: false, customerId: '', realtyConsultant: '' },
|
|
21
|
+ dataSource: { records: [] },
|
|
22
|
+ visibleData: { visible: false, customerId: '', realtyConsultant: '' },
|
23
|
23
|
}
|
24
|
24
|
}
|
25
|
25
|
|
|
@@ -69,7 +69,7 @@ class ModalTable extends React.Component {
|
69
|
69
|
})
|
70
|
70
|
}
|
71
|
71
|
|
72
|
|
- // 分页
|
|
72
|
+ // 分页
|
73
|
73
|
onChange(pageNum) {
|
74
|
74
|
this.getList({ pageNumber: pageNum, pageSize: 5 })
|
75
|
75
|
}
|
|
@@ -79,7 +79,7 @@ class ModalTable extends React.Component {
|
79
|
79
|
{
|
80
|
80
|
title: '头像',
|
81
|
81
|
// eslint-disable-next-line jsx-a11y/alt-text
|
82
|
|
- render: (text, records) => <img src={records.picture } width={50} height={50} />,
|
|
82
|
+ render: (text, records) => <img src={records.picture} width={50} height={50} />,
|
83
|
83
|
},
|
84
|
84
|
{
|
85
|
85
|
title: '用户名',
|
|
@@ -95,7 +95,7 @@ class ModalTable extends React.Component {
|
95
|
95
|
title: '性别',
|
96
|
96
|
dataIndex: 'sex',
|
97
|
97
|
key: 'sex',
|
98
|
|
- render: (text, records) => <span>{ records.sex === 1 ? '男' : '女' }</span>,
|
|
98
|
+ render: (text, records) => <span>{records.sex === 1 ? '男' : '女'}</span>,
|
99
|
99
|
},
|
100
|
100
|
{
|
101
|
101
|
title: '意向项目',
|
|
@@ -111,29 +111,29 @@ class ModalTable extends React.Component {
|
111
|
111
|
title: '状态',
|
112
|
112
|
// eslint-disable-next-line consistent-return
|
113
|
113
|
render: (text, records) => {
|
114
|
|
- if (records.status === 1) { return '报备' }
|
115
|
|
- if (records.status === 2) { return '到访' }
|
116
|
|
- if (records.status === 3) { return '认购' }
|
117
|
|
- if (records.status === 4) { return '签约' }
|
118
|
|
- if (records.verifyStatus === 1) { return '待审核' }
|
119
|
|
- if (records.verifyStatus === 2) { return '审核同意' }
|
120
|
|
- if (records.verifyStatus === 3) { return '签约' }
|
121
|
|
- },
|
|
114
|
+ if (records.status === 1) { return '报备' }
|
|
115
|
+ if (records.status === 2) { return '到访' }
|
|
116
|
+ if (records.status === 3) { return '认购' }
|
|
117
|
+ if (records.status === 4) { return '签约' }
|
|
118
|
+ if (records.verifyStatus === 1) { return '待审核' }
|
|
119
|
+ if (records.verifyStatus === 2) { return '审核同意' }
|
|
120
|
+ if (records.verifyStatus === 3) { return '签约' }
|
|
121
|
+ },
|
122
|
122
|
},
|
123
|
123
|
]
|
124
|
124
|
return (
|
125
|
125
|
<>
|
126
|
126
|
<Modal
|
127
|
|
- title="推荐客户"
|
128
|
|
- destroyOnClose="true"
|
129
|
|
- width={900}
|
130
|
|
- footer={null}
|
131
|
|
- visible={this.state.visibleData.visible}
|
132
|
|
- // onOk={() => this.handleOk()}
|
133
|
|
- onCancel={(e) => this.handleCancel(e)}
|
134
|
|
- >
|
135
|
|
- <Table rowKey="independentList" dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
|
136
|
|
- </Modal>
|
|
127
|
+ title="推荐客户"
|
|
128
|
+ destroyOnClose="true"
|
|
129
|
+ width={900}
|
|
130
|
+ footer={null}
|
|
131
|
+ visible={this.state.visibleData.visible}
|
|
132
|
+ // onOk={() => this.handleOk()}
|
|
133
|
+ onCancel={(e) => this.handleCancel(e)}
|
|
134
|
+ >
|
|
135
|
+ <Table rowKey="independentList" dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
|
|
136
|
+ </Modal>
|
137
|
137
|
</>
|
138
|
138
|
);
|
139
|
139
|
}
|
|
@@ -147,8 +147,8 @@ class InviteTable extends React.Component {
|
147
|
147
|
constructor(props) {
|
148
|
148
|
super(props);
|
149
|
149
|
this.state = {
|
150
|
|
- dataSource: { records: [] },
|
151
|
|
- visibleData: { visible: false, customerId: '', realtyConsultant: '' },
|
|
150
|
+ dataSource: { records: [] },
|
|
151
|
+ visibleData: { visible: false, customerId: '', realtyConsultant: '' },
|
152
|
152
|
}
|
153
|
153
|
}
|
154
|
154
|
|
|
@@ -178,7 +178,7 @@ class InviteTable extends React.Component {
|
178
|
178
|
}
|
179
|
179
|
|
180
|
180
|
getList(params) {
|
181
|
|
- const { customerId } = this.props.visibleData
|
|
181
|
+ const { customerId } = this.props.visibleData
|
182
|
182
|
if (customerId === '' || customerId === undefined) {
|
183
|
183
|
return
|
184
|
184
|
}
|
|
@@ -197,7 +197,7 @@ class InviteTable extends React.Component {
|
197
|
197
|
})
|
198
|
198
|
}
|
199
|
199
|
|
200
|
|
- // 分页
|
|
200
|
+ // 分页
|
201
|
201
|
onChange(pageNum) {
|
202
|
202
|
this.getList({ pageNumber: pageNum, pageSize: 5 })
|
203
|
203
|
}
|
|
@@ -209,7 +209,7 @@ class InviteTable extends React.Component {
|
209
|
209
|
dataIndex: 'img',
|
210
|
210
|
key: 'img',
|
211
|
211
|
align: 'center',
|
212
|
|
- render: (text, record) => <img src={record.avatarurl} width = {50} height = {50}/>,
|
|
212
|
+ render: (text, record) => <img src={record.avatarurl} width={50} height={50} />,
|
213
|
213
|
},
|
214
|
214
|
{
|
215
|
215
|
title: '用户姓名',
|
|
@@ -229,22 +229,22 @@ class InviteTable extends React.Component {
|
229
|
229
|
dataIndex: 'sex',
|
230
|
230
|
key: 'sex',
|
231
|
231
|
align: 'center',
|
232
|
|
- render: (text, list) => <span>{ list.sex === 1 ? '男' : '女' }</span>,
|
|
232
|
+ render: (text, list) => <span>{list.sex === 1 ? '男' : '女'}</span>,
|
233
|
233
|
},
|
234
|
234
|
]
|
235
|
235
|
return (
|
236
|
236
|
<>
|
237
|
237
|
<Modal
|
238
|
|
- title="推荐客户"
|
239
|
|
- destroyOnClose="true"
|
240
|
|
- width={900}
|
241
|
|
- footer={null}
|
242
|
|
- visible={this.state.visibleData.visible}
|
243
|
|
- // onOk={() => this.handleOk()}
|
244
|
|
- onCancel={(e) => this.handleCancel(e)}
|
245
|
|
- >
|
246
|
|
- <Table rowKey="independent" dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
|
247
|
|
- </Modal>
|
|
238
|
+ title="推荐客户"
|
|
239
|
+ destroyOnClose="true"
|
|
240
|
+ width={900}
|
|
241
|
+ footer={null}
|
|
242
|
+ visible={this.state.visibleData.visible}
|
|
243
|
+ // onOk={() => this.handleOk()}
|
|
244
|
+ onCancel={(e) => this.handleCancel(e)}
|
|
245
|
+ >
|
|
246
|
+ <Table rowKey="independent" dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
|
|
247
|
+ </Modal>
|
248
|
248
|
</>
|
249
|
249
|
);
|
250
|
250
|
}
|
|
@@ -318,7 +318,7 @@ function body(props) {
|
318
|
318
|
// 分页
|
319
|
319
|
function onChange(pageNum) {
|
320
|
320
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
321
|
|
- getList({ pageNumber: pageNum, pageSize: 10 })
|
|
321
|
+ getList({ pageNumber: pageNum, pageSize: 10 })
|
322
|
322
|
}
|
323
|
323
|
|
324
|
324
|
function toAudit(cuurentId) {
|
|
@@ -332,11 +332,11 @@ function body(props) {
|
332
|
332
|
|
333
|
333
|
function exportIndependen() {
|
334
|
334
|
request({ ...apis.customer.customerRecommendAgentsExport, responseType: 'blob' })
|
335
|
|
- .then(response => {
|
336
|
|
- download(response)
|
337
|
|
- }).catch(error => {
|
|
335
|
+ .then(response => {
|
|
336
|
+ download(response)
|
|
337
|
+ }).catch(error => {
|
338
|
338
|
|
339
|
|
- })
|
|
339
|
+ })
|
340
|
340
|
}
|
341
|
341
|
|
342
|
342
|
function download(data) {
|
|
@@ -374,13 +374,13 @@ function body(props) {
|
374
|
374
|
dataIndex: 'gender',
|
375
|
375
|
key: 'gender',
|
376
|
376
|
// eslint-disable-next-line no-nested-ternary
|
377
|
|
- render: (_, record) => <><span>{ record.gender === '1' ? '男' : record.gender === '2' ? '女' : '未知' }</span></>,
|
|
377
|
+ render: (_, record) => <><span>{record.gender === '1' ? '男' : record.gender === '2' ? '女' : '未知'}</span></>,
|
378
|
378
|
},
|
379
|
379
|
{
|
380
|
380
|
title: '类型',
|
381
|
381
|
dataIndex: 'personType',
|
382
|
382
|
key: 'personType',
|
383
|
|
- render: (_, record) => <><span>{ record.channelName !== null ? '渠道经纪人' : '独立经纪人' }</span></>,
|
|
383
|
+ render: (_, record) => <><span>{record.channelName !== null ? '渠道经纪人' : '独立经纪人'}</span></>,
|
384
|
384
|
},
|
385
|
385
|
{
|
386
|
386
|
title: '所属渠道',
|
|
@@ -412,7 +412,7 @@ function body(props) {
|
412
|
412
|
|
413
|
413
|
return (
|
414
|
414
|
<>
|
415
|
|
- <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
|
|
415
|
+ <Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{ display: 'flex', alignItems: 'center' }}>
|
416
|
416
|
<Form.Item>
|
417
|
417
|
{getFieldDecorator('name')(
|
418
|
418
|
<Input
|
|
@@ -429,19 +429,19 @@ function body(props) {
|
429
|
429
|
/>,
|
430
|
430
|
)}
|
431
|
431
|
</Form.Item>
|
432
|
|
- <Form.Item>
|
433
|
|
- <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
|
434
|
|
- 搜索
|
435
|
|
- </Button>
|
|
432
|
+ <Form.Item style={{ position:'absolute',right:'38px' }} >
|
|
433
|
+ <Button type="primary" htmlType="submit" >
|
|
434
|
+ 搜索
|
|
435
|
+ </Button>
|
436
|
436
|
</Form.Item>
|
437
|
437
|
</Form>
|
438
|
|
- <Button type="primary" onClick={() => exportIndependen()} className={Styles.SubmitButton} style={{ marginTop: '5px', marginBottom: '5px' }}>
|
439
|
|
- 导出数据
|
|
438
|
+ <Button type="primary" onClick={() => exportIndependen()} style={{ float: 'right', margin: '20px 0' }}>
|
|
439
|
+ 导出
|
440
|
440
|
</Button>
|
441
|
441
|
<Table rowKey="independentIndex" dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
|
442
|
|
- {/* 调整归属 */}
|
443
|
|
- <ModalTable visibleData={gVisibleData} />
|
444
|
|
- <InviteTable visibleData={gInviteData} />
|
|
442
|
+ {/* 调整归属 */}
|
|
443
|
+ <ModalTable visibleData={gVisibleData} />
|
|
444
|
+ <InviteTable visibleData={gInviteData} />
|
445
|
445
|
</>
|
446
|
446
|
);
|
447
|
447
|
}
|