diff --git a/commons/js/config.js b/commons/js/config.js index 508d41c..1389441 100644 --- a/commons/js/config.js +++ b/commons/js/config.js @@ -1,4 +1,4 @@ -const env = "p"; +const env = "d"; const version = 1, diff --git a/pages/customer/addCard/index.js b/pages/customer/addCard/index.js index d5b0ffb..076c91a 100644 --- a/pages/customer/addCard/index.js +++ b/pages/customer/addCard/index.js @@ -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){ diff --git a/pages/customer/addCard/index.wxml b/pages/customer/addCard/index.wxml index cbbbf31..f72ba0a 100644 --- a/pages/customer/addCard/index.wxml +++ b/pages/customer/addCard/index.wxml @@ -22,16 +22,17 @@ -