优化客户标签设置

master
chen 2022-08-24 13:54:29 +08:00
parent 4812b336d6
commit f378c82dd4
20 changed files with 43 additions and 27 deletions

View File

@ -4,13 +4,13 @@
<view v-if="isXiala" class="pad-x20"> <view v-if="isXiala" class="pad-x20">
<view class="mar-s30 mar-x40 tc">请选择客服</view> <view class="mar-s30 mar-x40 tc">请选择客服</view>
<view @tap.stop="openXia" class="disjbac radius10 pad-zy20 mar-zy20 xialak mar-x50 posir"> <view @tap.stop="openXia" class="disjbac radius10 pad-zy20 mar-zy20 xialak mar-x50 posir">
<view class="col3" v-if="!isTag">{{category[current].title}}</view> <view class="col3 fon28" v-if="!isTag">{{category[current].title}}</view>
<view class="col3 disac width100" v-if="isTag"><input class="width100 mar-y20" disabled v-model="tagStr"></view> <view class="col3 disac fon28 width100" v-if="isTag"><input class="width100 mar-y20 fon28" disabled v-model="tagStr"></view>
<image :class="isZhuan?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image> <image :class="isZhuan?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<!-- 下拉列表 --> <!-- 下拉列表 -->
<view v-if="isZhuan" class="posia bacf radius10 xial-box"> <view v-if="isZhuan" class="posia bacf radius10 xial-box">
<!-- 普通下拉 --> <!-- 普通下拉 -->
<view class="pad-zy20 xial-item-box" v-if="!isTag"> <view class="pad-zy20 xial-item-box fon28 mar-sx10" v-if="!isTag">
<view @tap.stop="chooseXia(index)":class="current==index?'pcol':''" v-for="(item,index) in category" :key="index">{{item.title}}</view> <view @tap.stop="chooseXia(index)":class="current==index?'pcol':''" v-for="(item,index) in category" :key="index">{{item.title}}</view>
</view> </view>
<!-- 标签下拉 --> <!-- 标签下拉 -->

View File

@ -76,14 +76,14 @@
<view class="pad-x20"> <view class="pad-x20">
<view class="mar-s30 mar-x40 tc">请选择标签</view> <view class="mar-s30 mar-x40 tc">请选择标签</view>
<view @tap.stop="openXia" class="disjbac radius10 pad-zy20 mar-zy20 xialak mar-x50 posir"> <view @tap.stop="openXia" class="disjbac radius10 pad-zy20 mar-zy20 xialak mar-x50 posir">
<view class="col3 disac width100"><input class="width100 mar-y20" disabled v-model="tagStr"></view> <view class="col3 disac fon28 width100"><input class="width100 mar-y20" disabled v-model="tagStr"></view>
<image :class="isZhuan1?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image> <image :class="isZhuan1?'zhuan':'nozhuan'" src="/static/public/sanj.png" mode="aspectFill"></image>
<!-- 下拉列表 --> <!-- 下拉列表 -->
<view v-if="isZhuan1" class="posia bacf radius10 xial-box"> <view v-if="isZhuan1" class="posia bacf radius10 xial-box">
<!-- 标签下拉 --> <!-- 标签下拉 -->
<view class="pad-zy20 xial-item-box"> <view class="pad-zy20 xial-item-box">
<view @tap.stop="chooseXiaTag(index)" class="disac" :class="item.checked?'pcol':''" v-for="(item,index) in tagList" :key="index"> <view @tap.stop="chooseXiaTag(index)" class="disac fon28 mar-sx10" :class="item.checked?'pcol':''" v-for="(item,index) in tagList" :key="index">
<view v-if="" class="disac"> <view v-if="" class="disac" style="transform: scale(.8);">
<checkbox style="width: 60rpx;height: 60rpx;display: inherit;" color="#3875F6" :data-id="item.id" :checked="item.checked" /> <checkbox style="width: 60rpx;height: 60rpx;display: inherit;" color="#3875F6" :data-id="item.id" :checked="item.checked" />
</view> </view>
{{item.title}} {{item.title}}
@ -256,12 +256,12 @@
}, },
// //
tuneUpTag(index){ tuneUpTag(index){
// console.log(''); // console.log('');
//
this.getTagsCur(this.dataList[index].id);
this.isShowTag = true this.isShowTag = true
this.tagStr = ''; this.tagStr = '';
this.tagId = ''; this.tagId = '';
this.tagIds = [];
this.tagVal = [];
this.tagList.forEach((item,v)=>{ this.tagList.forEach((item,v)=>{
item.checked = false; item.checked = false;
if(this.dataList[index].tags.length) { if(this.dataList[index].tags.length) {
@ -282,6 +282,22 @@
this.customer_id = this.dataList[index].id//ID this.customer_id = this.dataList[index].id//ID
if(this.tagList.length==0) this.tagList = ['暂无可设置的标签'] if(this.tagList.length==0) this.tagList = ['暂无可设置的标签']
}, },
//
getTagsCur(id){
this.tagVal = [];
this.$requst.get('user/customer-tags',{customer_id:id}).then(res=>{
if(res.code==0){
console.log('已有标签:',res);
this.tagIds = res.data.ids;
let tagsArr = [];
res.data.list.forEach(item=>{
tagsArr.push(item.name);
})
this.tagVal = tagsArr;
}
},error=>{})
},
checkKF(){// checkKF(){//
this.$requst.post('user/servicer-list').then(res=>{ this.$requst.post('user/servicer-list').then(res=>{
// console.log('',res); // console.log('',res);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long