|
@@ -70,7 +70,16 @@ export default class Index extends Component {
|
70
|
70
|
this.setState({
|
71
|
71
|
intention: this.props.projectDetail.buildingName ? this.props.projectDetail.buildingName : this.props.proList.records[0].buildingName,
|
72
|
72
|
floor: this.props.projectDetail.buildingId ? this.props.projectDetail.buildingId : this.props.proList.records[0].buildingId
|
|
73
|
+ }, () => {
|
|
74
|
+ if (this.state.floorID != 0 || this.state.intention) {
|
|
75
|
+ this.loadCardList()
|
|
76
|
+ } else {
|
|
77
|
+ this.setState({
|
|
78
|
+ adviserArray: [{ name: '请选择', id: 0 }]
|
|
79
|
+ })
|
|
80
|
+ }
|
73
|
81
|
})
|
|
82
|
+
|
74
|
83
|
}
|
75
|
84
|
})
|
76
|
85
|
|
|
@@ -92,8 +101,12 @@ export default class Index extends Component {
|
92
|
101
|
const { recordId } = this.state
|
93
|
102
|
updatePoint(recordId)
|
94
|
103
|
}
|
|
104
|
+
|
95
|
105
|
loadData() {
|
|
106
|
+
|
96
|
107
|
this.loadAgentList()
|
|
108
|
+
|
|
109
|
+
|
97
|
110
|
this.loadSelectOpts()
|
98
|
111
|
}
|
99
|
112
|
loadAgentList() {
|
|
@@ -112,8 +125,17 @@ export default class Index extends Component {
|
112
|
125
|
})
|
113
|
126
|
})
|
114
|
127
|
|
|
128
|
+ }
|
|
129
|
+
|
|
130
|
+ loadCardList() {
|
|
131
|
+ const params = {
|
|
132
|
+ pageNumber: 1,
|
|
133
|
+ pageSize: 50,
|
|
134
|
+ buildingId: this.state.floor || this.props.projectDetail.buildingId
|
|
135
|
+ }
|
115
|
136
|
getCardList(params).then(res => {
|
116
|
137
|
res.records.unshift({ name: '请选择', id: 0 })
|
|
138
|
+ console.log(res, "res")
|
117
|
139
|
this.setState({
|
118
|
140
|
adviserArray: res.records
|
119
|
141
|
})
|
|
@@ -217,7 +239,7 @@ export default class Index extends Component {
|
217
|
239
|
this.Alert('请输入正确的手机号码');
|
218
|
240
|
return false;
|
219
|
241
|
}
|
220
|
|
- if (floor == "" ) {
|
|
242
|
+ if (floor == "") {
|
221
|
243
|
this.Alert("请选择意向楼盘");
|
222
|
244
|
return false;
|
223
|
245
|
}
|
|
@@ -241,7 +263,7 @@ export default class Index extends Component {
|
241
|
263
|
describe: remarks,//客户描述
|
242
|
264
|
realtyConsultant: adviser,//置业顾问
|
243
|
265
|
recommendPerson: personId,
|
244
|
|
- buildingId,
|
|
266
|
+ buildingId: buildingId || floor,
|
245
|
267
|
status: 1
|
246
|
268
|
}
|
247
|
269
|
recommendClient(param).then(res => {
|
|
@@ -279,7 +301,16 @@ export default class Index extends Component {
|
279
|
301
|
floorID: e.detail.value,
|
280
|
302
|
floor: ID,
|
281
|
303
|
floorColor: 'color:#000'
|
|
304
|
+ }, () => {
|
|
305
|
+ if (this.state.floorID != 0 || this.state.intention) {
|
|
306
|
+ this.loadCardList()
|
|
307
|
+ } else {
|
|
308
|
+ this.setState({
|
|
309
|
+ adviserArray: [{ name: '请选择', id: 0 }]
|
|
310
|
+ })
|
|
311
|
+ }
|
282
|
312
|
})
|
|
313
|
+
|
283
|
314
|
} else {
|
284
|
315
|
this.setState({
|
285
|
316
|
floorID: e.detail.value,
|
|
@@ -290,6 +321,7 @@ export default class Index extends Component {
|
290
|
321
|
}
|
291
|
322
|
// 置业顾问
|
292
|
323
|
bindAdviserChange(e) {
|
|
324
|
+
|
293
|
325
|
var index = e.detail.value;
|
294
|
326
|
var ID = this.state.adviserArray[index].id;
|
295
|
327
|
if (e.detail.value != 0) {
|
|
@@ -305,6 +337,7 @@ export default class Index extends Component {
|
305
|
337
|
adviserColor: 'color:#716D6D'
|
306
|
338
|
})
|
307
|
339
|
}
|
|
340
|
+
|
308
|
341
|
}
|
309
|
342
|
// 物业
|
310
|
343
|
bindPropertyChange(e) {
|
|
@@ -411,7 +444,6 @@ export default class Index extends Component {
|
411
|
444
|
</Picker>) : (<Input className="input customers__name" style='color:#999;' disabled='disabled' name="name" value={this.state.intention} onInput={this.bindFloorChange.bind(this)} placeholder="" />)
|
412
|
445
|
}
|
413
|
446
|
|
414
|
|
-
|
415
|
447
|
</View>
|
416
|
448
|
<View className='info info__4__1'>
|
417
|
449
|
<Text className='customers__txt'>置业顾问</Text>
|