|
@@ -411,29 +411,30 @@ export default class Index extends Component {
|
411
|
411
|
}
|
412
|
412
|
// 性别
|
413
|
413
|
radioChange(e) {
|
414
|
|
- console.log(e.detail.value)
|
415
|
414
|
this.setState({
|
416
|
415
|
sex: e.detail.value
|
417
|
416
|
})
|
418
|
417
|
}
|
419
|
|
- renderLogin () {
|
420
|
|
- return <Authorize from="/pages/agent/recommend/index"></Authorize>
|
|
418
|
+ renderLogin() {
|
|
419
|
+ const from = "/pages/agent/recommend/index"
|
|
420
|
+ return <Authorize from={from}></Authorize>
|
421
|
421
|
}
|
422
|
422
|
|
423
|
423
|
renderDetail() {
|
424
|
|
- const { reType } = this.state
|
|
424
|
+ const { reType, name, phone, floorArray, floorID, floorColor, intention, adviserArray, adviserID, adviserColor, remarks, radioList } = this.state
|
|
425
|
+
|
425
|
426
|
return (
|
426
|
427
|
<View className='recommend__customers'>
|
427
|
428
|
<View className='submit__infor ani'>
|
428
|
429
|
<View className='info info__1'>
|
429
|
430
|
<Text className='customers__txt'>客户姓名</Text>
|
430
|
|
- <Input className="input customers__name" name="name" data-id='name' value={this.state.name} onInput={this.BindInfo.bind(this)} placeholder="请输入" />
|
|
431
|
+ <Input className="input customers__name" name="name" data-id='name' value={name} onInput={this.BindInfo.bind(this)} placeholder="请输入" />
|
431
|
432
|
</View>
|
432
|
433
|
<View className='info info__2'>
|
433
|
434
|
<Text className='customers__txt'>客户性别</Text>
|
434
|
435
|
<View className='radio-list input'>
|
435
|
436
|
<RadioGroup onChange={this.radioChange}>
|
436
|
|
- {this.state.radioList.map((item, i) => {
|
|
437
|
+ {radioList.map((item, i) => {
|
437
|
438
|
return (
|
438
|
439
|
<Label className='radio-list__label' for={i} key={i}>
|
439
|
440
|
<Radio className='radio-list__radio' color={item.color} value={item.value} checked={item.checked} >{item.text}</Radio>
|
|
@@ -445,31 +446,31 @@ export default class Index extends Component {
|
445
|
446
|
</View>
|
446
|
447
|
<View className='info info__3'>
|
447
|
448
|
<Text className='customers__txt'>电话号码</Text>
|
448
|
|
- <Input type='number' className="input customers__sex" name="phone" data-id="phone" value={this.state.phone} onInput={this.BindInfo.bind(this)} placeholder="请输入" />
|
|
449
|
+ <Input type='number' className="input customers__sex" name="phone" data-id="phone" value={phone} onInput={this.BindInfo.bind(this)} placeholder="请输入" />
|
449
|
450
|
</View>
|
450
|
451
|
<View className='info info__4'>
|
451
|
452
|
<Text className='customers__txt'>意向楼盘</Text>
|
452
|
453
|
{
|
453
|
|
- reType == 'index' ? (<Picker className='input customers__name' onChange={this.bindFloorChange} value={this.state.floorID} range={this.state.floorArray} range-key="buildingName">
|
454
|
|
- <View class="picker overtext" style={this.state.floorColor}>
|
455
|
|
- {this.state.floorArray[this.state.floorID].buildingName}
|
|
454
|
+ reType == 'index' ? (<Picker className='input customers__name' onChange={this.bindFloorChange} value={floorID} range={floorArray} range-key="buildingName">
|
|
455
|
+ <View class="picker overtext" style={floorColor}>
|
|
456
|
+ {floorArray[floorID].buildingName}
|
456
|
457
|
</View>
|
457
|
|
- </Picker>) : (<Input className="input customers__name" style='color:#999;' disabled='disabled' name="name" value={this.state.intention} onInput={this.bindFloorChange.bind(this)} placeholder="" />)
|
|
458
|
+ </Picker>) : (<Input className="input customers__name" style='color:#999;' disabled='disabled' name="name" value={intention} onInput={this.bindFloorChange.bind(this)} placeholder="" />)
|
458
|
459
|
}
|
459
|
460
|
|
460
|
461
|
</View>
|
461
|
462
|
<View className='info info__4__1'>
|
462
|
463
|
<Text className='customers__txt'>置业顾问</Text>
|
463
|
|
- <Picker className='input customers__adviser' onChange={this.bindAdviserChange} value={this.state.adviserID} range={this.state.adviserArray} range-key="name">
|
464
|
|
- <View class="picker overtext" style={this.state.adviserColor}>
|
465
|
|
- {this.state.adviserArray[this.state.adviserID].name}
|
|
464
|
+ <Picker className='input customers__adviser' onChange={this.bindAdviserChange} value={adviserID} range={adviserArray} range-key="name">
|
|
465
|
+ <View class="picker overtext" style={adviserColor}>
|
|
466
|
+ {adviserArray[adviserID].name}
|
466
|
467
|
</View>
|
467
|
468
|
</Picker>
|
468
|
469
|
</View>
|
469
|
470
|
|
470
|
471
|
<View className='info info__6'>
|
471
|
472
|
<Text className='customers__txt'>客户描述</Text>
|
472
|
|
- <Input className="input customers__remarks" data-id="remarks" name="remarks" value={this.state.remarks} onInput={this.BindInfo.bind(this)} placeholder="(选填)" />
|
|
473
|
+ <Input className="input customers__remarks" data-id="remarks" name="remarks" value={remarks} onInput={this.BindInfo.bind(this)} placeholder="(选填)" />
|
473
|
474
|
</View>
|
474
|
475
|
</View>
|
475
|
476
|
<View className='submit-btn'>
|
|
@@ -480,11 +481,15 @@ export default class Index extends Component {
|
480
|
481
|
);
|
481
|
482
|
}
|
482
|
483
|
render() {
|
483
|
|
- const { person: { phone, tel } } = this.props.userInfo
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+ const { person: { phone, tel, personId } } = this.props.userInfo
|
|
487
|
+ const visable = (!phone && !tel)
|
|
488
|
+
|
484
|
489
|
return (
|
485
|
490
|
<View style="width:100%;height:100%">
|
486
|
|
- {!phone && !tel ? this.renderLogin() : this.renderDetail()}
|
487
|
|
- </View>
|
|
491
|
+ {visable ? this.renderLogin() : this.renderDetail()}
|
|
492
|
+ </View>
|
488
|
493
|
);
|
489
|
494
|
}
|
490
|
495
|
}
|