客户线索,库存弹框一天3次
This commit is contained in:
@@ -117,6 +117,7 @@
|
||||
.line-height-20{line-height:2;}
|
||||
.rich-text-img{display:bolck;max-width:100% !important;height:auto !important;margin:40rpx 0 20rpx 0 !important;}
|
||||
|
||||
.height-90{height:90rpx;box-sizing:border-box;}
|
||||
.height-100{height:100rpx;box-sizing:border-box;}
|
||||
.height-120{height:120rpx;box-sizing:border-box;}
|
||||
.height-190{height:190rpx;box-sizing:border-box;}
|
||||
|
||||
@@ -818,6 +818,4 @@ apiQuery.getAppCustomersOffline_sources = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
appCustomersOffline_sources
|
||||
|
||||
export default apiQuery;
|
||||
@@ -19,16 +19,13 @@ Page({
|
||||
levelIndex:-1,//车型级别索引
|
||||
timeArray:[],//预计购车时间列表
|
||||
timeIndex:-1,//预计购车时间索引
|
||||
cf_clues:'',//线索来源
|
||||
cluesArray:[
|
||||
'自然进店',
|
||||
'外展外拓',
|
||||
'转介绍',
|
||||
'垂直媒体',
|
||||
'自媒体',
|
||||
],//线索来源
|
||||
cluesIndex:-1,//索来源索引
|
||||
submitFlag:false,
|
||||
|
||||
status:'',//状态
|
||||
of_id:'',
|
||||
of2_id:'',
|
||||
of1Index:-1,
|
||||
of2Index:-1,
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -39,6 +36,7 @@ Page({
|
||||
}
|
||||
this.getAppSeriesBrands()
|
||||
this.getAppCustomersFilter()
|
||||
this.getAppCustomersOffline_sources()
|
||||
},
|
||||
|
||||
//获取车型品牌
|
||||
@@ -219,14 +217,6 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//线索来源
|
||||
changeClues(e) {
|
||||
this.setData({
|
||||
cf_clues:this.data.cluesArray[e.detail.value],
|
||||
cluesIndex:e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//预计购车时间
|
||||
changeTime(e) {
|
||||
this.setData({
|
||||
@@ -276,8 +266,11 @@ Page({
|
||||
if(this.data.b_s_id != ''){
|
||||
params['b_s_id'] = this.data.b_s_id;
|
||||
}
|
||||
if(this.data.cf_clues != ''){
|
||||
params['cf_clues'] = this.data.cf_clues;
|
||||
if(this.data.of_id != ''){
|
||||
params['of_id'] = this.data.of_id;
|
||||
}
|
||||
if(this.data.of2_id != ''){
|
||||
params['of2_id'] = this.data.of2_id;
|
||||
}
|
||||
if(this.data.buy_time != ''){
|
||||
params['buy_time'] = this.data.buy_time;
|
||||
@@ -304,20 +297,30 @@ Page({
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
that.setData({
|
||||
name:'',
|
||||
mobile:'',
|
||||
car_id:'',
|
||||
v_id:'',
|
||||
color_id:'',
|
||||
b_s_id:'',
|
||||
cf_clues:'',
|
||||
buy_time:'',
|
||||
modelIndex:-1,
|
||||
spareIndex:-1,
|
||||
colorIndex:-1,
|
||||
levelIndex:-1,
|
||||
timeIndex:-1,
|
||||
name:'',//名字
|
||||
mobile:'',//手机号
|
||||
brand_id:'',//品牌
|
||||
car_id:'',//车系id
|
||||
v_id:'',//车型级别id
|
||||
color_id:'',//颜色id
|
||||
b_s_id:'',//备选车型id
|
||||
buy_time:'',//预计购车时间
|
||||
brandIndex:-1,//车辆品牌索引
|
||||
modelIndex:-1,//车型车系索引
|
||||
spareIndex:-1,//备选车型索引
|
||||
colorArray:[],//车型颜色列表
|
||||
levelArray:[],//车型级别列表
|
||||
colorIndex:-1,//车型颜色索引
|
||||
levelIndex:-1,//车型级别索引
|
||||
timeArray:[],//预计购车时间列表
|
||||
timeIndex:-1,//预计购车时间索引
|
||||
submitFlag:false,
|
||||
|
||||
status:'',//状态
|
||||
of_id:'',
|
||||
of2_id:'',
|
||||
of1Index:-1,
|
||||
of2Index:-1,
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
wx.navigateBack({
|
||||
@@ -335,4 +338,47 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//线索来源
|
||||
getAppCustomersOffline_sources(){
|
||||
let params = {};
|
||||
if(this.data.status != ''){
|
||||
params['status'] = this.data.status;
|
||||
}
|
||||
_.apiQuery.getAppCustomersOffline_sources(params).then(res => {
|
||||
let of1Arr = []
|
||||
res.data.forEach(item => {
|
||||
of1Arr.push(item.name)
|
||||
})
|
||||
this.setData({
|
||||
of1Arr,
|
||||
sources:res.data
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//线索来源
|
||||
changeOf1(e) {
|
||||
if(this.data.of1Index!=e.detail.value){
|
||||
let of2Arr = []
|
||||
this.data.sources[e.detail.value].list.forEach(item => {
|
||||
of2Arr.push(item.name)
|
||||
})
|
||||
this.setData({
|
||||
of2Arr,
|
||||
of2Index:-1,
|
||||
of_id:this.data.sources[e.detail.value].id,
|
||||
of1Index:e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
changeOf2(e) {
|
||||
if(this.data.of2Index!=e.detail.value){
|
||||
this.setData({
|
||||
of2_id:this.data.sources[this.data.of1Index].list[e.detail.value].id,
|
||||
of2Index:e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
@@ -25,7 +25,7 @@
|
||||
</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">
|
||||
<view class="pt30 pb30 text-right font-28 color-666 text-nowrap">
|
||||
<picker bindchange="changeModel" value="{{modelIndex}}" range="{{modelArray}}">
|
||||
<text class="color-ccc" wx:if="{{modelIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{modelArray[modelIndex]}}</text>
|
||||
@@ -35,7 +35,7 @@
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{modelIndex != -1}}">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">车型级别</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<view class="pt30 pb30 text-right font-28 color-666 text-nowrap">
|
||||
<picker bindchange="changeLevel" value="{{levelIndex}}" range="{{levelArray}}">
|
||||
<text class="color-ccc" wx:if="{{levelIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{levelArray[levelIndex]}}</text>
|
||||
@@ -45,7 +45,7 @@
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{levelIndex != -1}}">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">车型颜色</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<view class="pt30 pb30 text-right font-28 color-666 text-nowrap">
|
||||
<picker bindchange="changeColor" value="{{colorIndex}}" range="{{colorArray}}">
|
||||
<text class="color-ccc" wx:if="{{colorIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{colorArray[colorIndex]}}</text>
|
||||
@@ -65,13 +65,20 @@
|
||||
</view> -->
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">线索来源</view>
|
||||
<!-- <view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入线索来源" bindinput='inputTx' data-key="cf_clues" name='cf_clues' value='{{cf_clues}}' />
|
||||
</view> -->
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeClues" value="{{cluesIndex}}" range="{{cluesArray}}">
|
||||
<text class="color-ccc" wx:if="{{cluesIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{cluesArray[cluesIndex]}}</text>
|
||||
<picker bindchange="changeOf1" value="{{of1Index}}" range="{{of1Arr}}">
|
||||
<text class="color-ccc" wx:if="{{of1Index == -1}}">请选择</text>
|
||||
<text wx:else>{{of1Arr[of1Index]}}</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="{{of2Arr.length>0}}">
|
||||
<view class="absolute left-0 box-middle">{{sources[of1Index].name}}</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeOf2" value="{{of2Index}}" range="{{of2Arr}}">
|
||||
<text class="color-ccc" wx:if="{{of2Index == -1}}">请选择</text>
|
||||
<text wx:else>{{of2Arr[of2Index]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
@@ -45,7 +45,6 @@ Page({
|
||||
levelArray:[],//车型级别列表
|
||||
colorIndex:-1,//车型颜色索引
|
||||
levelIndex:-1,//车型级别索引
|
||||
cf_clues:'',//线索来源
|
||||
defeat_reason:'',//战败理由
|
||||
submitFlag:false,
|
||||
|
||||
@@ -108,7 +107,6 @@ Page({
|
||||
name:res.data.baseinfo.name.value?res.data.baseinfo.name.value:'',
|
||||
mobile:res.data.baseinfo.mobile.value?res.data.baseinfo.mobile.value:'',
|
||||
buy_time:res.data.baseinfo.buy_time.value?res.data.baseinfo.buy_time.value:'',
|
||||
cf_clues:res.data.baseinfo.cf_clues.value?res.data.baseinfo.cf_clues.value:'',
|
||||
})
|
||||
|
||||
/*匹配数据*/
|
||||
|
||||
@@ -89,9 +89,7 @@
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">线索来源</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx">
|
||||
{{cf_clues}}
|
||||
</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx">{{baseinfo.of_id.value}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">预计购车时间</view>
|
||||
|
||||
@@ -17,16 +17,12 @@ Page({
|
||||
levelIndex:-1,//车型级别索引
|
||||
timeArray:[],//预计购车时间列表
|
||||
timeIndex:-1,//预计购车时间索引
|
||||
cf_clues:'',//线索来源
|
||||
cluesArray:[
|
||||
'自然进店',
|
||||
'外展外拓',
|
||||
'转介绍',
|
||||
'垂直媒体',
|
||||
'自媒体',
|
||||
],//线索来源
|
||||
cluesIndex:-1,//索来源索引
|
||||
submitFlag:false,
|
||||
|
||||
of_id:'',
|
||||
of2_id:'',
|
||||
of1Index:-1,
|
||||
of2Index:-1,
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -47,23 +43,15 @@ Page({
|
||||
baseinfo:res.data.baseinfo,
|
||||
name:res.data.baseinfo.name.value?res.data.baseinfo.name.value:'',
|
||||
mobile:res.data.baseinfo.mobile.value?res.data.baseinfo.mobile.value:'',
|
||||
cf_clues:res.data.baseinfo.cf_clues.value?res.data.baseinfo.cf_clues.value:'',
|
||||
of_id:res.data.baseinfo.of_id.of_id?res.data.baseinfo.of_id.of_id:'',
|
||||
of2_id:res.data.baseinfo.of_id.of2_id?res.data.baseinfo.of_id.of2_id:'',
|
||||
})
|
||||
|
||||
if(res.data.baseinfo.cf_clues.value){
|
||||
this.data.cluesArray.forEach((item,index) => {
|
||||
if(item == res.data.baseinfo.cf_clues.value){
|
||||
this.setData({
|
||||
cluesIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//编辑基础信息使用
|
||||
this.getAppSeriesBrands()
|
||||
this.getAppSeriesedit()
|
||||
this.getAppCustomersFilter()
|
||||
this.getAppCustomersOffline_sources()
|
||||
|
||||
})
|
||||
},
|
||||
@@ -364,14 +352,6 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//线索来源
|
||||
changeClues(e) {
|
||||
this.setData({
|
||||
cf_clues:this.data.cluesArray[e.detail.value],
|
||||
cluesIndex:e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//预计购车时间
|
||||
changeTime(e) {
|
||||
this.setData({
|
||||
@@ -409,7 +389,7 @@ Page({
|
||||
title: '请选择车型颜色',
|
||||
icon: 'none'
|
||||
})
|
||||
} else if(that.data.name==that.data.baseinfo.name.value&&that.data.mobile==that.data.baseinfo.mobile.value&&that.data.cf_clues==that.data.baseinfo.cf_clues.value&&that.data.car_id==that.data.baseinfo.car_id.value&&that.data.v_id==that.data.baseinfo.v_id.value&&that.data.color_id==that.data.baseinfo.color_id.value&&that.data.buy_time==that.data.baseinfo.buy_time.value){
|
||||
} else if(that.data.name==that.data.baseinfo.name.value&&that.data.mobile==that.data.baseinfo.mobile.value&&that.data.of_id==that.data.baseinfo.of_id.of_id&&that.data.of2_id==that.data.baseinfo.of_id.of2_id&&that.data.car_id==that.data.baseinfo.car_id.value&&that.data.v_id==that.data.baseinfo.v_id.value&&that.data.color_id==that.data.baseinfo.color_id.value&&that.data.buy_time==that.data.baseinfo.buy_time.value){
|
||||
wx.showToast({
|
||||
title: '好像没改什么',
|
||||
icon: 'none'
|
||||
@@ -427,8 +407,11 @@ Page({
|
||||
if(that.data.mobile != that.data.baseinfo.mobile.value){
|
||||
params['mobile'] = that.data.mobile;
|
||||
}
|
||||
if(that.data.cf_clues != that.data.baseinfo.cf_clues.value){
|
||||
params['cf_clues'] = that.data.cf_clues;
|
||||
if(that.data.of_id != that.data.baseinfo.of_id.of_id){
|
||||
params['of_id'] = that.data.of_id;
|
||||
}
|
||||
if(that.data.of2_id != that.data.baseinfo.of_id.of2_id){
|
||||
params['of2_id'] = that.data.of2_id;
|
||||
}
|
||||
if(that.data.car_id != that.data.baseinfo.car_id.value){
|
||||
params['car_id'] = that.data.car_id;
|
||||
@@ -490,4 +473,66 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//线索来源
|
||||
getAppCustomersOffline_sources(){
|
||||
_.apiQuery.getAppCustomersOffline_sources().then(res => {
|
||||
let of1Arr = []
|
||||
res.data.forEach(item => {
|
||||
of1Arr.push(item.name)
|
||||
})
|
||||
this.setData({
|
||||
of1Arr,
|
||||
sources:res.data
|
||||
})
|
||||
if(this.data.of_id != ''){
|
||||
res.data.forEach((item,index) => {
|
||||
if(item.id == this.data.of_id){
|
||||
this.setData({
|
||||
of1Index:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
if(this.data.of2Index != ''){
|
||||
let of2Arr = []
|
||||
res.data[this.data.of1Index].list.forEach((item,index) => {
|
||||
of2Arr.push(item.name)
|
||||
if(item.id == this.data.of2_id){
|
||||
this.setData({
|
||||
of2Index:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
of2Arr,
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//线索来源
|
||||
changeOf1(e) {
|
||||
if(this.data.of1Index!=e.detail.value){
|
||||
let of2Arr = []
|
||||
this.data.sources[e.detail.value].list.forEach(item => {
|
||||
of2Arr.push(item.name)
|
||||
})
|
||||
this.setData({
|
||||
of2Arr,
|
||||
of2Index:-1,
|
||||
of_id:this.data.sources[e.detail.value].id,
|
||||
of1Index:e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
changeOf2(e) {
|
||||
if(this.data.of2Index!=e.detail.value){
|
||||
this.setData({
|
||||
of2_id:this.data.sources[this.data.of1Index].list[e.detail.value].id,
|
||||
of2Index:e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
@@ -25,7 +25,7 @@
|
||||
</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">
|
||||
<view class="pt30 pb30 text-right font-28 color-666 text-nowrap">
|
||||
<picker bindchange="changeModel" value="{{modelIndex}}" range="{{modelArray}}">
|
||||
<text class="color-ccc" wx:if="{{modelIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{modelArray[modelIndex]}}</text>
|
||||
@@ -35,7 +35,7 @@
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{modelIndex != -1}}">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">车型级别</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<view class="pt30 pb30 text-right font-28 color-666 text-nowrap">
|
||||
<picker bindchange="changeLevel" value="{{levelIndex}}" range="{{levelArray}}">
|
||||
<text class="color-ccc" wx:if="{{levelIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{levelArray[levelIndex]}}</text>
|
||||
@@ -45,7 +45,7 @@
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{modelIndex != -1}}">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">车型颜色</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<view class="pt30 pb30 text-right font-28 color-666 text-nowrap">
|
||||
<picker bindchange="changeColor" value="{{colorIndex}}" range="{{colorArray}}">
|
||||
<text class="color-ccc" wx:if="{{colorIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{colorArray[colorIndex]}}</text>
|
||||
@@ -55,13 +55,20 @@
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">线索来源</view>
|
||||
<!-- <view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入线索来源" bindinput='inputTx' data-key="cf_clues" name='cf_clues' value='{{cf_clues}}' />
|
||||
</view> -->
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeClues" value="{{cluesIndex}}" range="{{cluesArray}}">
|
||||
<text class="color-ccc" wx:if="{{cluesIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{cluesArray[cluesIndex]}}</text>
|
||||
<picker bindchange="changeOf1" value="{{of1Index}}" range="{{of1Arr}}">
|
||||
<text class="color-ccc" wx:if="{{of1Index == -1}}">请选择</text>
|
||||
<text wx:else>{{of1Arr[of1Index]}}</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="{{of2Arr.length>0}}">
|
||||
<view class="absolute left-0 box-middle">{{sources[of1Index].name}}</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeOf2" value="{{of2Index}}" range="{{of2Arr}}">
|
||||
<text class="color-ccc" wx:if="{{of2Index == -1}}">请选择</text>
|
||||
<text wx:else>{{of2Arr[of2Index]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
+55
-22
@@ -61,19 +61,15 @@ Page({
|
||||
content:'',//短信内容
|
||||
isRefresh:false,//判断返回是否需要刷新
|
||||
isShowMobile: false,
|
||||
cf_clues:'',//线索来源
|
||||
cluesArray:[
|
||||
'自然进店',
|
||||
'外展外拓',
|
||||
'转介绍',
|
||||
'垂直媒体',
|
||||
'自媒体',
|
||||
],//线索来源
|
||||
cluesIndex:-1,//索来源索引
|
||||
staffArray: [],
|
||||
staffobj: [],
|
||||
staffIndex:-1,
|
||||
userInfo:app.getStorageByKey("userInfo")
|
||||
userInfo:app.getStorageByKey("userInfo"),
|
||||
|
||||
of_id:'',
|
||||
of2_id:'',
|
||||
of1Index:-1,
|
||||
of2Index:-1,
|
||||
},
|
||||
onLoad(options) {
|
||||
for (let key in options) {
|
||||
@@ -85,6 +81,7 @@ Page({
|
||||
this.getAppCustomersFilter()
|
||||
this.getAppSeriesBrands()
|
||||
this.getAppUserAdmins()
|
||||
this.getAppCustomersOffline_sources()
|
||||
},
|
||||
|
||||
onShow(){
|
||||
@@ -233,8 +230,11 @@ Page({
|
||||
if(this.data.o_type != ''){
|
||||
params['o_type'] = this.data.o_type;
|
||||
}
|
||||
if(this.data.cf_clues != ''){
|
||||
params['cf_clues'] = this.data.cf_clues;
|
||||
if(this.data.of_id != ''){
|
||||
params['of_id'] = this.data.of_id;
|
||||
}
|
||||
if(this.data.of2_id != ''){
|
||||
params['of2_id'] = this.data.of2_id;
|
||||
}
|
||||
if(this.data.staffIndex>-1){
|
||||
params['admin_id'] = this.data.staffobj[this.data.staffIndex].id;
|
||||
@@ -484,14 +484,6 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//线索来源
|
||||
changeClues(e) {
|
||||
this.setData({
|
||||
cf_clues:this.data.cluesArray[e.detail.value],
|
||||
cluesIndex:e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//显示高级搜索
|
||||
optfilter(){
|
||||
this.setData({
|
||||
@@ -521,14 +513,16 @@ Page({
|
||||
brand_id:'',
|
||||
s_id:'',
|
||||
cfrom:'',
|
||||
cf_clues:'',//线索来源
|
||||
of_id:'',
|
||||
of2_id:'',
|
||||
of1Index:-1,
|
||||
of2Index:-1,
|
||||
timeSlotIndex:-1,
|
||||
testDriveIndex:-1,
|
||||
levelIndex:-1,
|
||||
brandIndex:-1,
|
||||
modelIndex:-1,
|
||||
cfromIndex:-1,
|
||||
cluesIndex:-1,//索来源索引
|
||||
staffIndex:-1,
|
||||
})
|
||||
},
|
||||
@@ -593,6 +587,45 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//线索来源
|
||||
getAppCustomersOffline_sources(){
|
||||
_.apiQuery.getAppCustomersOffline_sources().then(res => {
|
||||
let of1Arr = []
|
||||
res.data.forEach(item => {
|
||||
of1Arr.push(item.name)
|
||||
})
|
||||
this.setData({
|
||||
of1Arr,
|
||||
sources:res.data
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//线索来源
|
||||
changeOf1(e) {
|
||||
if(this.data.of1Index!=e.detail.value){
|
||||
let of2Arr = []
|
||||
this.data.sources[e.detail.value].list.forEach(item => {
|
||||
of2Arr.push(item.name)
|
||||
})
|
||||
this.setData({
|
||||
of2Arr,
|
||||
of2Index:-1,
|
||||
of_id:this.data.sources[e.detail.value].id,
|
||||
of1Index:e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
changeOf2(e) {
|
||||
if(this.data.of2Index!=e.detail.value){
|
||||
this.setData({
|
||||
of2_id:this.data.sources[this.data.of1Index].list[e.detail.value].id,
|
||||
of2Index:e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh(){
|
||||
this.setData({
|
||||
|
||||
+38
-26
@@ -29,9 +29,9 @@
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="fn-fr pr180 relative">
|
||||
<view class="fn-fr {{key<2?'pr180':'pr40'}} relative">
|
||||
<text bindtap="optfilter" class="inner5 iconfont icon-gaojisousuo ml10"></text>
|
||||
<view bindtap="pushLink" data-url="/pages/customer/addCard/index" class="absolute right-0 box-middle pt10 pb10 pl10 pr30 space-nowrap bg-333 font-22 color-fff ulib-rl750"><i class="iconfont mr5 icon-jia"></i>客户建卡</view>
|
||||
<view bindtap="pushLink" data-url="/pages/customer/addCard/index?status={{key}}" class="absolute right-0 box-middle pt10 pb10 pl10 pr30 space-nowrap bg-333 font-22 color-fff ulib-rl750" wx:if="{{key<2}}"><i class="iconfont mr5 icon-jia"></i>客户建卡</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -95,29 +95,29 @@
|
||||
</lcb-msg>
|
||||
|
||||
<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:100%">
|
||||
<view class="inner30">
|
||||
<scroll-view class="wp100" scroll-y="true" style="height:90%">
|
||||
<view class="pt10 pb10 pl30 pr30">
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">客户编号</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="number" placeholder="请输入客户编号" model:value="{{cus_id}}" />
|
||||
<input class="wp100 height-90 text-right font-28" placeholder-class="color-ccc" type="number" placeholder="请输入客户编号" model:value="{{cus_id}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">客户姓名</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入客户姓名" bindinput='inputTx' data-key="name" name='name' value='{{name}}' />
|
||||
<input class="wp100 height-90 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入客户姓名" bindinput='inputTx' data-key="name" name='name' value='{{name}}' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">手机号码</view>
|
||||
<view>
|
||||
<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}}' />
|
||||
<input class="wp100 height-90 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">
|
||||
<view class="pt25 pb25 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{s_time}}" bindchange="startDate">
|
||||
<text class="color-ccc" wx:if="{{s_time == ''}}">请选择</text>
|
||||
<text wx:else>{{s_time}}</text>
|
||||
@@ -127,7 +127,7 @@
|
||||
</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">
|
||||
<view class="pt25 pb25 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{e_time}}" bindchange="endDate">
|
||||
<text class="color-ccc" wx:if="{{e_time == ''}}">请选择</text>
|
||||
<text wx:else>{{e_time}}</text>
|
||||
@@ -135,7 +135,7 @@
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pt30 pb30 last-b-none">
|
||||
<view class="relative bbs-1-eb pt25 pb25 last-b-none">
|
||||
<view class="font-22">常用时间段</view>
|
||||
<view class="fn-clear">
|
||||
<block wx:for="{{timeSlot}}" wx:key='index'>
|
||||
@@ -145,7 +145,7 @@
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="relative bbs-1-eb pt30 pb30 last-b-none">
|
||||
<!-- <view class="relative bbs-1-eb pt25 pb25 last-b-none">
|
||||
<view class="font-22">是否试驾</view>
|
||||
<view class="fn-clear">
|
||||
<block wx:for="{{testDrive}}" wx:key='index'>
|
||||
@@ -157,7 +157,7 @@
|
||||
</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">
|
||||
<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>
|
||||
@@ -167,7 +167,7 @@
|
||||
</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">
|
||||
<view class="pt25 pb25 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>
|
||||
@@ -177,7 +177,7 @@
|
||||
</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">
|
||||
<view class="pt25 pb25 text-right font-28 color-666">
|
||||
<picker bindchange="changeModel" value="{{modelIndex}}" range="{{modelArray}}">
|
||||
<text class="color-ccc" wx:if="{{modelIndex == -1}}">请选择</text>
|
||||
<text wx:else> {{modelArray[modelIndex]}}</text>
|
||||
@@ -187,7 +187,7 @@
|
||||
</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">
|
||||
<view class="pt25 pb25 text-right font-28 color-666">
|
||||
<picker bindchange="changeCfrom" value="{{cfromIndex}}" range="{{filter.cfrom}}">
|
||||
<text class="color-ccc" wx:if="{{cfromIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{filter.cfrom[cfromIndex]}}</text>
|
||||
@@ -195,19 +195,31 @@
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{cfrom=='自有资源'}}">
|
||||
<view class="absolute left-0 box-middle">线索来源</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeClues" value="{{cluesIndex}}" range="{{cluesArray}}">
|
||||
<text class="color-ccc" wx:if="{{cluesIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{cluesArray[cluesIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
<block wx:if="{{cfrom=='自有资源'}}">
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">线索来源</view>
|
||||
<view class="pt25 pb25 text-right font-28 color-666">
|
||||
<picker bindchange="changeOf1" value="{{of1Index}}" range="{{of1Arr}}">
|
||||
<text class="color-ccc" wx:if="{{of1Index == -1}}">请选择</text>
|
||||
<text wx:else>{{of1Arr[of1Index]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{of2Arr.length>0}}">
|
||||
<view class="absolute left-0 box-middle">{{sources[of1Index].name}}</view>
|
||||
<view class="pt25 pb25 text-right font-28 color-666">
|
||||
<picker bindchange="changeOf2" value="{{of2Index}}" range="{{of2Arr}}">
|
||||
<text class="color-ccc" wx:if="{{of2Index == -1}}">请选择</text>
|
||||
<text wx:else>{{of2Arr[of2Index]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- <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">
|
||||
<view class="pt25 pb25 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
@@ -217,7 +229,7 @@
|
||||
</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="pt30 pb30 text-right font-28 color-666">
|
||||
<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>
|
||||
|
||||
+65
-5
@@ -201,11 +201,71 @@ Page({
|
||||
inventory:res.data.inventory,
|
||||
warning:res.data.warning,
|
||||
})
|
||||
if(app.getStorageByKey("showGoodsData")!=new Date().getDate()&&res.data.warning.list&&res.data.warning.list.length>0){
|
||||
this.setData({
|
||||
isShowGoods:true,
|
||||
})
|
||||
app.setStorage('showGoodsData', new Date().getDate())
|
||||
if(res.data.warning.list&&res.data.warning.list.length>0){
|
||||
if(!app.getStorageByKey("showGoods")||app.getStorageByKey("showGoods").data!=new Date().getDate()){
|
||||
//清除
|
||||
wx.removeStorageSync('showGoods')
|
||||
this.setData({
|
||||
isShowGoods:true,
|
||||
})
|
||||
let showGoods = {}
|
||||
if(this.data.biz_id){
|
||||
showGoods.data = new Date().getDate()
|
||||
showGoods.list =[{
|
||||
biz_id:this.data.biz_id,
|
||||
num:1,
|
||||
}]
|
||||
}else{
|
||||
showGoods.data = new Date().getDate()
|
||||
showGoods.list =[{
|
||||
biz_id:'b1',
|
||||
num:1,
|
||||
}]
|
||||
}
|
||||
app.setStorage('showGoods',showGoods)
|
||||
}else{
|
||||
let showGoods = app.getStorageByKey("showGoods")
|
||||
let index = -1
|
||||
if(this.data.biz_id){
|
||||
showGoods.list.forEach((item,i) => {
|
||||
if(item.biz_id == this.data.biz_id){
|
||||
index = i
|
||||
item.num = item.num + 1
|
||||
}
|
||||
})
|
||||
}else{
|
||||
showGoods.list.forEach((item,i) => {
|
||||
if(item.biz_id == 'b1'){
|
||||
index = i
|
||||
item.num = item.num + 1
|
||||
}
|
||||
})
|
||||
}
|
||||
if(index > -1){
|
||||
if(showGoods.list[index].num<4){
|
||||
this.setData({
|
||||
isShowGoods:true,
|
||||
})
|
||||
app.setStorage('showGoods',showGoods)
|
||||
}
|
||||
}else{
|
||||
this.setData({
|
||||
isShowGoods:true,
|
||||
})
|
||||
if(this.data.biz_id){
|
||||
showGoods.list.push({
|
||||
biz_id:this.data.biz_id,
|
||||
num:1,
|
||||
})
|
||||
}else{
|
||||
showGoods.list.push({
|
||||
biz_id:'b1',
|
||||
num:1,
|
||||
})
|
||||
}
|
||||
app.setStorage('showGoods',showGoods)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user