Compare commits
2 Commits
featue/yerz
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ff6be6a61 | |||
| ef857babd2 |
@@ -1,4 +1,4 @@
|
||||
const env = "p";
|
||||
const env = "d";
|
||||
|
||||
const version = 1,
|
||||
|
||||
|
||||
@@ -26,6 +26,18 @@ Page({
|
||||
'未见客户',
|
||||
'到店客户',
|
||||
],
|
||||
|
||||
c_brands:[
|
||||
'综合','东风纳米','哪吒','零跑'
|
||||
],
|
||||
|
||||
c_brandArray:[
|
||||
{id:0, name:'综合'},
|
||||
{id:1, name:'东风纳米'},
|
||||
{id:4, name:'哪吒'},
|
||||
{id:5, name:'零跑'},
|
||||
],
|
||||
|
||||
of_id:'',
|
||||
of2_id:'',
|
||||
of1Index:-1,
|
||||
@@ -35,6 +47,7 @@ Page({
|
||||
city_id:'',
|
||||
countyIndex:-1,
|
||||
county_id:'',
|
||||
c_brandIndex:-1,
|
||||
|
||||
isShowExist:false, //客户是否已存在
|
||||
wxgr:0,//是否添加个微
|
||||
@@ -281,6 +294,12 @@ Page({
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if (that.data.c_brandArray.length>0&&that.data.c_brandIndex == -1 ) {
|
||||
wx.showToast({
|
||||
title: '请选择客户品牌归属',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if (that.data.sources.length>0&&that.data.of_id == '' ) {
|
||||
wx.showToast({
|
||||
title: '请选择客户来源',
|
||||
@@ -348,6 +367,9 @@ Page({
|
||||
// if(this.data.b_s_id != ''){
|
||||
// params['b_s_id'] = this.data.b_s_id;
|
||||
// }
|
||||
if(this.data.c_brandIndex != -1){
|
||||
params['c_brand'] = this.data.c_brandArray[this.data.c_brandIndex].id;
|
||||
}
|
||||
if(this.data.of_id != ''){
|
||||
params['of_id'] = this.data.of_id;
|
||||
}
|
||||
@@ -481,6 +503,14 @@ Page({
|
||||
county_id:res.data.county_id,
|
||||
taglList:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
|
||||
})
|
||||
this.data.c_brandArray.forEach((item,index) => {
|
||||
if(res.data.c_brand == item.id){
|
||||
this.setData({
|
||||
c_brandIndex:index
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
//获取城市
|
||||
this.getAppCityArea_city()
|
||||
//获取地区
|
||||
@@ -551,6 +581,15 @@ Page({
|
||||
});
|
||||
},
|
||||
|
||||
//选择城市
|
||||
changeCbrand(e) {
|
||||
if(this.data.c_brandIndex!=e.detail.value){
|
||||
this.setData({
|
||||
c_brandIndex:e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//选择城市
|
||||
changeCity(e) {
|
||||
if(this.data.cityIndex!=e.detail.value){
|
||||
|
||||
@@ -22,16 +22,17 @@
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="number" placeholder="请输入客户手机号" bindinput='inputTx' data-key="mobile" name='mobile' value='{{mobile}}' />
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">车辆品牌</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">品牌归属</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeBrand" value="{{brandIndex}}" range="{{brandArray}}">
|
||||
<text class="color-ccc" wx:if="{{brandIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{brandArray[brandIndex]}}</text>
|
||||
<picker bindchange="changeCbrand" value="{{c_brandIndex}}" range="{{c_brands}}">
|
||||
<text class="color-ccc" wx:if="{{c_brandIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{c_brands[c_brandIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<!--
|
||||
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{brandIndex != -1}}">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">车系车型</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666 text-nowrap">
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
</view> -->
|
||||
<view class="absolute right-0 box-middle text-right mt5">
|
||||
<view class="text-center">
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff mr30 ulib-r750" catchtap="showMessage" data-id="{{detailinfo.id}}">
|
||||
<!--view class="inline-block relative img-55x55 bg-333 font-28 color-fff mr30 ulib-r750" catchtap="showMessage" data-id="{{detailinfo.id}}">
|
||||
<i class="absolute box-center-middle iconfont icon-duanxinguanli"></i>
|
||||
</view>
|
||||
</view-->
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff ulib-r750" catchtap="call" data-id="{{detailinfo.id}}">
|
||||
<i class="absolute box-center-middle iconfont icon-dianhua"></i>
|
||||
</view>
|
||||
|
||||
@@ -14,12 +14,25 @@ Page({
|
||||
// levelArray:[],//车辆版本列表
|
||||
// colorIndex:-1,//车身颜色索引
|
||||
// levelIndex:-1,//车辆版本索引
|
||||
|
||||
c_brands:[
|
||||
'综合','东风纳米','哪吒','零跑'
|
||||
],
|
||||
|
||||
c_brandArray:[
|
||||
{id:0, name:'综合'},
|
||||
{id:1, name:'东风纳米'},
|
||||
{id:4, name:'哪吒'},
|
||||
{id:5, name:'零跑'},
|
||||
],
|
||||
|
||||
submitFlag:false,
|
||||
|
||||
of_id:'',
|
||||
of2_id:'',
|
||||
of1Index:-1,
|
||||
of2Index:-1,
|
||||
c_brandIndex:-1,
|
||||
|
||||
cityIndex:-1,
|
||||
city_id:'',
|
||||
@@ -56,6 +69,14 @@ Page({
|
||||
wxgrimg_url:res.data.baseinfo.wxgrimg_url,
|
||||
})
|
||||
|
||||
this.data.c_brandArray.forEach((item,index) => {
|
||||
if(res.data.baseinfo.c_brand == item.id){
|
||||
this.setData({
|
||||
c_brandIndex:index
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
//编辑基础信息使用
|
||||
//获取车型品牌
|
||||
//this.getAppSeriesBrands()
|
||||
@@ -266,6 +287,15 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//选择城市
|
||||
changeCbrand(e) {
|
||||
if(this.data.c_brandIndex!=e.detail.value){
|
||||
this.setData({
|
||||
c_brandIndex:e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//选择品牌
|
||||
changeBrand(e) {
|
||||
if(this.data.brandIndex != e.detail.value && e.detail.value >= 0){
|
||||
@@ -349,6 +379,12 @@ Page({
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if (that.data.c_brandArray.length>0&&that.data.c_brandIndex == -1 ) {
|
||||
wx.showToast({
|
||||
title: '请选择客户品牌归属',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if (that.data.sources.length>0&&that.data.of_id == '' ) {
|
||||
wx.showToast({
|
||||
title: '请选择客户来源',
|
||||
@@ -415,6 +451,9 @@ Page({
|
||||
if(that.data.mobile != that.data.baseinfo.mobile.value){
|
||||
params['mobile'] = that.data.mobile;
|
||||
}
|
||||
if(this.data.c_brandIndex != -1){
|
||||
params['c_brand'] = this.data.c_brandArray[this.data.c_brandIndex].id;
|
||||
}
|
||||
if(that.data.of_id != that.data.baseinfo.of_id.of_id){
|
||||
params['of_id'] = that.data.of_id;
|
||||
}
|
||||
@@ -557,6 +596,7 @@ Page({
|
||||
county_id:res.data.county_id,
|
||||
taglList:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
|
||||
})
|
||||
|
||||
//获取城市
|
||||
this.getAppCityArea_city()
|
||||
//获取地区
|
||||
|
||||
@@ -13,6 +13,16 @@
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="number" placeholder="请输入客户手机号" bindinput='inputTx' data-key="mobile" name='mobile' value='{{mobile}}' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">品牌归属</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeCbrand" value="{{c_brandIndex}}" range="{{c_brands}}">
|
||||
<text class="color-ccc" wx:if="{{c_brandIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{c_brands[c_brandIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">车辆品牌</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
|
||||
@@ -39,6 +39,12 @@ Page({
|
||||
distBiz_id:'',
|
||||
bizArray: [],
|
||||
bizobj: [],
|
||||
isShowfilter:false,//是否显示筛查
|
||||
levelIndex:-1,//意向等级索引
|
||||
staffArray: [],
|
||||
staffobj: [],
|
||||
staffIndex:-1,
|
||||
userInfo:'',
|
||||
|
||||
isShowCall:false,//是否显示拨打电话确认弹框
|
||||
phoneNumber:'',//拨打的电话号码
|
||||
@@ -50,6 +56,10 @@ Page({
|
||||
})
|
||||
}
|
||||
|
||||
this.setData({
|
||||
userInfo:app.getStorageByKey("userInfo"),
|
||||
})
|
||||
|
||||
//顶部tab
|
||||
this.getAppCustomersVisit_tabs()
|
||||
|
||||
@@ -58,6 +68,8 @@ Page({
|
||||
|
||||
this.getTimePicker()
|
||||
|
||||
this.getAppCustomersFilter()
|
||||
|
||||
wx.setNavigationBarTitle({
|
||||
title: this.data.title||'客户'
|
||||
})
|
||||
@@ -87,6 +99,22 @@ Page({
|
||||
});
|
||||
},
|
||||
|
||||
//获取列表筛选条件
|
||||
getAppCustomersFilter(){
|
||||
_.apiQuery.getAppCustomersFilter().then(res => {
|
||||
this.setData({
|
||||
filter:res.data,
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//选择人员
|
||||
changeStaff(e) {
|
||||
this.setData({
|
||||
staffIndex: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//获取客户列表
|
||||
getAppCustomersList() {
|
||||
this.setData({
|
||||
@@ -147,6 +175,11 @@ Page({
|
||||
if(this.data.visit_tab_id != ''){
|
||||
params['visit_tab_id'] = this.data.visit_tab_id;
|
||||
}
|
||||
|
||||
if(this.data.staffIndex>-1){
|
||||
params['admin_id'] = this.data.staffobj[this.data.staffIndex].id;
|
||||
}
|
||||
|
||||
_.apiQuery.getAppCustomersList(params).then(res => {
|
||||
this.setData({
|
||||
total: res.data.total,
|
||||
@@ -193,6 +226,72 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//提交搜索
|
||||
searchSubmit(){
|
||||
this.setData({
|
||||
list: [],
|
||||
pageNo: 1,
|
||||
noData: false,
|
||||
end: false,
|
||||
load: true,
|
||||
loading: false,
|
||||
flag: this.data.flag + 1
|
||||
})
|
||||
this.getAppCustomersList()
|
||||
},
|
||||
|
||||
//客户等级
|
||||
changeLevel(e){
|
||||
|
||||
let level = ''
|
||||
if(e.detail.value >= 0){
|
||||
level = this.data.filter.level[e.detail.value]
|
||||
}
|
||||
|
||||
this.setData({
|
||||
level:level,
|
||||
levelIndex: e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//显示隐藏高级搜索
|
||||
optfilter(){
|
||||
this.setData({
|
||||
isShowfilter: !this.data.isShowfilter
|
||||
})
|
||||
this.resetFilter()
|
||||
},
|
||||
|
||||
//显示高级搜索
|
||||
showfilter(){
|
||||
this.setData({
|
||||
isShowfilter:true,
|
||||
})
|
||||
},
|
||||
|
||||
//确定高级搜索
|
||||
submitFilter() {
|
||||
this.setData({
|
||||
isShowfilter:false,
|
||||
})
|
||||
this.searchSubmit()
|
||||
},
|
||||
|
||||
//重置高级搜索
|
||||
resetFilter() {
|
||||
let staffobj = this.data.staffobj
|
||||
staffobj.forEach(item => {
|
||||
item.checked = false
|
||||
})
|
||||
|
||||
this.setData({
|
||||
staffobj,
|
||||
level:'',
|
||||
levelIndex:-1,
|
||||
staffIndex:-1,
|
||||
})
|
||||
},
|
||||
|
||||
//显示短信弹框
|
||||
showMessage(e){
|
||||
this.setData({
|
||||
|
||||
@@ -20,6 +20,15 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pl40 pb15 fn-clear">
|
||||
<view class="fn-fl">
|
||||
<text class="text-middle">共<text class="color-f9394d"> {{total}} </text>位客户</text>
|
||||
</view>
|
||||
<view class="fn-fr pr40 relative">
|
||||
<text bindtap="showfilter" class="inner5 iconfont icon-gaojisousuo ml10"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mt10 pl30 pr30">
|
||||
|
||||
<block wx:for='{{list}}' wx:key='index'>
|
||||
@@ -46,9 +55,9 @@
|
||||
</block>
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff mr30 ulib-r750" catchtap="showMessage" data-id="{{item.id}}">
|
||||
<!--view class="inline-block relative img-55x55 bg-333 font-28 color-fff mr30 ulib-r750" catchtap="showMessage" data-id="{{item.id}}">
|
||||
<i class="absolute box-center-middle iconfont icon-duanxinguanli"></i>
|
||||
</view>
|
||||
</view-->
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff ulib-r750" catchtap="call" data-id="{{item.id}}">
|
||||
<i class="absolute box-center-middle iconfont icon-dianhua"></i>
|
||||
</view>
|
||||
@@ -101,6 +110,40 @@
|
||||
<lcb-footer></lcb-footer>
|
||||
<lcb-backChannel></lcb-backChannel>
|
||||
|
||||
<view class="search-sort {{!isShowfilter?'fn-hide':''}} {{!isShowfilter?'sortout':'sortin'}} bg-fff fixed top-0 bottom-0 z-index-2 ulib-rl20 overflowhidden">
|
||||
<scroll-view class="wp100" scroll-y="true" style="height:90%">
|
||||
<view class="pt10 pb10 pl30 pr30">
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">意向等级</view>
|
||||
<view class="pt25 pb25 text-right font-28 color-666">
|
||||
<picker bindchange="changeLevel" value="{{levelIndex}}" range="{{filter.level}}">
|
||||
<text class="color-ccc" wx:if="{{levelIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{filter.level[levelIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{staffArray.length>0&&userInfo.group_id>1}}">
|
||||
<view class="absolute left-0 box-middle">销售顾问</view>
|
||||
<view class="pt25 pb25 text-right font-28 color-666">
|
||||
<picker bindchange="changeStaff" value="{{staffIndex}}" range="{{staffArray}}">
|
||||
<text class="color-ccc" wx:if="{{staffIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{staffArray[staffIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pt50 pb100"></view>
|
||||
</scroll-view>
|
||||
<view class="absolute left-0 bottom-0 right-0 fn-flex pt20 pb200 pl60 pr60 bg-fff-op90 text-center">
|
||||
<view class="fn-flex-item mr20 pt15 pb15 bds-2-36afa2 font-32 color-36afa2 ulib-r750" bindtap="resetFilter">重置</view>
|
||||
<view class="fn-flex-item ml20 pt15 pb15 bg-36afa2 font-32 color-fff ulib-r750" bindtap="submitFilter">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="search-bg fixed left-0 right-0 top-0 bottom-0" bindtap="optfilter" hidden="{{!isShowfilter}}" style="background-color:rgba(0,0,0,.5);"></view>
|
||||
|
||||
<lcb-msg isShow="{{isShowMessage}}">
|
||||
<view slot="content">
|
||||
<view class="inner40">
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
</view>
|
||||
|
||||
<view class="mt10 pl30 pr30">
|
||||
|
||||
<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 font-22 color-fff" wx:if="{{item.defeat||item.orders_pay}}">
|
||||
@@ -89,9 +88,9 @@
|
||||
</block>
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff mr30 ulib-r750" catchtap="showMessage" data-id="{{item.id}}">
|
||||
<!--view class="inline-block relative img-55x55 bg-333 font-28 color-fff mr30 ulib-r750" catchtap="showMessage" data-id="{{item.id}}">
|
||||
<i class="absolute box-center-middle iconfont icon-duanxinguanli"></i>
|
||||
</view>
|
||||
</view-->
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff ulib-r750" catchtap="call" data-id="{{item.id}}">
|
||||
<i class="absolute box-center-middle iconfont icon-dianhua"></i>
|
||||
</view>
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
<view class="mt5 font-22 color-666">手机号:{{info.mobile}}</view>
|
||||
</view>
|
||||
<view class="absolute right-0 mr30 box-middle">
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff mr30 ulib-r750" catchtap="showMessage" data-id="{{info.id}}">
|
||||
<!--view class="inline-block relative img-55x55 bg-333 font-28 color-fff mr30 ulib-r750" catchtap="showMessage" data-id="{{info.id}}">
|
||||
<i class="absolute box-center-middle iconfont icon-duanxinguanli"></i>
|
||||
</view>
|
||||
</view-->
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff ulib-r750" catchtap="call" data-id="{{info.id}}">
|
||||
<i class="absolute box-center-middle iconfont icon-dianhua"></i>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user