客户标签

This commit is contained in:
老叶
2022-03-14 16:14:10 +08:00
parent c8ab583072
commit 13dc69c55b
8 changed files with 104 additions and 19 deletions
+1
View File
@@ -129,6 +129,7 @@ api = {
appGoodsLists:'app/goods/lists', //库存列表
appCustomersOffline_sources:'app/customers/offline_sources', //线索来源
appCustomersTag:'app/customers/tag', //客户标签
}
+7
View File
@@ -818,4 +818,11 @@ apiQuery.getAppCustomersOffline_sources = function (params) {
})
}
//客户标签
apiQuery.getAppCustomersTag = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(false, Config.api.appCustomersTag, 2, params, "GET", resolve, reject)
})
}
export default apiQuery;
+19
View File
@@ -41,6 +41,7 @@ Page({
this.getAppSeriesBrands()
this.getAppCustomersFilter()
this.getAppCustomersOffline_sources()
this.getAppCustomersTag()
},
//获取车型品牌
@@ -283,6 +284,7 @@ Page({
params['car_id'] = that.data.car_id;
params['v_id'] = that.data.v_id;
params['color_id'] = that.data.color_id;
params['tag'] = that.data.taglList;
if(this.data.b_s_id != ''){
params['b_s_id'] = this.data.b_s_id;
}
@@ -342,6 +344,7 @@ Page({
of1Index:-1,
of2Index:-1,
})
that.getAppCustomersTag()
} else if (res.cancel) {
wx.navigateBack({
delta: 1
@@ -399,4 +402,20 @@ Page({
}
},
//客户标签
getAppCustomersTag(){
_.apiQuery.getAppCustomersTag().then(res => {
this.setData({
taglList:res.data,
})
});
},
//多选
checkPicker(e){
this.setData({
['taglList['+e.currentTarget.dataset.i+'].list['+e.currentTarget.dataset.j+'].checked']:!this.data.taglList[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked,
})
},
})
+15 -2
View File
@@ -1,6 +1,6 @@
<view class="container">
<view class="inner30">
<view class="pl40 pr40 pt10 pb10 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
<view class="pl40 pr40 pt10 pb50 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
<view class="relative bbs-1-eb pl190 last-b-none">
<view class="absolute left-0 box-middle font-28 color-333">客户状态</view>
<view class="pt30 pb30 text-right font-28 color-666 text-nowrap">
@@ -92,7 +92,7 @@
</picker>
</view>
</view>
<view class="relative bbs-1-eb pl190 last-b-none">
<view class="relative pl190">
<view class="absolute left-0 box-middle font-28 color-333">预计购车时间</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeTime" value="{{timeIndex}}" range="{{timeArray}}">
@@ -102,6 +102,19 @@
</picker>
</view>
</view>
<view class="mt10 pt20 pb20 bg-e3f5f3 font-32 text-center ulib-r10">客户标签</view>
<block wx:for='{{taglList}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
<view class="relative mt40">
<view class="font-28">{{list.name}}</view>
<view class="fn-clear">
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{option.checked?'bg-36afa2 color-fff':'bg-f6 color-666'}}" bindtap="checkPicker" data-i="{{i}}" data-j="{{j}}">{{option.name}}</view>
</block>
</view>
</view>
</block>
</view>
<view class="mt60 pl60 pr60">
+11 -7
View File
@@ -62,6 +62,7 @@ Page({
this.getAppCustomerData()
this.getAppCustomerlogs()
this.getAppCustomersTabs()
this.getAppCustomersTag()
innerAudioContext.onEnded(() => {
this.offaudio()
@@ -682,13 +683,16 @@ Page({
},
/*************************** 编辑 **********************************/
/*************************** end 编辑 **********************************/
//客户标签
getAppCustomersTag(){
let params = {};
params['id'] = this.data.id;
_.apiQuery.getAppCustomersTag(params).then(res => {
this.setData({
taglList:res.data,
})
});
},
//页面相关事件处理函数--监听用户下拉动作
onPullDownRefresh(){
+7 -2
View File
@@ -156,10 +156,15 @@
</view>
</view>
</view>
<view class="mt30 pl5 pr5 pb150" wx:elif="{{tabid == tab[2].id}}">
<view class="mt10 pl30 pr30 pb200" wx:elif="{{tabid == tab[2].id}}">
<view>
<block wx:for="{{detailinfo.tags}}" wx:for-index='i' wx:for-item='tag' wx:key='i'>
<text class="inline-block mr10 pt5 pb5 pl20 pr20 bg-f3f6fc font-22 ulib-r5">{{tag}}</text>
<text class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 bg-f3f6fc">{{tag}}</text>
</block>
<block wx:for='{{taglList}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
<text class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 bg-f3f6fc" wx:if="{{option.checked}}">{{option.name}}</text>
</block>
</block>
</view>
</view>
+29 -6
View File
@@ -32,6 +32,7 @@ Page({
})
}
this.getAppCustomerData()
this.getAppCustomersTag()
},
//获取客户详细信息
@@ -389,18 +390,21 @@ Page({
title: '请选择车身颜色',
icon: 'none'
})
} else if(that.data.name==that.data.baseinfo.name.value&&that.data.mobile==that.data.baseinfo.mobile.value&&that.data.of_id==that.data.baseinfo.of_id.of_id&&that.data.of2_id==that.data.baseinfo.of_id.of2_id&&that.data.car_id==that.data.baseinfo.car_id.value&&that.data.v_id==that.data.baseinfo.v_id.value&&that.data.color_id==that.data.baseinfo.color_id.value&&that.data.buy_time==that.data.baseinfo.buy_time.value){
wx.showToast({
title: '好像没改什么',
icon: 'none'
})
}else{
}
// else if(that.data.name==that.data.baseinfo.name.value&&that.data.mobile==that.data.baseinfo.mobile.value&&that.data.of_id==that.data.baseinfo.of_id.of_id&&that.data.of2_id==that.data.baseinfo.of_id.of2_id&&that.data.car_id==that.data.baseinfo.car_id.value&&that.data.v_id==that.data.baseinfo.v_id.value&&that.data.color_id==that.data.baseinfo.color_id.value&&that.data.buy_time==that.data.baseinfo.buy_time.value){
// wx.showToast({
// title: '好像没改什么',
// icon: 'none'
// })
// }
else{
that.setData({
submitFlag: true,
})
let params = {};
params['cus_id'] = that.data.id;
params['tag'] = that.data.taglList;
if(that.data.name != that.data.baseinfo.name.value){
params['name'] = that.data.name;
}
@@ -456,6 +460,7 @@ Page({
success(res) {
if (res.confirm) {
that.getAppCustomerData()
that.getAppCustomersTag()
} else if (res.cancel) {
wx.navigateBack({
delta: 1
@@ -535,4 +540,22 @@ Page({
}
},
//客户标签
getAppCustomersTag(){
let params = {};
params['id'] = this.data.id;
_.apiQuery.getAppCustomersTag(params).then(res => {
this.setData({
taglList:res.data,
})
});
},
//多选
checkPicker(e){
this.setData({
['taglList['+e.currentTarget.dataset.i+'].list['+e.currentTarget.dataset.j+'].checked']:!this.data.taglList[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked,
})
},
})
+15 -2
View File
@@ -1,6 +1,6 @@
<view class="container">
<view class="inner30">
<view class="pl40 pr40 pt10 pb10 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
<view class="pl40 pr40 pt10 pb50 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
<view class="relative bbs-1-eb last-b-none pl140 font-28">
<view class="absolute left-0 box-middle">客户姓名</view>
<view>
@@ -73,7 +73,7 @@
</picker>
</view>
</view>
<view class="relative bbs-1-eb pl190 last-b-none">
<view class="relative pl190">
<view class="absolute left-0 box-middle font-28 color-333">预计购车时间</view>
<view class="pt30 pb30 text-right font-28 color-666">
<picker bindchange="changeTime" value="{{timeIndex}}" range="{{timeArray}}">
@@ -83,6 +83,19 @@
</picker>
</view>
</view>
<view class="mt10 pt20 pb20 bg-e3f5f3 font-32 text-center ulib-r10">客户标签</view>
<block wx:for='{{taglList}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
<view class="relative mt40">
<view class="font-28">{{list.name}}</view>
<view class="fn-clear">
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{option.checked?'bg-36afa2 color-fff':'bg-f6 color-666'}}" bindtap="checkPicker" data-i="{{i}}" data-j="{{j}}">{{option.name}}</view>
</block>
</view>
</view>
</block>
</view>
<view class="mt60 pl60 pr60">