lancer 3 years ago
parent
commit
f08ab71af3
2 changed files with 149 additions and 117 deletions
  1. +16
    -2
      pages/center/Piabodata/TrendAnalysis.vue
  2. +133
    -115
      pages/center/consumer/edit.vue

+ 16
- 2
pages/center/Piabodata/TrendAnalysis.vue View File

@@ -91,24 +91,38 @@
<view style="padding: 30rpx;padding-bottom: 20rpx;align-items: center;" v-if="Selectlevel">
<view style="display: flex;align-items: center;border-bottom: 1px solid #C9C9C9;height: 80rpx;">
<view>选择一级:</view>
<view style="width:75%;">
<!-- <view style="width:75%;">
<input @click="oninputtap2()" v-model="Selectlevelobj.name" type="text" disabled="true"
:border="border" placeholder="请选择" />
</view>
<view>
<image src="https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/qf/more.png"
style="width:12rpx;height:23rpx;margin-left: 16rpx;">
</view> -->
<view style="display: flex;justify-content:center;padding-left: 30rpx;padding-right: 30rpx;margin-top: 16rpx;"
v-if="Selectlevelobj.name" @click="oninputtap2()">
<view class="title2-che" style="width: 220rpx;">{{Selectlevelobj.name}}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
</view>
</view>

<view style="display: flex;align-items: center;border-bottom: 1px solid #C9C9C9;height: 80rpx;">
<view>选择二级:</view>
<view style="width:75%;">
<!-- <view style="width:75%;">
<input @click="oninputtap3()" v-model="erSelectlevelobj.name" type="text" disabled="true"
:border="border" placeholder="请选择" />
</view>
<view>
<image src="https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/qf/more.png"
style="width:12rpx;height:23rpx;margin-left: 16rpx;">
</view> -->
<view style="display: flex;justify-content:center;padding-left: 30rpx;padding-right: 30rpx;margin-top: 16rpx;"
v-if="erSelectlevelobj.name" @click="oninputtap3()">
<view class="title2-che" style="width: 220rpx;">{{erSelectlevelobj.name}}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
</view>
</view>
</view>


+ 133
- 115
pages/center/consumer/edit.vue View File

