意向标签
This commit is contained in:
@@ -66,6 +66,11 @@ Page({
|
||||
this.getAppCustomersTag()
|
||||
//战败标签数据
|
||||
this.getAppDefeatTag()
|
||||
//意向标签-到店
|
||||
this.getAppDaoDianTag()
|
||||
//意向标签-购买
|
||||
this.getAppGouMaiTag()
|
||||
|
||||
this.getAppCustomersFilter()
|
||||
|
||||
innerAudioContext.onEnded(() => {
|
||||
@@ -511,12 +516,20 @@ Page({
|
||||
if(this.data.nextIndex>-1){
|
||||
params['visit_time'] = this.data.dateList[this.data.nextIndex].year +'-'+ this.data.dateList[this.data.nextIndex].month +'-'+ this.data.dateList[this.data.nextIndex].day;
|
||||
}
|
||||
if(this.data.statuskey == 0){
|
||||
params['daodian_tag'] = this.data.daoDianTag;
|
||||
}
|
||||
if(this.data.statuskey == 1){
|
||||
params['goumai_tag'] = this.data.gouMaiTag;
|
||||
}
|
||||
if(this.data.statuskey == 3){
|
||||
params['invalid_tag'] = this.data.defeatTag;
|
||||
}
|
||||
if((this.data.statuskey == 0||this.data.statuskey == 1)&&this.data.wxgr==1){
|
||||
params['wxgr'] = this.data.wxgr;
|
||||
}
|
||||
console.log(this.data.daodianTag)
|
||||
console.log(params)
|
||||
_.apiQuery.putAppCustomers(params).then(res=>{
|
||||
this.setData({
|
||||
isShowNote:false,//新增日志弹窗
|
||||
@@ -1008,7 +1021,7 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//跟进渠道
|
||||
//战败理由标签选择
|
||||
changeDefeat(e) {
|
||||
if(this.data.defeatIndex != e.detail.value && e.detail.value >= 0){
|
||||
this.setData({
|
||||
@@ -1028,6 +1041,100 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//意向标签-到店
|
||||
getAppDaoDianTag(){
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
params['tag_type'] = '2';
|
||||
params['tag_type2'] = '1';
|
||||
_.apiQuery.getAppCustomersTag(params).then(res => {
|
||||
this.setData({
|
||||
daoDianTag:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
|
||||
})
|
||||
let that = this
|
||||
if(res.data.tags&&res.data.tags.length>0){
|
||||
let daoDianList = res.data.tags
|
||||
daoDianList.forEach((itemA,index) => {
|
||||
itemA.list.forEach(itemB => {
|
||||
if(itemB.checked){
|
||||
itemA.have=true
|
||||
}
|
||||
})
|
||||
})
|
||||
that.setData({
|
||||
daoDianList,
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//意向标签-到店-单选
|
||||
daoDianRadioPicker(e){
|
||||
let daoDianTag = this.data.daoDianTag
|
||||
daoDianTag[e.currentTarget.dataset.i].list.forEach(item => {
|
||||
item.checked=false
|
||||
})
|
||||
daoDianTag[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked=true
|
||||
this.setData({
|
||||
daoDianTag,
|
||||
})
|
||||
},
|
||||
|
||||
//意向标签-到店-多选
|
||||
daoDianCheckPicker(e){
|
||||
this.setData({
|
||||
['daoDianTag['+e.currentTarget.dataset.i+'].list['+e.currentTarget.dataset.j+'].checked']:!this.data.daoDianTag[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked,
|
||||
})
|
||||
},
|
||||
|
||||
//意向标签-购买
|
||||
getAppGouMaiTag(){
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
params['tag_type'] = '2';
|
||||
params['tag_type2'] = '2';
|
||||
_.apiQuery.getAppCustomersTag(params).then(res => {
|
||||
this.setData({
|
||||
gouMaiTag:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
|
||||
})
|
||||
let that = this
|
||||
if(res.data.tags&&res.data.tags.length>0){
|
||||
let gouMaiList = res.data.tags
|
||||
gouMaiList.forEach((itemA,index) => {
|
||||
itemA.list.forEach(itemB => {
|
||||
if(itemB.checked){
|
||||
itemA.have=true
|
||||
}
|
||||
})
|
||||
})
|
||||
that.setData({
|
||||
gouMaiList,
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//意向标签-购买-单选
|
||||
gouMaiRadioPicker(e){
|
||||
let gouMaiTag = this.data.gouMaiTag
|
||||
gouMaiTag[e.currentTarget.dataset.i].list.forEach(item => {
|
||||
item.checked=false
|
||||
})
|
||||
gouMaiTag[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked=true
|
||||
this.setData({
|
||||
gouMaiTag,
|
||||
})
|
||||
},
|
||||
|
||||
//意向标签-购买-多选
|
||||
gouMaiCheckPicker(e){
|
||||
this.setData({
|
||||
['gouMaiTag['+e.currentTarget.dataset.i+'].list['+e.currentTarget.dataset.j+'].checked']:!this.data.gouMaiTag[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked,
|
||||
})
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh(){
|
||||
this.setData({
|
||||
@@ -1044,6 +1151,10 @@ Page({
|
||||
this.getAppCustomersTag()
|
||||
//战败标签数据
|
||||
this.getAppDefeatTag()
|
||||
//意向标签-到店
|
||||
this.getAppDaoDianTag()
|
||||
//意向标签-购买
|
||||
this.getAppGouMaiTag()
|
||||
},
|
||||
|
||||
//页面上拉触底事件的处理函数
|
||||
|
||||
@@ -128,9 +128,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="mt30 pl50 pr30 pb200" wx:elif="{{tabid == 3}}">
|
||||
<block wx:for='{{defeatList}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
|
||||
<block wx:for='{{daoDianList}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
|
||||
<view class="relative mt20" wx:if="{{list.have}}">
|
||||
<view class="absolute left-0 box-middle font-28">{{list.name}}</view>
|
||||
<view class="pl150">
|
||||
@@ -142,6 +140,38 @@
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:for='{{gouMaiList}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
|
||||
<view class="relative mt20" wx:if="{{list.have}}">
|
||||
<view class="absolute left-0 box-middle font-28">{{list.name}}</view>
|
||||
<view class="pl150">
|
||||
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
|
||||
<view class="inline-block space-nowrap mt5 mb5 mr10 pt10 pb10 pl20 pr20 font-22 ulib-r10 bg-f3f6fc" wx:if="{{option.checked}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="mt30 pl50 pr30 pb200" wx:elif="{{tabid == 3}}">
|
||||
<view class="relative mt20" wx:if="{{detailinfo.defeat.reason}}">
|
||||
<view class="absolute left-0 box-middle font-28">战败理由</view>
|
||||
<view class="pl150 font-28 color-666">
|
||||
{{detailinfo.defeat.reason}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <block wx:for='{{defeatList}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
|
||||
<view class="relative mt20" wx:if="{{list.have}}">
|
||||
<view class="absolute left-0 box-middle font-28">{{list.name}}</view>
|
||||
<view class="pl150">
|
||||
<block wx:for='{{list.list}}' wx:for-item='option' wx:for-index='j' wx:key='j'>
|
||||
<view class="inline-block space-nowrap mt5 mb5 mr10 pt10 pb10 pl20 pr20 font-22 ulib-r10 bg-f3f6fc" wx:if="{{option.checked}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixed left-0 bottom-0 right-0 bg-fff-op90 pl40 pr40 pt20 pb40 z-index-1">
|
||||
@@ -266,6 +296,48 @@
|
||||
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
|
||||
</picker>
|
||||
</view>
|
||||
<block wx:for='{{daoDianTag}}' wx:for-item='list' wx:for-index='i' wx:key='i' wx:if="{{statuskey==0}}">
|
||||
<view class="relative mt20 pl40 pr40">
|
||||
<view class="font-28">
|
||||
<text class="text-middle">{{list.name}}</text>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='radio'}}">
|
||||
<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="daoDianRadioPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='checkbox'}}">
|
||||
<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="daoDianCheckPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:for='{{gouMaiTag}}' wx:for-item='list' wx:for-index='i' wx:key='i' wx:if="{{statuskey==1}}">
|
||||
<view class="relative mt20 pl40 pr40">
|
||||
<view class="font-28">
|
||||
<text class="text-middle">{{list.name}}</text>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='radio'}}">
|
||||
<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="gouMaiRadioPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{list.type=='checkbox'}}">
|
||||
<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="gouMaiCheckPicker" data-i="{{i}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="mt20 bds-2-eb ml40 mr40 inner20 font-28 {{levelIndex>-1?'color-666':'color-ccc'}} fn-clear ulib-r10">
|
||||
<view class="fn-fl">计划回访时间</view>
|
||||
<view bindtap="{{levelIndex>-1?'optShowTimePicker':''}}" class="fn-fr wp60 text-right">
|
||||
|
||||
Reference in New Issue
Block a user