From 634ea3defa145a0e70ac445e8a85e9b2f8134275 Mon Sep 17 00:00:00 2001 From: lancer <1905818361@qq.com> Date: Wed, 25 Aug 2021 18:32:29 +0800 Subject: [PATCH] init --- config.js | 4 +- pages/center/Piabodata/index.vue | 4 +- pages/center/consumer/consumerDetail.vue | 9 +- pages/center/consumer/edit.vue | 350 +++++++++++------------ utils/http.js | 4 +- 5 files changed, 189 insertions(+), 182 deletions(-) diff --git a/config.js b/config.js index e5ae0d4..be10eb6 100644 --- a/config.js +++ b/config.js @@ -2,8 +2,8 @@ * 小程序配置文件 */ // 此处主机域名修改成腾讯云解决方案分配的域名 -// var host = 'http://121.42.63.138:9091/autoSR/api'; // 测试站 -var host = 'http://192.168.31.163:8080/autoSR/api'; // 长龙 +var host = 'http://121.42.63.138:9091/autoSR/api'; // 测试站 +// var host = 'http://192.168.31.163:8080/autoSR/api'; // 长龙 // var host = 'http://192.168.31.128:8080/autoSR/api'; // 佳豪 // var host = 'http://10.2.1.104:8081/autoSR/api'; // 刘敏 // var host = 'https://zkgj.quhouse.com/api'; // 质控正式 diff --git a/pages/center/Piabodata/index.vue b/pages/center/Piabodata/index.vue index 43371e9..91488ff 100644 --- a/pages/center/Piabodata/index.vue +++ b/pages/center/Piabodata/index.vue @@ -357,6 +357,7 @@ this.$u.post('/cusLvStatistics/selectAllAccountIdByHouseId',{houseId:this.houseId}) .then(res=>{ // console.log(res,'123') + this.staffList=[] res.map(item=>{ let obj={} obj.value=item.accountId @@ -435,8 +436,7 @@ getSectionList(){ this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId',{houseId:this.houseId}) .then(res=>{ - this.staffList=[] - this.staffList1=[] + this.teamList=[] res.map(item=>{ let obj={} obj.value=item.deptId diff --git a/pages/center/consumer/consumerDetail.vue b/pages/center/consumer/consumerDetail.vue index d832f1c..2916373 100644 --- a/pages/center/consumer/consumerDetail.vue +++ b/pages/center/consumer/consumerDetail.vue @@ -214,6 +214,13 @@ id:'' } this.$u.post("/corpus/findByPage", parames).then(res => { + if(res==null){ + uni.showToast({ + icon: "none", + title: "暂无音频" + }) + return + } if(res[0].recordDuration>360){ let newobj = res[0]; uni.navigateTo({ @@ -247,7 +254,7 @@ goedit(){ // console.log('去编辑') uni.navigateTo({ - url:'/pages/center/consumer/edit' + url:`/pages/center/consumer/edit?id=${this.customerId}` }) }, // 去添加提醒 diff --git a/pages/center/consumer/edit.vue b/pages/center/consumer/edit.vue index db9a6e1..0eaf3b1 100644 --- a/pages/center/consumer/edit.vue +++ b/pages/center/consumer/edit.vue @@ -24,8 +24,8 @@ - - + + @@ -46,7 +46,7 @@ 微信账号 - + @@ -60,7 +60,7 @@ - + 备注内容 @@ -87,59 +87,71 @@ 客户标签 - - - 置业需求 - - - + + + + 置业需求 + + - - + + + {{item.label}} + - - - 意向面积 - - - + + + + 意向面积 + + - - + + + {{item.label}} + - - - 预算 - - - - - - + + + + 预算 + + + - - - 关注点 - - - - - - + + + + 关注点 + + + - - - 客户来源 - - - + + + + 客户来源 + + - - + + + {{item.label}} + @@ -154,17 +166,17 @@ - + - + - + - + - + - + @@ -174,21 +186,23 @@ return{ form:{ name:'', - sex:'0', + sex:'1', phone:'', - wx:'', + chatNo:'', lelve:'', - stage:'', - txea:'', - demand:'', - area:'', - budget:'', - fouce:'', - soure:'', + demand:{ + // 户型 + roomModel:'', + // 面积 + acreage:'', + // 客户来源 + // 预算 + // 关注点 + } }, selectform:{ - lelve:'A', + lelve:'', stage:'', demand:'', area:'', @@ -198,12 +212,8 @@ }, lelveshow:false, - stageshow:false, - demandshow:false, - areashow:false, - budgetshow:false, - fouceshow:false, - soureshow:false, + customerId:'', + // 等级 lelvelist:[ { value:1, @@ -222,120 +232,94 @@ label:'D' }, ], - stagelist:[ - { - value:1, - label:'首次到访' - }, - { - value:2, - label:'首次到访B' - }, - { - value:3, - label:'首次到访C' - }, - ], - demandlist:[ - { - value:1, - label:'需求' - }, - { - value:2, - label:'首次到访B' - }, - { - value:3, - label:'首次到访C' - }, - ], - arealist:[ - { - value:1, - label:'面积' - }, - { - value:2, - label:'首次到访B' - }, - { - value:3, - label:'首次到访C' - }, - ], - budgetlist:[ - { - value:1, - label:'预算' - }, - { - value:2, - label:'首次到访B' - }, - { - value:3, - label:'首次到访C' - }, - ], - foucelist:[ - { - value:1, - label:'关注' - }, - { - value:2, - label:'首次到访B' - }, - { - value:3, - label:'首次到访C' - }, - ], - sourelist:[ - { - value:1, - label:'来源' - }, - { - value:2, - label:'首次到访B' - }, - { - value:3, - label:'首次到访C' - }, - ], + stagelist:[], + // 置业需求 + demandlist:[], + // 意向面积 + arealist:[], + // 预算 + budgetlist:[], + // 关注点 + foucelist:[], + // 客户来源 + sourelist:[], } }, + onLoad(e) { + console.log(e) + // 先调用借口查询数据 + this.customerId=e.id + this.getdetail() + }, methods:{ - lelveshowCallback(e){ - this.selectform.lelve=e[0].label - this.form.lelve=e[0].value + sourecheck(index){ + this.sourelist[index].checked=!this.sourelist[index].checked + this.$forceUpdate() }, - stageshowCallback(e){ - this.selectform.stage=e[0].label - this.form.stage=e[0].value + demandcheck(index){ + this.demandlist[index].checked=!this.demandlist[index].checked + this.$forceUpdate() }, - demandshowCallback(e){ - this.selectform.demand=e[0].label - this.form.demand=e[0].value + areacheck(index){ + this.arealist[index].checked=!this.arealist[index].checked + this.$forceUpdate() }, - areashowCallback(e){ - this.selectform.area=e[0].label - this.form.area=e[0].value - }, - budgetshowCallback(e){ - this.selectform.budget=e[0].label - this.form.budget=e[0].value + lelveshowCallback(e){ + this.selectform.lelve=e[0].label + this.form.lelve=e[0].value }, - fouceshowCallback(e){ - this.selectform.fouce=e[0].label - this.form.fouce=e[0].value + // 获取用户数据 + getdetail(){ + this.$u.get("customer/findById?",{id:this.customerId}) + .then(res=>{ + // console.log(res) + this.form=res + // 给客户等级赋值 + let idx= this.lelvelist.findIndex(item=>item.value==res.level) + if(idx!=-1){ + this.selectform.lelve=this.lelvelist[idx].label + } + // 获取置业需求 + this.getListByType('needType','demandlist') + // 获取意向面积 + this.getListByType('area','arealist') + // 获取客户来源 + this.getListByType('customerSource','sourelist') + }) }, - soureshowCallback(e){ - this.selectform.soure=e[0].label - this.form.soure=e[0].value + // 字典表接口 + getListByType(type,list){ + this.$u.get("/sysDict/findListByType",{type}) + .then(res=>{ + // console.log(res) + this[list]=res + // 处理回显问题 + if(type=='needType'){ + // 置业需求 + // console.log(this.demandlist) + this.demandlist.map(item=>{ + // console.log(this.form.demand.demandType) + if((this.form.demand.demandType+'').includes(item.value)){ + item.checked=true + }else{ + item.checked=false + } + }) + } + // 意向面积 + if(type=='area'){ + this.arealist.map(item=>{ + item.checked=false + }) + } + // 客户来源 + if(type=='customerSource'){ + this.sourelist.map(item=>{ + item.checked=false + }) + } + + }) }, } } @@ -412,4 +396,20 @@ line-height: 88rpx; } } + .con-msg-con{ + display: flex; + flex-wrap: wrap; + // justify-content: space-around; + border-bottom: 1px solid #E0E0E0; + .chebox{ + // width: 20%; + height: 60rpx; + line-height: 60rpx; + margin: 10rpx 0; + margin-right: 20rpx; + border: 1px solid #E0E0E0; + box-sizing: border-box; + padding: 0 10rpx; + } + } diff --git a/utils/http.js b/utils/http.js index 9f3828f..bc6322a 100644 --- a/utils/http.js +++ b/utils/http.js @@ -1,5 +1,5 @@ -// const baseUrl = 'http://121.42.63.138:9091/autoSR/api';// 测试站 -const baseUrl = 'http://192.168.31.161:8080/autoSR/api'; // 长龙 +const baseUrl = 'http://121.42.63.138:9091/autoSR/api';// 测试站 +// const baseUrl = 'http://192.168.31.161:8080/autoSR/api'; // 长龙 // const baseUrl = 'http://192.168.31.128:8080/autoSR/api'; // 佳豪 // const baseUrl = 'http://10.2.1.104:8081/autoSR/api'; // 刘敏 // const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式