战败
This commit is contained in:
@@ -50,6 +50,8 @@ Page({
|
||||
isShowComment:false,//是否显示用户评论弹窗
|
||||
|
||||
wxgr:0,//是否添加个微
|
||||
defeatIndex:-1,
|
||||
defeatTag: [],
|
||||
},
|
||||
onLoad(options) {
|
||||
for (let key in options) {
|
||||
@@ -193,8 +195,23 @@ Page({
|
||||
|
||||
if(res.data.status==2){
|
||||
this.getAppCusorderV2Customer()
|
||||
|
||||
}
|
||||
|
||||
if(res.data.status==3&this.data.tab.length<3){
|
||||
let tab = this.data.tab
|
||||
tab.push({"id":3,"title":"战败分析"},)
|
||||
this.setData({
|
||||
tab,
|
||||
})
|
||||
}
|
||||
if(res.data.status!=3&this.data.tab.length==3){
|
||||
let tab = this.data.tab
|
||||
tab.splice(2, 1)
|
||||
this.setData({
|
||||
tab,
|
||||
})
|
||||
}
|
||||
wx.stopPullDownRefresh()
|
||||
|
||||
})
|
||||
@@ -917,21 +934,57 @@ Page({
|
||||
params['id'] = this.data.id;
|
||||
params['tag_type'] = '1';
|
||||
_.apiQuery.getAppCustomersTag(params).then(res => {
|
||||
this.setData({
|
||||
defeatTag:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
|
||||
})
|
||||
// this.setData({
|
||||
// defeatTag:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
|
||||
// })
|
||||
let that = this
|
||||
if(res.data.tags&&res.data.tags.length>0){
|
||||
let defeatList = res.data.tags
|
||||
defeatList.forEach(itemA => {
|
||||
let defeatTitleList = []
|
||||
defeatList.forEach((itemA,index) => {
|
||||
// if(itemA.type=='radio'){
|
||||
// defeatTitleList.push(itemA.name+'单选')
|
||||
// }
|
||||
// if(itemA.type=='checkbox'){
|
||||
// defeatTitleList.push(itemA.name+'多选')
|
||||
// }
|
||||
defeatTitleList.push(itemA.name)
|
||||
itemA.list.forEach(itemB => {
|
||||
if(itemB.checked){
|
||||
itemA.have=true
|
||||
}
|
||||
})
|
||||
})
|
||||
this.setData({
|
||||
that.setData({
|
||||
defeatList,
|
||||
defeatTitleList,
|
||||
})
|
||||
|
||||
let defeatTag = res.data.tags
|
||||
setTimeout(function () {
|
||||
if(res.data.tag_id == 0){
|
||||
defeatTag.forEach((itemA,index) => {
|
||||
itemA.list.forEach(itemB => {
|
||||
itemB.checked = false
|
||||
})
|
||||
})
|
||||
}
|
||||
else{
|
||||
defeatTag.forEach((itemA,index) => {
|
||||
itemA.list.forEach(itemB => {
|
||||
if(itemB.checked){
|
||||
that.setData({
|
||||
defeatIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
that.setData({
|
||||
defeatTag,
|
||||
})
|
||||
}, 10)
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -955,6 +1008,26 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//跟进渠道
|
||||
changeDefeat(e) {
|
||||
if(this.data.defeatIndex != e.detail.value && e.detail.value >= 0){
|
||||
this.setData({
|
||||
defeatIndex:e.detail.value,
|
||||
})
|
||||
|
||||
let defeatTag = this.data.defeatTag
|
||||
defeatTag.forEach(itemA => {
|
||||
itemA.list.forEach(itemB => {
|
||||
itemB.checked=false
|
||||
})
|
||||
})
|
||||
this.setData({
|
||||
defeatTag,
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh(){
|
||||
this.setData({
|
||||
|
||||
@@ -128,6 +128,8 @@
|
||||
</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'>
|
||||
<view class="relative mt20" wx:if="{{list.have}}">
|
||||
<view class="absolute left-0 box-middle font-28">{{list.name}}</view>
|
||||
@@ -268,9 +270,7 @@
|
||||
<view class="fn-fl">计划回访时间</view>
|
||||
<view bindtap="{{levelIndex>-1?'optShowTimePicker':''}}" class="fn-fr wp60 text-right">
|
||||
<text class="color-ccc" wx:if="{{nextIndex == -1}}">请选择</text>
|
||||
<text wx:else>
|
||||
{{dateList[nextIndex].year}}-{{dateList[nextIndex].month}}-{{dateList[nextIndex].day}}
|
||||
</text>
|
||||
<text wx:else>{{dateList[nextIndex].year}}-{{dateList[nextIndex].month}}-{{dateList[nextIndex].day}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
|
||||
</view>
|
||||
</view>
|
||||
@@ -323,7 +323,30 @@
|
||||
</block>
|
||||
<view class="pl40 pr40" wx:if="{{statuskey==3}}">
|
||||
<scroll-view scroll-y="true" style="max-height:700rpx;">
|
||||
<block wx:for='{{defeatTag}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
|
||||
<view class="mt20 bds-2-eb inner20 font-28 color-666 ulib-r10">
|
||||
<picker class="fn-clear" bindchange="changeDefeat" value="{{defeatIndex}}" range="{{defeatTitleList}}">
|
||||
<view class="wp90 fn-fl text-nowrap color-ccc" wx:if="{{defeatIndex == -1}}">请选择</view>
|
||||
<view class="wp90 fn-fl text-nowrap" wx:else>{{defeatTitleList[defeatIndex]}}</view>
|
||||
<i class="fn-fr iconfont mt5 ml5 icon-gengduo color-ccc"></i>
|
||||
</picker>
|
||||
</view>
|
||||
<block wx:if="{{defeatIndex > -1}}">
|
||||
<view class="fn-clear" wx:if="{{defeatTag[defeatIndex].type=='radio'}}">
|
||||
<block wx:for='{{defeatTag[defeatIndex].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="defeatRadioPicker" data-i="{{defeatIndex}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="fn-clear" wx:if="{{defeatTag[defeatIndex].type=='checkbox'}}">
|
||||
<block wx:for='{{defeatTag[defeatIndex].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="defeatCheckPicker" data-i="{{defeatIndex}}" data-j="{{j}}">
|
||||
{{option.name}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<!-- <block wx:for='{{defeatTag}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
|
||||
<view class="relative mt20">
|
||||
<view class="font-28">
|
||||
<text class="text-middle">{{list.name}}</text>
|
||||
@@ -345,7 +368,7 @@
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block> -->
|
||||
<view class="mt20">
|
||||
<textarea class="wp100 inner20 bds-2-eb font-28 ulib-r10" style="height:200rpx;" placeholder-class="color-ccc" maxlength='100' placeholder="请填写战败理由" name='defeat_reason' model:value='{{defeat_reason}}' />
|
||||
</view>
|
||||
|
||||
@@ -472,7 +472,7 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//是否添加个微
|
||||
//是否贴息
|
||||
switchTiexi:function(e){
|
||||
this.setData({
|
||||
is_tiexi:e.detail.value ? 1 :0
|
||||
|
||||
Reference in New Issue
Block a user