线索新增品牌归属
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
const env = "p";
|
const env = "d";
|
||||||
|
|
||||||
const version = 1,
|
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:'',
|
of_id:'',
|
||||||
of2_id:'',
|
of2_id:'',
|
||||||
of1Index:-1,
|
of1Index:-1,
|
||||||
@@ -35,6 +47,7 @@ Page({
|
|||||||
city_id:'',
|
city_id:'',
|
||||||
countyIndex:-1,
|
countyIndex:-1,
|
||||||
county_id:'',
|
county_id:'',
|
||||||
|
c_brandIndex:-1,
|
||||||
|
|
||||||
isShowExist:false, //客户是否已存在
|
isShowExist:false, //客户是否已存在
|
||||||
wxgr:0,//是否添加个微
|
wxgr:0,//是否添加个微
|
||||||
@@ -281,6 +294,12 @@ Page({
|
|||||||
icon: 'none'
|
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 == '' ) {
|
else if (that.data.sources.length>0&&that.data.of_id == '' ) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请选择客户来源',
|
title: '请选择客户来源',
|
||||||
@@ -348,6 +367,9 @@ Page({
|
|||||||
// if(this.data.b_s_id != ''){
|
// if(this.data.b_s_id != ''){
|
||||||
// params['b_s_id'] = 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 != ''){
|
if(this.data.of_id != ''){
|
||||||
params['of_id'] = this.data.of_id;
|
params['of_id'] = this.data.of_id;
|
||||||
}
|
}
|
||||||
@@ -481,6 +503,14 @@ Page({
|
|||||||
county_id:res.data.county_id,
|
county_id:res.data.county_id,
|
||||||
taglList:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
|
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()
|
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) {
|
changeCity(e) {
|
||||||
if(this.data.cityIndex!=e.detail.value){
|
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}}' />
|
<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>
|
</view>
|
||||||
<!-- <view class="relative bbs-1-eb pl190 last-b-none">
|
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||||
<view class="absolute left-0 box-middle font-28 color-333">车辆品牌</view>
|
<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">
|
||||||
<picker bindchange="changeBrand" value="{{brandIndex}}" range="{{brandArray}}">
|
<picker bindchange="changeCbrand" value="{{c_brandIndex}}" range="{{c_brands}}">
|
||||||
<text class="color-ccc" wx:if="{{brandIndex == -1}}">请选择</text>
|
<text class="color-ccc" wx:if="{{c_brandIndex == -1}}">请选择</text>
|
||||||
<text wx:else>{{brandArray[brandIndex]}}</text>
|
<text wx:else>{{c_brands[c_brandIndex]}}</text>
|
||||||
<i class="iconfont ml5 icon-gengduo"></i>
|
<i class="iconfont ml5 icon-gengduo"></i>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!--
|
||||||
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{brandIndex != -1}}">
|
<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="absolute left-0 box-middle font-28 color-333">车系车型</view>
|
||||||
<view class="pt30 pb30 text-right font-28 color-666 text-nowrap">
|
<view class="pt30 pb30 text-right font-28 color-666 text-nowrap">
|
||||||
|
|||||||
@@ -14,12 +14,25 @@ Page({
|
|||||||
// levelArray:[],//车辆版本列表
|
// levelArray:[],//车辆版本列表
|
||||||
// colorIndex:-1,//车身颜色索引
|
// colorIndex:-1,//车身颜色索引
|
||||||
// levelIndex:-1,//车辆版本索引
|
// levelIndex:-1,//车辆版本索引
|
||||||
|
|
||||||
|
c_brands:[
|
||||||
|
'综合','东风纳米','哪吒','零跑'
|
||||||
|
],
|
||||||
|
|
||||||
|
c_brandArray:[
|
||||||
|
{id:0, name:'综合'},
|
||||||
|
{id:1, name:'东风纳米'},
|
||||||
|
{id:4, name:'哪吒'},
|
||||||
|
{id:5, name:'零跑'},
|
||||||
|
],
|
||||||
|
|
||||||
submitFlag:false,
|
submitFlag:false,
|
||||||
|
|
||||||
of_id:'',
|
of_id:'',
|
||||||
of2_id:'',
|
of2_id:'',
|
||||||
of1Index:-1,
|
of1Index:-1,
|
||||||
of2Index:-1,
|
of2Index:-1,
|
||||||
|
c_brandIndex:-1,
|
||||||
|
|
||||||
cityIndex:-1,
|
cityIndex:-1,
|
||||||
city_id:'',
|
city_id:'',
|
||||||
@@ -56,6 +69,14 @@ Page({
|
|||||||
wxgrimg_url:res.data.baseinfo.wxgrimg_url,
|
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()
|
//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) {
|
changeBrand(e) {
|
||||||
if(this.data.brandIndex != e.detail.value && e.detail.value >= 0){
|
if(this.data.brandIndex != e.detail.value && e.detail.value >= 0){
|
||||||
@@ -349,6 +379,12 @@ Page({
|
|||||||
icon: 'none'
|
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 == '' ) {
|
else if (that.data.sources.length>0&&that.data.of_id == '' ) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请选择客户来源',
|
title: '请选择客户来源',
|
||||||
@@ -415,6 +451,9 @@ Page({
|
|||||||
if(that.data.mobile != that.data.baseinfo.mobile.value){
|
if(that.data.mobile != that.data.baseinfo.mobile.value){
|
||||||
params['mobile'] = that.data.mobile;
|
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){
|
if(that.data.of_id != that.data.baseinfo.of_id.of_id){
|
||||||
params['of_id'] = that.data.of_id;
|
params['of_id'] = that.data.of_id;
|
||||||
}
|
}
|
||||||
@@ -557,6 +596,7 @@ Page({
|
|||||||
county_id:res.data.county_id,
|
county_id:res.data.county_id,
|
||||||
taglList:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
|
taglList:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
|
||||||
})
|
})
|
||||||
|
|
||||||
//获取城市
|
//获取城市
|
||||||
this.getAppCityArea_city()
|
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}}' />
|
<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>
|
</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="relative bbs-1-eb pl190 last-b-none">
|
||||||
<view class="absolute left-0 box-middle font-28 color-333">车辆品牌</view>
|
<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">
|
||||||
|
|||||||
Reference in New Issue
Block a user