|
@@ -22,7 +22,7 @@ const CustomerChange = (props) => {
|
22
|
22
|
};
|
23
|
23
|
|
24
|
24
|
const batchAssistConsultant = () => {
|
25
|
|
- if(selectIds.length < 1){
|
|
25
|
+ if (selectIds.length < 1) {
|
26
|
26
|
message.info("请至少选择一条数据");
|
27
|
27
|
return
|
28
|
28
|
}
|
|
@@ -30,10 +30,10 @@ const CustomerChange = (props) => {
|
30
|
30
|
}
|
31
|
31
|
|
32
|
32
|
const consulatanChange = (e) => {
|
33
|
|
- if(e){
|
34
|
|
- data.map(x =>{
|
|
33
|
+ if (e) {
|
|
34
|
+ data.map(x => {
|
35
|
35
|
selectIds.map(y => {
|
36
|
|
- if(x.customerId === y){
|
|
36
|
+ if (x.customerId === y) {
|
37
|
37
|
x.realtyConsultant = e.userId
|
38
|
38
|
x.moveUserId = e.userId
|
39
|
39
|
x.moveUserName = e.userName
|
|
@@ -46,9 +46,9 @@ const CustomerChange = (props) => {
|
46
|
46
|
}
|
47
|
47
|
|
48
|
48
|
//批量保存
|
49
|
|
- const batchSaveConsultant = () =>{
|
|
49
|
+ const batchSaveConsultant = () => {
|
50
|
50
|
const unMoveData = data.filter(x => !x.moveUserId)
|
51
|
|
- if(unMoveData.length > 0){
|
|
51
|
+ if (unMoveData.length > 0) {
|
52
|
52
|
message.info("存在未分配归属客户");
|
53
|
53
|
return
|
54
|
54
|
}
|
|
@@ -78,10 +78,16 @@ const CustomerChange = (props) => {
|
78
|
78
|
align: 'center',
|
79
|
79
|
},
|
80
|
80
|
{
|
81
|
|
- title: '状态',
|
82
|
|
- dataIndex: 'status',
|
83
|
|
- key: 'status',
|
|
81
|
+ title: '客户状态',
|
|
82
|
+ dataIndex: 'reportRecommendStatus',
|
|
83
|
+ key: 'reportRecommendStatus',
|
84
|
84
|
align: 'center',
|
|
85
|
+ render: (text, records) => {
|
|
86
|
+ if (records.status === 1) { return '报备' }
|
|
87
|
+ if (records.status === 2) { return '到访' }
|
|
88
|
+ if (records.status === 3) { return '认购' }
|
|
89
|
+ if (records.status === 4) { return '签约' }
|
|
90
|
+ },
|
85
|
91
|
},
|
86
|
92
|
{
|
87
|
93
|
title: '调整后归属',
|
|
@@ -93,17 +99,17 @@ const CustomerChange = (props) => {
|
93
|
99
|
|
94
|
100
|
useEffect(() => {
|
95
|
101
|
request({ ...apis.staff.check, params: { userId: props.userId, personId: props.consultantPersonId, buildingId: props.buildingId } }).then(data => {
|
96
|
|
- setData(data)
|
97
|
|
- })
|
|
102
|
+ setData(data)
|
|
103
|
+ })
|
98
|
104
|
}, [props.userId])
|
99
|
105
|
|
100
|
106
|
return (
|
101
|
107
|
<div>
|
102
|
|
- <Button type="primary" onClick={() => batchAssistConsultant()} style={{ float: 'right', margin: '20px 0', marginLeft: '20px', zIndex: 1 }}>分配置业顾问</Button>
|
103
|
|
- <Table rowSelection={rowSelection} dataSource={data} columns={columns} rowKey="customerId" pagination={false} scroll={{ y: 500 }}/>
|
104
|
|
- <BatchAssistConsultant visible={consultantVisible} userId={props.userId} buildingId={props.buildingId} onCancel={consulatanChange} />
|
105
|
|
- <Button type="primary" onClick={() => batchSaveConsultant()} style={{}}>保存</Button>
|
106
|
|
- <Button onClick={() => cancelConsultant()} style={{}}>取消</Button>
|
|
108
|
+ <Button type="primary" onClick={() => batchAssistConsultant()} style={{ float: 'right', margin: '20px 0', marginLeft: '20px', zIndex: 1 }}>分配置业顾问</Button>
|
|
109
|
+ <Table rowSelection={rowSelection} dataSource={data} columns={columns} rowKey="customerId" pagination={false} scroll={{ y: 500 }} />
|
|
110
|
+ <BatchAssistConsultant visible={consultantVisible} userId={props.userId} buildingId={props.buildingId} onCancel={consulatanChange} />
|
|
111
|
+ <div style={{ textAlign: 'center', marginTop: '16px' }}><Button type="primary" onClick={() => batchSaveConsultant()}>保存</Button>
|
|
112
|
+ <Button style={{ marginLeft: '10px' }} onClick={() => cancelConsultant()}>取消</Button></div>
|
107
|
113
|
</div>
|
108
|
114
|
)
|
109
|
115
|
}
|