|
@@ -61,7 +61,6 @@ export default withLayout((props) => {
|
61
|
61
|
}
|
62
|
62
|
getCardList(params).then((res) => {
|
63
|
63
|
const { records } = res
|
64
|
|
- console.log("🚀 ~ file: index.jsx ~ line 64 ~ getCardList ~ records", records)
|
65
|
64
|
setConsultantList(records || [])
|
66
|
65
|
})
|
67
|
66
|
}
|
|
@@ -86,37 +85,43 @@ export default withLayout((props) => {
|
86
|
85
|
setAgentsInfo({ name: res.name, channelName: ganentsList[0].channelName })
|
87
|
86
|
}
|
88
|
87
|
})
|
|
88
|
+
|
89
|
89
|
if (CurrentStatusId - 0 === 3) {
|
90
|
|
- setFormData({ ...FormData, ...res?.customerPreparatory, realtyConsultant: res.customerPreparatory?.realtyConsultant })
|
|
90
|
+ setFormData({ ...FormData, ...res?.customerPreparatory, realtyConsultant: res?.realtyConsultant })
|
|
91
|
+ } else {
|
|
92
|
+ setFormData({ ...FormData, ...res?.customerPreparatory, realtyConsultant: res?.realtyConsultant })
|
|
93
|
+
|
91
|
94
|
}
|
|
95
|
+
|
92
|
96
|
setChannelCustomerId(res?.channelCustomer?.channelCustomerId)
|
93
|
|
- setRenChouData({ ...RenChouData, ...res?.customerPreparatory, realtyConsultant: res.customerPreparatory?.realtyConsultant })
|
|
97
|
+ setRenChouData({ ...RenChouData, ...res?.customerPreparatory, realtyConsultant: res?.realtyConsultant })
|
94
|
98
|
if ((res.customerSignatory || []).length) {
|
95
|
99
|
let customerSignatory = res.customerSignatory[0]
|
96
|
100
|
customerSignatory.dividendsPer = customerSignatory.dividendsName.substring(customerSignatory.dividendsName.indexOf('|') + 1, customerSignatory.dividendsName.indexOf('%'))
|
97
|
101
|
customerSignatory.dividendsName = customerSignatory.dividendsName.substring(0, customerSignatory.dividendsName.indexOf('|'))
|
98
|
|
- setQianYueData({ ...QianYueData, ...customerSignatory, realtyConsultant: (res.customerSignatory || []).length ? res.customerSignatory[0].realtyConsultant : null })
|
|
102
|
+ setQianYueData({ ...QianYueData, ...customerSignatory, realtyConsultant: res?.realtyConsultant })
|
|
103
|
+ // setQianYueData({ ...QianYueData, ...customerSignatory, realtyConsultant: (res.customerSignatory || []).length ? res.customerSignatory[0].realtyConsultant : null })
|
99
|
104
|
|
100
|
105
|
HouseTypeList.map((item) => {
|
101
|
106
|
if (item.apartmentId === res.customerSignatory[0].houseType) {
|
102
|
107
|
setCurrentRoomTypeId(item.apartmentId)
|
103
|
108
|
}
|
104
|
109
|
})
|
105
|
|
- setSuccessDate(res.customerSignatory[0].successDate.substring(0, 10))
|
|
110
|
+ setSuccessDate(res.customerSignatory[0].successDate?.substring(0, 10))
|
106
|
111
|
}
|
107
|
112
|
// const ConsultantId = CurrentStatusId === 3 ? res.customerPreparatory?.realtyConsultant : (res.customerSignatory || []).length ? res.customerSignatory[0].realtyConsultant : null
|
108
|
113
|
const ConsultantId = CurrentStatusId === 3 ? res?.realtyConsultant : (res.customerSignatory || []).length ? res.customerSignatory[0].realtyConsultant : null
|
109
|
|
-
|
|
114
|
+ // setRenChouData({ realtyConsultant: res?.realtyConsultant })
|
110
|
115
|
console.log(`ConsultantId is`, ConsultantId, id)
|
111
|
116
|
|
112
|
117
|
|
113
|
|
- ConsultantList.map((item) => {
|
|
118
|
+ return ConsultantList.map((item) => {
|
114
|
119
|
if (item.id === ConsultantId) {
|
115
|
120
|
setCurrnetConsultant(item)
|
116
|
121
|
}
|
117
|
122
|
})
|
118
|
123
|
})
|
119
|
|
- }, [ConsultantList, HouseTypeList, CurrentStatusId])
|
|
124
|
+ }, [ConsultantList, HouseTypeList, CurrentStatusId,])
|
120
|
125
|
|
121
|
126
|
useEffect(() => {
|
122
|
127
|
if (CurrentStatusId - 0 !== 3 && buildingId) {
|
|
@@ -199,6 +204,7 @@ export default withLayout((props) => {
|
199
|
204
|
for (let key in FormData) {
|
200
|
205
|
if (key !== 'dividendsName' && key !== 'dividendsPer') {
|
201
|
206
|
params[key] = { ...FormData }[key]
|
|
207
|
+ console.log("🚀 ~ file: index.jsx ~ line 202 ~ ToSubmit ~ FormData", FormData)
|
202
|
208
|
}
|
203
|
209
|
}
|
204
|
210
|
params.dividendsName = `${FormData.dividendsName}|${FormData.dividendsPer}%`
|