修改线索解锁流程
This commit is contained in:
@@ -50,6 +50,7 @@ api = {
|
||||
appYx: "app/yx", //获取云信虚拟电话
|
||||
appCustomerlogs: "app/customerlogs", //新增日志
|
||||
appCustomerData: "app/customers/data", //修改客户基本信息
|
||||
appCustomerUnlockReason: "app/customers/lockReason", //获取不解锁原因
|
||||
appServicesPackage: "app/services/package", //获取代办包
|
||||
appSeriesInfo: "app/series/info", //获取车辆价格
|
||||
appBusiness: "app/business", //获取商务政策
|
||||
|
||||
@@ -1130,4 +1130,9 @@ apiQuery.putAppCustomerLock = function (params) {
|
||||
HttpRequest(true, Config.api.appCustomerLock, 2, params, "PUT", resolve, reject)
|
||||
})
|
||||
}
|
||||
apiQuery.getAppCustomerUnlockReason = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appCustomerUnlockReason, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
export default apiQuery;
|
||||
+59
-9
@@ -106,7 +106,10 @@ Page({
|
||||
isShowLock: false,
|
||||
cluesTabKey: 1000, //线索tabkey
|
||||
cluesId: 0, //当前操作线索id
|
||||
needShowUnlockConfig: true
|
||||
needShowUnlockConfig: true,
|
||||
isShowNotLock: false, //是否显示不解锁弹窗
|
||||
reasonList: [], //不解锁理由
|
||||
reasonIndex: -1
|
||||
},
|
||||
onLoad(options) {
|
||||
for (let key in options) {
|
||||
@@ -139,7 +142,8 @@ Page({
|
||||
this.setData({
|
||||
needShowUnlockConfig: app.getStorageByKey("needShowUnlockConfig") ? false : true,
|
||||
})
|
||||
console.log("是否显示解锁弹窗:",this.data.needShowUnlockConfig);
|
||||
this.getReasonList()
|
||||
// console.log("是否显示解锁弹窗:",this.data.needShowUnlockConfig);
|
||||
},
|
||||
|
||||
onShow() {
|
||||
@@ -1147,7 +1151,7 @@ Page({
|
||||
this.setData({
|
||||
cluesId: e.currentTarget.dataset.id
|
||||
})
|
||||
this.bindLock();
|
||||
this.bindLock(e);
|
||||
}
|
||||
},
|
||||
hideLock() {
|
||||
@@ -1155,11 +1159,26 @@ Page({
|
||||
isShowLock: false
|
||||
})
|
||||
},
|
||||
//解绑
|
||||
bindLock(){
|
||||
let that = this;
|
||||
//解锁
|
||||
bindLock(e){
|
||||
let that = this
|
||||
let unlock = 0 //是否不解锁 0否1是
|
||||
let reason = ""
|
||||
if(e.currentTarget.dataset.unlock){
|
||||
unlock = 1
|
||||
if(this.data.reasonIndex==-1){
|
||||
wx.showToast({
|
||||
title: '请选择理由',
|
||||
icon: 'none'
|
||||
})
|
||||
return false
|
||||
}
|
||||
reason = this.data.reasonList[this.data.reasonIndex]
|
||||
}
|
||||
let params = {
|
||||
'id' : this.data.cluesId
|
||||
'id' : this.data.cluesId,
|
||||
'unlock': unlock,
|
||||
'reason' : reason
|
||||
};
|
||||
_.apiQuery.putAppCustomerLock(params).then(res => {
|
||||
wx.showToast({
|
||||
@@ -1167,8 +1186,12 @@ Page({
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
app.setStorage("needShowUnlockConfig", 1);
|
||||
that.hideLock();
|
||||
if(unlock){ //不解锁
|
||||
that.hideNotlock()
|
||||
}else{ //解锁
|
||||
app.setStorage("needShowUnlockConfig", 1);
|
||||
that.hideLock();
|
||||
}
|
||||
that.onPullDownRefresh();
|
||||
})
|
||||
},
|
||||
@@ -1179,5 +1202,32 @@ Page({
|
||||
if(row.un_lock){
|
||||
_.$router.openUrlScheme(url);
|
||||
}
|
||||
},
|
||||
//不解锁弹窗
|
||||
showNotlock(e){
|
||||
this.setData({
|
||||
isShowNotLock: true,
|
||||
cluesId: e.currentTarget.dataset.id
|
||||
})
|
||||
},
|
||||
hideNotlock(){
|
||||
this.setData({
|
||||
isShowNotLock: false
|
||||
})
|
||||
},
|
||||
//获取不解锁原因
|
||||
getReasonList() {
|
||||
_.apiQuery.getAppCustomerUnlockReason().then(res => {
|
||||
this.setData({
|
||||
reasonList: res.data
|
||||
})
|
||||
});
|
||||
},
|
||||
changeReason(e){
|
||||
if(this.data.reasonIndex != e.detail.value && e.detail.value >= 0){
|
||||
this.setData({
|
||||
reasonIndex:e.detail.value
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -92,9 +92,11 @@
|
||||
<text class="text-middle">{{item.name}}</text>
|
||||
<text class="text-middle font-26 color-666">({{item.mobile}})</text>
|
||||
</view>
|
||||
<!--
|
||||
<view class="absolute right-0 top-0" wx:if="{{item.un_lock==0}}">
|
||||
<view class="font-26 mt10" style="color:#f63c51">{{'距转派还剩'+item.left_time}}</view>
|
||||
</view>
|
||||
-->
|
||||
</view>
|
||||
<view class="relative">
|
||||
<view class="mt25 fn-clear font-28 pr180">
|
||||
@@ -105,10 +107,19 @@
|
||||
<view class="fn-fl color-333 mr15">意向车型</view>
|
||||
<view class="fn-fl color-666">{{item.other_data['关注车型']}}</view>
|
||||
</view>
|
||||
<!--
|
||||
<view class="absolute right-0 box-middle" wx:if="{{!item.un_lock}}" bind:tap="showUnlock" data-id="{{item.id}}">
|
||||
<!-- <view class="font-26 mt10" style="color:#f63c51">{{'距转派还剩4小时23分'}}</view> -->
|
||||
<button class="btn color-fff font-26 ulib-r750" style="background-color:#f63c51"><text class="iconfont icon-xiaoji mr5"></text>解锁查看</button>
|
||||
</view>
|
||||
-->
|
||||
<view class="mt25 fn-clear">
|
||||
<view class="fn-fl wp50 pl25 pl25 pr25" wx:if="{{!item.un_lock}}" bind:tap="showNotlock" data-id="{{item.id}}">
|
||||
<button class="btn color-fff font-26 ulib-r750 btn-36afa2"><text class="iconfont icon-xiaoji mr5"></text>不解锁</button>
|
||||
</view>
|
||||
<view class="fn-fl wp50 pl25 pr25" wx:if="{{!item.un_lock}}" bind:tap="showUnlock" data-id="{{item.id}}">
|
||||
<button class="btn color-fff font-26 ulib-r750" style="background-color:#f63c51"><text class="iconfont icon-xiaoji mr5"></text>解锁查看</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative mt20 overflowhidden">
|
||||
<view class="orderDtail-log mt40 relative" wx:if="{{item.logList.length>0}}">
|
||||
@@ -559,5 +570,29 @@
|
||||
</view>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
<!-- 确认不解锁线索 -->
|
||||
<lcb-msg isShow="{{isShowNotLock}}" isCustomTabBar="{{true}}">
|
||||
<view slot="content">
|
||||
<view class="pt50">
|
||||
<view class="font-36 text-center">确认不解锁线索</view>
|
||||
</view>
|
||||
<view class="mt20 bds-2-eb ml40 mr40 inner20 font-28 color-666 fn-clear ulib-r10">
|
||||
<view class="fn-fl">选择理由</view>
|
||||
<picker class="fn-fr wp60 text-right" bindchange="changeReason" value="{{reasonIndex}}" range="{{reasonList}}">
|
||||
<text class="color-ccc" wx:if="{{reasonIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{reasonList[reasonIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="fn-flex mt20 pl60 pr60 pb50 text-center font-32 color-666">
|
||||
<button bindtap="hideNotlock" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">
|
||||
取消
|
||||
</button>
|
||||
<button bindtap="bindLock" data-unlock="true" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">
|
||||
确定
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
|
||||
<brandSelect show="{{brand_page_show}}" bindleave="getBrandData"></brandSelect>
|
||||
Reference in New Issue
Block a user