@@ -38,7 +38,7 @@
</view>
</view>
<view class="conmsg-msg-lab-inp">
<input type="text" placeholder="请输入联系电话" v-model="form.phone"/>
<input type="number" placeholder="请输入联系电话" maxlength="11" v-model="form.phone"/>
</view>
</view>
<view class="conmsg-msg-lab">
@@ -54,7 +54,7 @@
客户等级
</view>
<view class="conmsg-msg-lab-inp">
<input type="text" placeholder="请选择客户等级" @click="lelveshow = true" v-model="selectform.lelve" disabled/>
<input type="text" placeholder="请选择客户等级" @click="levelshow = true" v-model="selectform.level" disabled/>
</view>
<view class="conmsg-msg-lab-img">
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
@@ -76,7 +76,7 @@
备注内容
</view>
<view class="conmsg-msg-lab-inp">
<input type="text" placeholder="请输入备注内容" v-model="form.txea"/>
<input type="text" placeholder="请输入备注内容" v-model="form.remarks"/>
</view>
</view>
</view>
@@ -87,84 +87,33 @@
客户标签
</view>
<view class="conmsg-msg">
<view class="">
<view class="conmsg-msg-lab">
<view class="conmsg-msg-lab-1">
置业需求
</view>
<!-- <view class="conmsg-msg-lab-img">
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
</view> -->
</view>
<view class="con-msg-con">
<view v-for="(item,index) in demandlist" :key="index" :style="{border:item.checked?'1px solid #0A6EE9':'1px solid #E0E0E0'}" class="chebox" @click="demandcheck(index)">
{{item.label}}
</view>
</view>
</view>
<view class="">
<view class="conmsg-msg-lab">
<view class="conmsg-msg-lab-1">
意向面积
</view>
<!-- <view class="conmsg-msg-lab-img">
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
</view> -->
</view>
<view class="con-msg-con">
<view v-for="(item,index) in arealist" :key="index" :style="{border:item.checked?'1px solid #0A6EE9':'1px solid #E0E0E0'}" class="chebox" @click="areacheck(index)">
{{item.label}}
</view>
</view>
</view>
<view class="">
<view class="conmsg-msg-lab">
<view class="conmsg-msg-lab-1">
预算
</view>
<!-- <view class="conmsg-msg-lab-img">
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
</view> -->
</view>
</view>
<view class="">
<view class="conmsg-msg-lab">
<view class="conmsg-msg-lab-1">
关注点
</view>
<!-- <view class="conmsg-msg-lab-img">
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
</view> -->
</view>
</view>
<view class="">
<view class="conmsg-msg-lab">
<view class="conmsg-msg-lab-1">
客户来源
</view>
<!-- <view class="conmsg-msg-lab-img">
<image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
</view> -->
</view>
<view class="con-msg-con">
<view v-for="(item,index) in sourelist" :key="index" :style="{border:item.checked?'1px solid #0A6EE9':'1px solid #E0E0E0'}" class="chebox" @click="sourecheck(index)">
{{item.label}}
</view>
</view>
<view v-for="(item,index) in allList" :key="index">
<view class="">
<view class="conmsg-msg-lab">
<view class="conmsg-msg-lab-1">
{{item.name}}
</view>
</view>
<view class="con-msg-con">
<view v-for="(item1,i) in item.children" :key="index" @click="Edittag(item,item1,index,i)" :style="{border:item1.selected==0?'1px solid #0A6EE9':'1px solid #E0E0E0'}" class="chebox" >
{{item1.label}}
</view>
</view>
</view>
</view>
</view>
</view>
<view class="submit">
<view class="btn">
<view class="btn" @click="submit">
确定
</view>
</view>
<!-- 客户等级 -->
<u-select v-model="lelveshow" :list="lelvelist" @confirm="lelveshowCallback"></u-select>
<u-select v-model="levelshow" :list="levellist" @confirm="levelshowCallback"></u-select>
<!-- 客户阶段 -->
<!-- <u-select v-model="stageshow" :list="stagelist" @confirm="stageshowCallback"></u-select> -->
<!-- 职业需求 -->
@@ -189,20 +138,12 @@
sex:'1',
phone:'',
chatNo:'',
lelve:'',
demand:{
// 户型
roomModel:'',
// 面积
acreage:'',
// 客户来源
// 预算
// 关注点
}
level:'',
remarks:'',
},
selectform:{
lelve:'',
level:'',
stage:'',
demand:'',
area:'',
@@ -211,10 +152,10 @@
soure:'',
},
lelveshow:false,
levelshow:false,
customerId:'',
// 等级
lelvelist:[
levellist:[
{
value:1,
label:'A'
@@ -232,17 +173,18 @@
label:'D'
},
],
stagelist:[],
// 置业需求
demandlist:[],
// 意向面积
arealist:[],
// 预算
budgetlist:[],
// 关注点
foucelist:[],
// 客户来源
sourelist:[],
allList:[],
// stagelist:[],
// // 置业需求
// demandlist:[],
// // 意向面积
// arealist:[],
// // 预算
// budgetlist:[],
// // 关注点
// foucelist:[],
// // 客户来源
// sourelist:[],
}
},
onLoad(e) {
@@ -252,6 +194,29 @@
this.getdetail()
},
methods:{
Edittag(item,item1,index,i){
// var selected='';
// console.log(item,item1,index,i)
// return
if(this.allList[index].children[i].selected==0){
this.allList[index].children[i].selected=1;
}else{
this.allList[index].children[i].selected=0;
}
this.$forceUpdate()
// this.$u.post("/matchKeywords/updatePersonalMatchData", {
// carId: this.customerId,
// selected:selected,
// name:chend.name,
// pid:chend.pid,
// level:chend.level,
// endName:chend.endName,
// keywordsId:chend.keywordsId
// }).then(res => {
// })
},
sourecheck(index){
this.sourelist[index].checked=!this.sourelist[index].checked
this.$forceUpdate()
@@ -264,9 +229,9 @@
this.arealist[index].checked=!this.arealist[index].checked
this.$forceUpdate()
},
lelveshowCallback(e){
this.selectform.lelve=e[0].label
this.form.lelve=e[0].value
levelshowCallback(e){
this.selectform.level=e[0].label
this.form.level=e[0].value
},
// 获取用户数据
getdetail(){
@@ -275,9 +240,9 @@
// console.log(res)
this.form=res
// 给客户等级赋值
let idx= this.lelvelist.findIndex(item=>item.value==res.level)
let idx= this.levellist.findIndex(item=>item.value==res.level)
if(idx!=-1){
this.selectform.lelve=this.lelvelist[idx].label
this.selectform.level=this.levellist[idx].label
}
// 获取置业需求
this.getListByType()
@@ -289,23 +254,73 @@
},
// 字典表接口
getListByType(){
this.$u.get("/matchKeywords/findPersonalMatchData?",{customerId:this.customerId})
this.$u.get("/matchKeywords/findPersonalMatchData",{customerId:this.customerId})
.then(res=>{
console.log(res)
return
// 处理回显问题

// 置业需求
// 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
}
// console.log(res)
res.forEach(item1=>{
item1.children.map(item=>{
if(item.isInterval==0){
item.label=item.name+item.unit+'-'+item.endName+item.unit;
}else{
item.label=item.name
}
item.value=item.id;
})
// 意向面积
})
// console.log(res)
this.allList=res
// return
})
},
// 提交
submit(){
let param={}
let str=[]
if(this.form.name==''){
uni.showToast({
title:'请输入客户姓名',
icon:'none'
})
return
}
if(this.form.phone==''){
uni.showToast({
title:'请输入手机号',
icon:'none'
})
return
}
if(!(/^1[3456789]\d{9}$/.test(this.form.phone))){
uni.showToast({
title: "请检查手机号码格式",
icon:'none'
});
// this.form.phone=''
return false;
}
this.allList.map(item=>{
item.children.map(item1=>{
if(item1.selected==0){
str.push(item1.keywordsId)
}
})
})
str=str.join(',')
param=this.form
param.keywordIds=str
console.log(param)
// return
this.$u.post("customer/update",param)
.then(res=>{
// console.log(res)
uni.showToast({
title:'操作成功',
icon:'none',
success: () => {
uni.navigateBack()
}
})
})
},
@@ -382,6 +397,9 @@
font-weight: 400;
color: #FFFFFF;
line-height: 88rpx;
position: fixed;
bottom: 20rpx;
left: 20rpx;
}
}
.con-msg-con{


Loading…
Cancel
Save