|
@@ -39,6 +39,12 @@ export default withLayout((props) => {
|
39
|
39
|
|
40
|
40
|
const postSubmit = getSubmitor(person)
|
41
|
41
|
|
|
42
|
+ useEffect(() => {
|
|
43
|
+ if(buildingId) {
|
|
44
|
+
|
|
45
|
+ }
|
|
46
|
+ }, [buildingId])
|
|
47
|
+
|
42
|
48
|
const preSubmit = (payload) => {
|
43
|
49
|
if (payload.name === '') {
|
44
|
50
|
Taro.showToast({ title: '请填写客户姓名', icon: 'none' })
|
|
@@ -56,7 +62,7 @@ export default withLayout((props) => {
|
56
|
62
|
Taro.showToast({ title: '请填写正确的客户电话', icon: 'none' })
|
57
|
63
|
return false
|
58
|
64
|
}
|
59
|
|
- if (buildingId === null && personType !== ROLE_CODE.CONSULTANT) {
|
|
65
|
+ if (buildingId === null && personType !== ROLE_CODE.CONSULTANT && personType !== ROLE_CODE.CUSTOMER) {
|
60
|
66
|
Taro.showToast({ title: '请选择客户的意向楼盘', icon: 'none' })
|
61
|
67
|
return false
|
62
|
68
|
}
|
|
@@ -103,6 +109,10 @@ export default withLayout((props) => {
|
103
|
109
|
setFormData(Data)
|
104
|
110
|
}
|
105
|
111
|
|
|
112
|
+ const BuildingChange = (e) => {
|
|
113
|
+ setBuildingId(e)
|
|
114
|
+ }
|
|
115
|
+
|
106
|
116
|
return (
|
107
|
117
|
<view className='Page addCustomer'>
|
108
|
118
|
|
|
@@ -137,14 +147,14 @@ export default withLayout((props) => {
|
137
|
147
|
<text>意向楼盘</text>
|
138
|
148
|
<view className='FormLine flex-h'>
|
139
|
149
|
<view className='flex-item'>
|
140
|
|
- <BuildingPicker onChange={setBuildingId} value={buildingId} />
|
|
150
|
+ <BuildingPicker change={BuildingChange} value={buildingId} type={type} />
|
141
|
151
|
</view>
|
142
|
152
|
</view>
|
143
|
153
|
|
144
|
154
|
<text>内场接待(选填)</text>
|
145
|
155
|
<view className='FormLine flex-h'>
|
146
|
156
|
<view className='flex-item'>
|
147
|
|
- <ConsultantPicker buildingId={buildingId} onChange={setCardId} value={CardId} />
|
|
157
|
+ <ConsultantPicker onChange={setCardId} value={CardId} buildingId={buildingId} />
|
148
|
158
|
</view>
|
149
|
159
|
<Image mode='heightFix' src={defaultSpecialImage}></Image>
|
150
|
160
|
<text>选择</text>
|