소스 검색

mycustomer

许静 5 년 전
부모
커밋
10a76477e4

+ 2
- 2
config/dev.js 파일 보기

@@ -9,8 +9,8 @@ module.exports = {
9 9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    HOST: '"http://192.168.0.84:8080"',
13
-    WSS_HOST: '"ws://192.168.0.84:8080"',
12
+    // HOST: '"http://192.168.0.84:8080"',
13
+    // WSS_HOST: '"ws://192.168.0.84:8080"',
14 14
   },
15 15
   weapp: {},
16 16
   h5: {}

+ 1
- 1
src/pages/person/customerAnalysis/analysis.js 파일 보기

@@ -135,8 +135,8 @@ export default class analysis extends Taro.Component {
135 135
           })
136 136
         })
137 137
       } else if (params == 'follow') {
138
-        const arr2 = res.reverse()
139 138
         getEchartMonthInfo(params).then(res => {
139
+          const arr2 = res.reverse()
140 140
           this.setState({
141 141
             chartInfo2: arr2.map(x => ({ name: `${x.month.substr(4)}月`, value: x.customerNum })) || []
142 142
           })

+ 1
- 1
src/pages/person/customerAnalysis/item/index.js 파일 보기

@@ -27,7 +27,7 @@ export default class Item extends Component {
27 27
           <View className="left">
28 28
             <View className="title">{data.title}</View>
29 29
             {data.startDate &&
30
-              <View className={data.jionStatus == '已签到' ? "status signed " : data.jionStatus == '成功已核销' ? "status primary" : data.jionStatus == '失败' ? "status fail" : "status"}>{data.jionStatus || ''}</View>
30
+              <View className={data.joinStatus == '已签到' ? "status signed " : data.joinStatus == '成功已核销' ? "status primary" : data.joinStatus == '失败' ? "status fail" : "status"}>{data.joinStatus || ''}</View>
31 31
             }
32 32
           </View>
33 33
           {data.startDate &&

+ 20
- 8
src/pages/person/customerAnalysis/myCustomer.js 파일 보기

@@ -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
                   ))

+ 1
- 1
src/services/person.js 파일 보기

@@ -44,7 +44,7 @@ export const queryCustomerList = (type, payload) => fetch({ url: `${API_CUSTOMER
44 44
  * 获取项目类型
45 45
  * @param {*} buildingId 
46 46
  */
47
-export const getBuildingType = (customerId, payload) => fetch({ url: `${API_BUILDING_TYPE}/${buildingId}`, payload })
47
+export const getBuildingType = (buildingId, payload) => fetch({ url: `${API_BUILDING_TYPE}/${buildingId}`, payload })
48 48
 /**
49 49
  * 获取客户详情
50 50
  * @param {*} customerId