战败客户列表
This commit is contained in:
@@ -77,7 +77,7 @@ api = {
|
||||
materialStatisticsCal: 'material/statistics/cal', //数据分析_累计数据
|
||||
materialStatisticsChart: 'material/statistics/chart', //数据分析_图表
|
||||
|
||||
|
||||
appCustomersDefeats: 'app/customers/defeats', //战败客户列表 /战败/再战申请
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -502,4 +502,18 @@ apiQuery.getMaterialStatisticsChart = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//战败客户列表
|
||||
apiQuery.getAppCustomersDefeats = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appCustomersDefeats, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//战败/再战申请
|
||||
apiQuery.putAppCustomersDefeats = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appCustomersDefeats, 2, params, "PUT", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
export default apiQuery;
|
||||
@@ -49,6 +49,7 @@ Page({
|
||||
timeArray:[],//预计购车时间列表
|
||||
timeIndex:-1,//预计购车时间索引
|
||||
cf_clues:'',//线索来源
|
||||
defeat_reason:'',//战败理由
|
||||
submitFlag:false,
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -255,6 +256,7 @@ Page({
|
||||
a_num:'',//到店次数
|
||||
t_num:'',//试驾次数
|
||||
statuskey:-10,//状态值
|
||||
defeat_reason:'',//战败理由
|
||||
isShowSelectStatus:true,
|
||||
})
|
||||
},
|
||||
@@ -270,27 +272,50 @@ Page({
|
||||
putAppCustomers(e){
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
if(this.data.statuskey != -10){
|
||||
params['status'] = this.data.statuskey;
|
||||
}
|
||||
if(this.data.t_num != ''){
|
||||
params['t_num'] = this.data.t_num;
|
||||
}
|
||||
if(this.data.a_num != ''){
|
||||
params['a_num'] = this.data.a_num;
|
||||
}
|
||||
_.apiQuery.putAppCustomers(params).then(res=>{
|
||||
this.setData({
|
||||
isShowSelectStatus:false,
|
||||
if(this.data.statuskey != -10){
|
||||
params['status'] = this.data.statuskey;
|
||||
if(this.data.statuskey == 3&&this.data.defeat_reason == ''){
|
||||
wx.showToast({
|
||||
title: '请填写战败理由',
|
||||
icon: 'none'
|
||||
})
|
||||
}else{
|
||||
if(this.data.defeat_reason != ''){
|
||||
params['defeat_reason'] = this.data.defeat_reason;
|
||||
}
|
||||
_.apiQuery.putAppCustomers(params).then(res=>{
|
||||
this.setData({
|
||||
isShowSelectStatus:false,
|
||||
})
|
||||
wx.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
this.onPullDownRefresh()
|
||||
|
||||
})
|
||||
}
|
||||
}else{
|
||||
_.apiQuery.putAppCustomers(params).then(res=>{
|
||||
this.setData({
|
||||
isShowSelectStatus:false,
|
||||
})
|
||||
wx.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
this.onPullDownRefresh()
|
||||
|
||||
})
|
||||
wx.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
this.onPullDownRefresh()
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//推送链接
|
||||
@@ -493,6 +518,30 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//战败/再战申请
|
||||
putAppCustomersDefeats(e){
|
||||
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
params['type'] = e.currentTarget.dataset.type;
|
||||
_.apiQuery.putAppCustomersDefeats(params).then(res => {
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '操作成功',
|
||||
confirmText: "知道了",
|
||||
showCancel:false,
|
||||
success(resm) {
|
||||
if (resm.confirm) {
|
||||
wx.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
/*************************** 编辑 **********************************/
|
||||
//获取车型品牌
|
||||
getAppSeriesBrands(){
|
||||
|
||||
@@ -193,8 +193,8 @@
|
||||
|
||||
<view class="fixed left-0 bottom-0 right-0 bg-fff-op80 pl40 pr40 pt20 pb40 z-index-1">
|
||||
<view class="fn-flex" wx:if="{{optDefeat}}">
|
||||
<button class="fn-flex-item bds-2-36afa2 bg-fff mr20 pt10 pb10 text-center font-32 color-36afa2 ulib-r750" bindtap="optShowNote">战败</button>
|
||||
<button class="fn-flex-item btn-36afa2 ml20 pt10 pb10 text-center font-32 color-fff ulib-r750" bindtap="showSelectStatus">再战</button>
|
||||
<button class="fn-flex-item bds-2-36afa2 bg-fff mr20 pt10 pb10 text-center font-32 color-36afa2 ulib-r750" bindtap="putAppCustomersDefeats" data-type="0">战败</button>
|
||||
<button class="fn-flex-item btn-36afa2 ml20 pt10 pb10 text-center font-32 color-fff ulib-r750" bindtap="putAppCustomersDefeats" data-type="1">再战</button>
|
||||
</view>
|
||||
<view class="fn-flex" wx:else>
|
||||
<button class="fn-flex-item bds-2-36afa2 bg-fff mr20 pt10 pb10 text-center font-32 color-36afa2 ulib-r750" bindtap="optShowNote"><i class="iconfont icon-xiaoji mr10"></i>小记</button>
|
||||
@@ -270,7 +270,7 @@
|
||||
</block>
|
||||
</view>
|
||||
<view class="pt20 pl40 pr40" wx:if="{{statuskey==3}}">
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" style="height:120rpx;" placeholder-class="color-ccc" maxlength='100' placeholder="请填写战败理由" bindinput='inputTx' data-key="defeatNote" name='defeatNote' value='{{defeatNote}}' />
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" style="height:120rpx;" placeholder-class="color-ccc" maxlength='100' placeholder="请填写战败理由" bindinput='inputTx' data-key="defeat_reason" name='defeat_reason' value='{{defeat_reason}}' />
|
||||
</view>
|
||||
<view class="mt40 bts-1-eb ml40 mr40"></view>
|
||||
<view class="mt20 pl20 pr15 font-28 fn-clear">
|
||||
|
||||
@@ -21,6 +21,7 @@ Page({
|
||||
v_id:'',//车型级别id
|
||||
cfrom:'',//客户来源
|
||||
o_type:'',//排序类型
|
||||
visit:'',//只显示待回访客户(1是)
|
||||
},
|
||||
onLoad(options) {
|
||||
for (let key in options) {
|
||||
@@ -48,6 +49,9 @@ Page({
|
||||
let params = {};
|
||||
params['page'] = this.data.pageNo;
|
||||
params['size'] = 10;
|
||||
if(this.data.visit != ''){
|
||||
params['visit'] = this.data.visit;
|
||||
}
|
||||
if(this.data.istop != ''){
|
||||
params['istop'] = this.data.istop;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
<block wx:for='{{list}}' wx:key='index'>
|
||||
<view class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden" bindtap="pushLink" data-url="/pages/customer/detail/index?id={{item.id}}">
|
||||
<view class="absolute top-0 left-0 ml40 bg-36afa2 pl10 pr10 font-22 color-fff" wx:if="{{item.defeat}}">{{item.defeat}}</view>
|
||||
<view class="relative pr180">
|
||||
<view class="font-32">
|
||||
<text>{{item.name}}</text>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
<block wx:for='{{list}}' wx:key='index'>
|
||||
<view class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden" bindtap="pushLink" data-url="/pages/customer/detail/index?id={{item.id}}">
|
||||
<view class="absolute top-0 left-0 ml40 bg-36afa2 pl10 pr10 font-22 color-fff">战败申请中</view>
|
||||
<view class="absolute top-0 left-0 ml40 bg-36afa2 pl10 pr10 font-22 color-fff" wx:if="{{item.defeat}}">{{item.defeat}}</view>
|
||||
<view class="relative pr180">
|
||||
<view class="font-32">
|
||||
<text>{{item.name}}</text>
|
||||
|
||||
@@ -18,7 +18,7 @@ Page({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
this.getAppCustomersList()
|
||||
this.getAppCustomersDefeats()
|
||||
},
|
||||
|
||||
onShow(){
|
||||
@@ -27,12 +27,12 @@ Page({
|
||||
isfirstonShow:false,
|
||||
})
|
||||
}else{
|
||||
this.getAppCustomersListOnShow()
|
||||
this.getAppCustomersDefeatsOnShow()
|
||||
}
|
||||
},
|
||||
|
||||
//获取客户列表
|
||||
getAppCustomersList(){
|
||||
getAppCustomersDefeats(){
|
||||
this.setData({
|
||||
load: false,
|
||||
loading: true,
|
||||
@@ -40,7 +40,7 @@ Page({
|
||||
let params = {};
|
||||
params['page'] = this.data.pageNo;
|
||||
params['size'] = 10;
|
||||
_.apiQuery.getAppCustomersList(params).then(res => {
|
||||
_.apiQuery.getAppCustomersDefeats(params).then(res => {
|
||||
this.setData({
|
||||
total: res.data.total,
|
||||
pageNo: this.data.pageNo + 1,
|
||||
@@ -62,11 +62,11 @@ Page({
|
||||
},
|
||||
|
||||
//获取客户列表
|
||||
getAppCustomersListOnShow(){
|
||||
getAppCustomersDefeatsOnShow(){
|
||||
let params = {};
|
||||
params['page'] = 1;
|
||||
params['size'] = (this.data.pageNo-1)*10;
|
||||
_.apiQuery.getAppCustomersList(params).then(res => {
|
||||
_.apiQuery.getAppCustomersDefeats(params).then(res => {
|
||||
this.setData({
|
||||
total: res.data.total,
|
||||
list:res.data.list,
|
||||
@@ -100,13 +100,13 @@ Page({
|
||||
load: true,
|
||||
loading: false,
|
||||
})
|
||||
this.getAppCustomersList()
|
||||
this.getAppCustomersDefeats()
|
||||
},
|
||||
|
||||
//页面上拉触底事件的处理函数
|
||||
onReachBottom(){
|
||||
if (this.data.noData || this.data.end||!this.data.load) return;
|
||||
this.getAppCustomersList()
|
||||
this.getAppCustomersDefeats()
|
||||
},
|
||||
|
||||
})
|
||||
@@ -11,7 +11,7 @@
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle font-24 color-666">查看详情<text class="iconfont icon-gengduo ml10"></text></view>
|
||||
</view>
|
||||
<view class="mt15 pt5 pb5 pl20 pr20 font-22 color-f9394d tip-radius">战败理由:该用户已经在其他地方购买了车辆。</view>
|
||||
<view class="mt15 pt5 pb5 pl20 pr20 font-22 color-f9394d tip-radius" wx:if="{{item.reason}}">{{item.reason}}</view>
|
||||
</view>
|
||||
</block>
|
||||
<lcb-listmore isLoading='{{loading}}' isEnd='{{end}}' isNoData='{{noData}}'></lcb-listmore>
|
||||
|
||||
+12
-30
@@ -32,37 +32,19 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative mt10 mb40 bg-2f3346-1a1c26 color-fff ulib-r10" >
|
||||
<view class="relative pt20 pb30 pl30 pr30 bbs-1-474a65 last-b-none" wx:if="{{userInfo.group_id == 2 || userInfo.group_id == 3 || userInfo.group_id == 4}}" bindtap="pushLink" data-url="/pages/customer/allot/index">
|
||||
<view>
|
||||
<i class="iconfont icon-daifenpei text-middle font-30"></i>
|
||||
<text class="ml10 font-22 text-middle">待分配客户(人)</text>
|
||||
<view class="relative mt10 mb40 bg-2f3346-1a1c26 color-fff ulib-r10" wx:if="{{userCal.customer_op_list.length>0}}" >
|
||||
<block wx:for="{{userCal.customer_op_list}}" wx:key='index'>
|
||||
<view class="relative pt20 pb30 pl30 pr30 bbs-1-474a65 last-b-none" bindtap="pushLink" data-url="{{item.page}}">
|
||||
<view>
|
||||
<i class="iconfont {{item.icon}} text-middle font-30"></i>
|
||||
<text class="ml10 font-22 text-middle">{{item.title}}</text>
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle mr25 mb10 font-40">
|
||||
<text class="text-middle">{{item.total}}</text>
|
||||
<i class="iconfont icon-gengduo ml5 text-middle font-26"></i>
|
||||
</view>
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle mr25 mb10 font-40">
|
||||
<text class="text-middle">{{userCal.unuse_count}}</text>
|
||||
<i class="iconfont icon-gengduo ml5 text-middle font-26"></i>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative pt20 pb30 pl30 pr30 bbs-1-474a65 last-b-none" wx:if="{{userInfo.group_id == 2 || userInfo.group_id == 3 || userInfo.group_id == 4}}" bindtap="pushLink" data-url="/pages/customer/allot/index">
|
||||
<view>
|
||||
<i class="iconfont icon-statistics-custom-4 text-middle font-30"></i>
|
||||
<text class="ml10 font-22 text-middle">待回访客户(人)</text>
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle mr25 mb10 font-40">
|
||||
<text class="text-middle">{{userCal.unuse_count}}</text>
|
||||
<i class="iconfont icon-gengduo ml5 text-middle font-26"></i>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative pt20 pb30 pl30 pr30 bbs-1-474a65 last-b-none" wx:if="{{userInfo.group_id == 2 || userInfo.group_id == 3 || userInfo.group_id == 4}}" bindtap="pushLink" data-url="/pages/customer/optDefeat/index">
|
||||
<view>
|
||||
<i class="iconfont icon-statistics-custom-5 text-middle font-30"></i>
|
||||
<text class="ml10 font-22 text-middle">战败申请(人)</text>
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle mr25 mb10 font-40">
|
||||
<text class="text-middle">{{userCal.unuse_count}}</text>
|
||||
<i class="iconfont icon-gengduo ml5 text-middle font-26"></i>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="mt20 font-36">订单代办事项</view>
|
||||
<view class="fn-flex fn-flex-wrap pt30 pb10">
|
||||
|
||||
Reference in New Issue
Block a user