From 2ff6be6a614b2306d3c320bbe6962cc96437efb3 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Mon, 14 Aug 2023 17:58:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E7=B4=A2=E6=96=B0=E5=A2=9E=E5=93=81?= =?UTF-8?q?=E7=89=8C=E5=BD=92=E5=B1=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/js/config.js | 2 +- pages/customer/addCard/index.js | 39 +++++++++++++++++++++++++++++ pages/customer/addCard/index.wxml | 11 ++++---- pages/customer/editCard/index.js | 40 ++++++++++++++++++++++++++++++ pages/customer/editCard/index.wxml | 10 ++++++++ 5 files changed, 96 insertions(+), 6 deletions(-) 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 @@ -