|
@@ -3,7 +3,7 @@ import { AtTabs, AtTabsPane } from 'taro-ui'
|
3
|
3
|
import ListView from '@components/ListView'
|
4
|
4
|
import "taro-ui/dist/style/components/tabs.scss"
|
5
|
5
|
import { savePoint, updatePoint } from '@services/common'
|
6
|
|
-import { getCustomerDetail, getVisitRecord, getActivityList, getFollowRecord, addFollowRecord, commitCustomerInfo,getBuildingType } from '@services/person'
|
|
6
|
+import { getCustomerDetail, getVisitRecord, getActivityList, getFollowRecord, addFollowRecord, commitCustomerInfo, getBuildingType } from '@services/person'
|
7
|
7
|
import { connect } from '@tarojs/redux'
|
8
|
8
|
import './index.scss'
|
9
|
9
|
import ActivityItem from './item'
|
|
@@ -258,13 +258,15 @@ export default class myCustomer extends Taro.Component {
|
258
|
258
|
)
|
259
|
259
|
}
|
260
|
260
|
perfectInformation() {
|
261
|
|
- const {customerDetail} = this.state
|
|
261
|
+ const { customerDetail } = this.state
|
262
|
262
|
this.setState({
|
263
|
263
|
baseVisible: true,
|
264
|
264
|
baseInfo: customerDetail,
|
265
|
265
|
})
|
266
|
|
- getBuildingType(customerDetail.buildingId).then(res=>{
|
267
|
|
- console.log(res,"1111111111")
|
|
266
|
+ getBuildingType(customerDetail.buildingId).then(res => {
|
|
267
|
+ this.setState({
|
|
268
|
+ selector: res || []
|
|
269
|
+ })
|
268
|
270
|
})
|
269
|
271
|
}
|
270
|
272
|
// 保存
|
|
@@ -280,6 +282,10 @@ export default class myCustomer extends Taro.Component {
|
280
|
282
|
customerSex: this.state.customerDetail.sex,
|
281
|
283
|
customerId,
|
282
|
284
|
}
|
|
285
|
+ Taro.showToast({
|
|
286
|
+ title: '完善信息成功',
|
|
287
|
+ icon: 'none'
|
|
288
|
+ })
|
283
|
289
|
addFollowRecord(params).then(res => {
|
284
|
290
|
this.queryFollowRecord(1)
|
285
|
291
|
})
|
|
@@ -332,7 +338,7 @@ export default class myCustomer extends Taro.Component {
|
332
|
338
|
this.setState({
|
333
|
339
|
baseInfo: {
|
334
|
340
|
...this.state.baseInfo,
|
335
|
|
- demandType: this.state.selector[e.detail.value]
|
|
341
|
+ demandType: this.state.selector[e.detail.value].buildingTypeName
|
336
|
342
|
}
|
337
|
343
|
})
|
338
|
344
|
}
|
|
@@ -400,7 +406,7 @@ export default class myCustomer extends Taro.Component {
|
400
|
406
|
</View>
|
401
|
407
|
<View className="con-picker" >
|
402
|
408
|
<View>
|
403
|
|
- <Picker mode='selector' range={selector} onChange={this.onChange}>
|
|
409
|
+ <Picker mode='selector' range={selector} range-key="buildingTypeName" onChange={this.onChange}>
|
404
|
410
|
<View className='picker'>
|
405
|
411
|
{baseInfo.demandType || ' '}
|
406
|
412
|
</View>
|
|
@@ -453,7 +459,7 @@ export default class myCustomer extends Taro.Component {
|
453
|
459
|
<Image className="bg" src={getThumbnail('https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/shop/background.jpg')} ></Image>
|
454
|
460
|
<Image className="user__left__headimg" src={customerDetail.picture || require('@assets/default-avatar.png')} />
|
455
|
461
|
<View className='user__left__name'>
|
456
|
|
- <View className="text">{customerDetail.name}的数据哈酒好多次客户方</View>
|
|
462
|
+ <View className="text">{customerDetail.name}</View>
|
457
|
463
|
{
|
458
|
464
|
customerDetail.sex == '1' && <Image style="width:36rpx;height:38rpx;margin-left:10rpx" src={maleImg} />
|
459
|
465
|
}
|
|
@@ -490,7 +496,13 @@ export default class myCustomer extends Taro.Component {
|
490
|
496
|
<View className="list">
|
491
|
497
|
{visitRecord.length && visitRecord.map((item, index) => (
|
492
|
498
|
<View className="record-item" key={index + 'follow'}>
|
493
|
|
- <View className="title" >{item.activity}</View>
|
|
499
|
+ <View className="title" >{item.activity}
|
|
500
|
+ {
|
|
501
|
+ (item.activityName || item.buildingName) &&
|
|
502
|
+ <Text> : </Text>
|
|
503
|
+ }
|
|
504
|
+ {item.activityName || item.buildingName || ""}
|
|
505
|
+ </View>
|
494
|
506
|
<View className="time">{dayjs(item.visitTime).format('YYYY年MM月DD日 HH:mm:ss') || ' '}</View>
|
495
|
507
|
</View>
|
496
|
508
|
))
|