客户详情
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
.bds-1-eb{border:#ebebeb 1rpx solid; box-sizing:border-box;}
|
||||
.btd-1-eb{border-top:#ebebeb 1rpx dashed;box-sizing:border-box;}
|
||||
|
||||
.bds-2-eb{border:#ebebeb 2rpx solid; box-sizing:border-box;}
|
||||
|
||||
.bds-2-fff{border:#fff 2rpx solid; box-sizing:border-box;}
|
||||
|
||||
.bds-7dbeeb{border:#7dbeeb 1rpx solid;box-sizing:border-box;}
|
||||
|
||||
Vendored
+13
-4
File diff suppressed because one or more lines are too long
@@ -35,6 +35,9 @@ Page({
|
||||
isShowOrder:false,//是否显示订单弹窗
|
||||
v2OrderId:_.config.v2OrderId,//订单id临界切换版本
|
||||
order:[],//客户订单
|
||||
|
||||
levelIndex:-1,
|
||||
level: ["H", "A", "B", "C", "D"]//等级
|
||||
},
|
||||
onLoad(options) {
|
||||
for (let key in options) {
|
||||
@@ -74,10 +77,20 @@ Page({
|
||||
_.apiQuery.getAppCustomersDetails(params).then(res=>{
|
||||
this.setData({
|
||||
detailinfo:res.data,
|
||||
//statuskey:res.data.status,
|
||||
statuskey:res.data.status,
|
||||
})
|
||||
|
||||
if(res.data.generate_order){
|
||||
if(res.data.level){
|
||||
this.data.level.forEach((item,index) => {
|
||||
if(item == res.data.level){
|
||||
this.setData({
|
||||
levelIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if(res.data.generate_order&&res.data.status==2){
|
||||
this.getAppCusorderV2Customer()
|
||||
}
|
||||
|
||||
@@ -99,6 +112,7 @@ Page({
|
||||
|
||||
//获取客户订单
|
||||
getAppCusorderV2Customer(){
|
||||
console.log('获取客户订单')
|
||||
let params = {};
|
||||
params['customer_id'] = this.data.id;
|
||||
_.apiQuery.getAppCusorderV2Customer(params).then(res=>{
|
||||
@@ -232,10 +246,6 @@ Page({
|
||||
photos:[],
|
||||
})
|
||||
}
|
||||
}else{
|
||||
this.setData({
|
||||
statuskey:-10,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -262,7 +272,7 @@ Page({
|
||||
|
||||
//修改状态和到店次数、试驾次数
|
||||
putAppCustomers(e){
|
||||
if(this.data.statuskey == -10 && this.data.photos.length == 0 && this.data.note == ''){
|
||||
if(this.data.statuskey == -10 && this.data.photos.length == 0 && this.data.note == ''&& this.data.levelIndex>-1&&this.data.level[this.data.levelIndex]==this.data.detailinfo.level){
|
||||
wx.showToast({
|
||||
title: '您还没进行任何操作',
|
||||
icon: 'none'
|
||||
@@ -303,12 +313,14 @@ Page({
|
||||
if(this.data.defeat_reason != ''){
|
||||
params['defeat_reason'] = this.data.defeat_reason;
|
||||
}
|
||||
if(this.data.levelIndex>-1){
|
||||
params['level'] = this.data.level[this.data.levelIndex];
|
||||
}
|
||||
_.apiQuery.putAppCustomers(params).then(res=>{
|
||||
this.setData({
|
||||
isShowNote:false,//新增日志弹窗
|
||||
a_num:'',//到店次数
|
||||
t_num:'',//试驾次数
|
||||
statuskey:-10,//状态值
|
||||
note:'',//日志
|
||||
photos:[],
|
||||
defeat_reason:'',//战败理由
|
||||
@@ -441,7 +453,6 @@ Page({
|
||||
isShowNote:!this.data.isShowNote,
|
||||
a_num:'',//到店次数
|
||||
t_num:'',//试驾次数
|
||||
statuskey:-10,//状态值
|
||||
note:'',//日志
|
||||
photos:[],
|
||||
defeat_reason:'',//战败理由
|
||||
@@ -593,6 +604,15 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//客户等级
|
||||
changeLevel(e) {
|
||||
if(this.data.levelIndex != e.detail.value && e.detail.value >= 0){
|
||||
this.setData({
|
||||
levelIndex:e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh(){
|
||||
this.setData({
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</view>
|
||||
<view wx:if="{{item.imgs.length>0}}">
|
||||
<block wx:for="{{item.imgs}}" wx:for-item="img" wx:for-index="j" wx:key="j">
|
||||
<image bindtap="previewImage" data-current="{{img}}" data-index="{{index}}" class='img-125x75 mr10 bds-1-eb ulib-r5' src='{{img}}' mode='aspectFill'></image>
|
||||
<image bindtap="previewImage" data-current="{{img}}" data-index="{{index}}" class='img-125x75 mr10 bds-2-eb ulib-r5' src='{{img}}' mode='aspectFill'></image>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
@@ -129,11 +129,11 @@
|
||||
<view class="fn-flex-item flexsize4 pt20 pb20 bds-2-36afa2 bg-fff font-32 color-36afa2 ulib-rl750" bindtap="putAppCustomersDefeats" data-type="0">战败</view>
|
||||
<view class="fn-flex-item flexsize4 pt20 pb20 btn-36afa2 font-32 color-fff ulib-rr750" bindtap="putAppCustomersDefeats" data-type="1">再战</view>
|
||||
</block>
|
||||
<block wx:elif="{{detailinfo.status ==2}}">
|
||||
<block wx:elif="{{detailinfo.status==2}}">
|
||||
<view class="fn-flex-item flexsize4 pt20 pb20 bds-2-36afa2 bg-fff font-32 color-36afa2 ulib-rl750" bindtap="optShowNote">客户跟进</view>
|
||||
<view class="fn-flex-item flexsize4 pt20 pb20 btn-36afa2 font-32 color-fff ulib-rr750" bindtap="optShowOrder">查看订单</view>
|
||||
</block>
|
||||
<block wx:elif="{{detailinfo.status ==3}}">
|
||||
<block wx:elif="{{detailinfo.status==3}}">
|
||||
<view class="fn-flex-item flexsize4 pt20 pb20 bds-2-36afa2 bg-fff font-32 color-36afa2 ulib-rl750" bindtap="optShowNote">客户跟进</view>
|
||||
<view class="fn-flex-item flexsize4 pt20 pb20 btn-36afa2 font-32 color-fff ulib-rr750" bindtap="optShowNote">再战</view>
|
||||
</block>
|
||||
@@ -150,7 +150,7 @@
|
||||
<lcb-msg isShow="{{isShowMessage}}">
|
||||
<view slot="content">
|
||||
<view class="inner40">
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" placeholder-class="color-ccc" maxlength='100' placeholder="请输入短信内容" bindinput='inputTx' data-key="content" name='content' value='{{content}}' />
|
||||
<textarea class="wp100 inner20 bds-2-eb font-28 ulib-r10" placeholder-class="color-ccc" maxlength='100' placeholder="请输入短信内容" bindinput='inputTx' data-key="content" name='content' value='{{content}}' />
|
||||
</view>
|
||||
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
|
||||
<button bindtap="hideMessage" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
|
||||
@@ -160,15 +160,15 @@
|
||||
</lcb-msg>
|
||||
|
||||
<lcb-msg isShow="{{isShowNote}}">
|
||||
<view slot="content" >
|
||||
<view class="pt40 pl40 pr40 font-36 text-center">客户跟进</view>
|
||||
<view slot="content" class="pt20" >
|
||||
<!-- <view class="pt40 pl40 pr40 font-36 text-center">客户跟进</view> -->
|
||||
<block wx:if="{{detailinfo.status ==3}}">
|
||||
<view class="mt30 pl30 pr30 font-28 text-center fn-flex">
|
||||
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{statuskey == 0?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="radioPicker" data-key="0">未见客户</view>
|
||||
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{statuskey == 1?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="radioPicker" data-key="1">到店客户</view>
|
||||
</view>
|
||||
<view class="mt30 pl40 pr40">
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" style="height:150rpx;" placeholder-class="color-ccc" placeholder="请输入小记内容" bname='note' model:value='{{note}}' />
|
||||
<textarea class="wp100 inner20 bds-2-eb font-28 ulib-r10" style="height:200rpx;" placeholder-class="color-ccc" placeholder="请输入小记内容" bname='note' model:value='{{note}}' />
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
@@ -177,21 +177,29 @@
|
||||
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{statuskey == 1?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="radioPicker" data-key="1">到店客户</view>
|
||||
<view class="fn-flex-item relative ml10 mr10 pt20 pb20 ulib-r10 {{statuskey == 3?'bg-36afa2 color-fff':'bg-f6'}}" bindtap="radioPicker" data-key="3">战败客户</view>
|
||||
</view>
|
||||
<view class="mt30 pl40 pr40 font-28 fn-clear" wx:if="{{statuskey==1}}">
|
||||
<view class="fn-fl relative pl40" bindtap="checkPicker" data-pointer="daodian">
|
||||
<i class="absolute left-0 box-middle iconfont font-32 {{a_num == 1?'icon-fuxuansel color-36afa2':'icon-fuxuankuang color-999'}}"></i>
|
||||
<text>客户到店</text>
|
||||
<view class="mt30 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="changeLevel" value="{{levelIndex}}" range="{{level}}">
|
||||
<text class="color-ccc" wx:if="{{levelIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{level[levelIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo color-ccc"></i>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="mt30 pl40 pr40 font-28 text-center fn-flex" wx:if="{{statuskey==1}}">
|
||||
<view class="fn-flex-item relative mr10 pt20 pb20 ulib-r10 overflowhidden {{a_num == 1?'bg-36afa2 color-fff':'bg-f6'}}" style="height:78rpx;box-sizing:border-box;" bindtap="checkPicker" data-pointer="daodian">
|
||||
<i class="absolute right-0 bottom-0 iconfont font-32 icon-xuanzhongjiaobiao" style="color:#56ffed;" wx:if="{{a_num == 1}}"></i>
|
||||
<text>再次到店</text>
|
||||
</view>
|
||||
<view class="fn-fr relative pl40" bindtap="checkPicker" data-pointer="shijia">
|
||||
<i class="absolute left-0 box-middle iconfont font-32 {{t_num == 1?'icon-fuxuansel color-36afa2':'icon-fuxuankuang color-999'}}"></i>
|
||||
<view class="fn-flex-item relative ml10 pt20 pb20 ulib-r10 overflowhidden {{t_num == 1?'bg-36afa2 color-fff':'bg-f6'}}" style="height:78rpx;box-sizing:border-box;" bindtap="checkPicker" data-pointer="shijia">
|
||||
<i class="absolute right-0 bottom-0 iconfont font-32 icon-xuanzhongjiaobiao" style="color:#56ffed;" wx:if="{{t_num == 1}}"></i>
|
||||
<text>客户试驾</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt30 pl40 pr40" wx:if="{{statuskey==3}}">
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" style="height:150rpx;" placeholder-class="color-ccc" maxlength='100' placeholder="请填写战败理由" name='defeat_reason' model:value='{{defeat_reason}}' />
|
||||
<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>
|
||||
<view class="mt30 pl40 pr40" wx:else>
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" style="height:150rpx;" placeholder-class="color-ccc" placeholder="请输入小记内容" bname='note' model:value='{{note}}' />
|
||||
<textarea class="wp100 inner20 bds-2-eb font-28 ulib-r10" style="height:200rpx;" placeholder-class="color-ccc" placeholder="请输入小记内容" bname='note' model:value='{{note}}' />
|
||||
</view>
|
||||
<view class="mt30 pl25 pr25" wx:if="{{statuskey!=3}}">
|
||||
<view class="fn-flex">
|
||||
|
||||
Reference in New Issue
Block a user