diff --git a/commons/js/config.js b/commons/js/config.js index e9c0c3a..bd383e6 100644 --- a/commons/js/config.js +++ b/commons/js/config.js @@ -135,7 +135,7 @@ api = { appGoodsRemind:'app/goods/remind', //库存提醒/预警 appGoodsLists:'app/goods/lists', //库存列表 - appCustomersOffline_sources:'app/customers/offline_sources', //线索来源 + appCustomersOffline_sources:'app/customers/offline_sources', //客户来源 appCustomersTag:'app/customers/tag', //客户标签 appCityOncard:'app/city/oncard', //获取上牌城市 diff --git a/commons/js/utils/apiQuery.js b/commons/js/utils/apiQuery.js index 6ca84a4..20b20ea 100644 --- a/commons/js/utils/apiQuery.js +++ b/commons/js/utils/apiQuery.js @@ -797,7 +797,7 @@ apiQuery.getAppGoodsLists = function (params) { }) } -//线索来源 +//客户来源 apiQuery.getAppCustomersOffline_sources = function (params) { return new Promise(function (resolve, reject) { HttpRequest(false, Config.api.appCustomersOffline_sources, 2, params, "GET", resolve, reject) diff --git a/pages/customer/addCard/index.js b/pages/customer/addCard/index.js index a77f55d..1585105 100644 --- a/pages/customer/addCard/index.js +++ b/pages/customer/addCard/index.js @@ -37,6 +37,7 @@ Page({ county_id:'', isShowExist:false, //客户是否已存在 + wxgr:0,//是否添加个微 }, //生命周期函数--监听页面加载 onLoad: function (options) { @@ -49,7 +50,7 @@ Page({ // this.getAppSeriesBrands() //获取列表筛选条件-时间 this.getAppCustomersFilter() - //线索来源 + //客户来源 this.getAppCustomersOffline_sources() //客户标签 this.getAppCustomersTag() @@ -280,7 +281,7 @@ Page({ } else if (that.data.sources.length>0&&that.data.of_id == '' ) { wx.showToast({ - title: '请选择线索来源', + title: '请选择客户来源', icon: 'none' }) } @@ -345,6 +346,7 @@ Page({ if(this.data.of2_id != ''){ params['of2_id'] = this.data.of2_id; } + params['wxgr'] = this.data.wxgr; params['city_id'] = this.data.city_id; params['county_id'] = this.data.county_id; params['buy_time'] = this.data.buy_time; @@ -419,7 +421,7 @@ Page({ } }, - //线索来源 + //客户来源 getAppCustomersOffline_sources(){ let params = {}; params['status'] = this.data.status; @@ -435,7 +437,7 @@ Page({ }); }, - //线索来源 + //客户来源 changeOf1(e) { if(this.data.of1Index!=e.detail.value){ let of2Arr = [] @@ -573,4 +575,11 @@ Page({ }) }, + //是否添加个微 + switchWxgr:function(e){ + this.setData({ + wxgr:e.detail.value ? 1 :0 + }) + }, + }) \ No newline at end of file diff --git a/pages/customer/addCard/index.wxml b/pages/customer/addCard/index.wxml index 97d2fe1..87349de 100644 --- a/pages/customer/addCard/index.wxml +++ b/pages/customer/addCard/index.wxml @@ -74,7 +74,7 @@ --> - 线索来源 + 客户来源 请选择 @@ -124,7 +124,13 @@ - + + 是否添加个微 + + + + + @@ -134,37 +140,43 @@ - {{option.name}} + + {{option.name}} + - {{option.name}} + + {{option.name}} + - - - + - - - + {{exist.msg}} - - + + - + \ No newline at end of file diff --git a/pages/customer/editCard/index.js b/pages/customer/editCard/index.js index 8e473f9..c4c16d9 100644 --- a/pages/customer/editCard/index.js +++ b/pages/customer/editCard/index.js @@ -25,6 +25,7 @@ Page({ city_id:'', countyIndex:-1, county_id:'', + wxgr:0,//是否添加个微 }, //生命周期函数--监听页面加载 onLoad: function (options) { @@ -48,6 +49,7 @@ Page({ mobile:res.data.baseinfo.mobile.value?res.data.baseinfo.mobile.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:'', + wxgr:res.data.baseinfo.wxgr, }) //编辑基础信息使用 @@ -345,7 +347,7 @@ Page({ } else if (that.data.sources.length>0&&that.data.of_id == '' ) { wx.showToast({ - title: '请选择线索来源', + title: '请选择客户来源', icon: 'none' }) } @@ -420,6 +422,7 @@ Page({ // if(that.data.color_id != that.data.baseinfo.color_id.value){ // params['color_id'] = that.data.color_id; // } + params['wxgr'] = this.data.wxgr; _.apiQuery.putAppCustomerData(params).then(res => { //刷新列表页 @@ -469,7 +472,7 @@ Page({ } }, - //线索来源 + //客户来源 getAppCustomersOffline_sources(){ _.apiQuery.getAppCustomersOffline_sources().then(res => { let of1Arr = [] @@ -506,7 +509,7 @@ Page({ }); }, - //线索来源 + //客户来源 changeOf1(e) { if(this.data.of1Index!=e.detail.value){ let of2Arr = [] @@ -631,4 +634,11 @@ Page({ } }, + //是否添加个微 + switchWxgr:function(e){ + this.setData({ + wxgr:e.detail.value ? 1 :0 + }) + }, + }) \ No newline at end of file diff --git a/pages/customer/editCard/index.wxml b/pages/customer/editCard/index.wxml index cbf93a1..104b356 100644 --- a/pages/customer/editCard/index.wxml +++ b/pages/customer/editCard/index.wxml @@ -55,7 +55,7 @@ --> - 线索来源 + 客户来源 请选择 @@ -95,6 +95,12 @@ + + 是否添加个微 + + + + @@ -105,23 +111,26 @@ - {{option.name}} + + {{option.name}} + - {{option.name}} + + {{option.name}} + - - - + - diff --git a/pages/customer/index.js b/pages/customer/index.js index 0a253df..c737d66 100644 --- a/pages/customer/index.js +++ b/pages/customer/index.js @@ -108,7 +108,7 @@ Page({ //this.getAppSeriesBrands() //销售顾问 this.getAppUserAdmins() - //线索来源 + //客户来源 this.getAppCustomersOffline_sources() this.getTimePicker() @@ -646,7 +646,7 @@ Page({ } }, - //线索来源 + //客户来源 getAppCustomersOffline_sources(){ _.apiQuery.getAppCustomersOffline_sources().then(res => { let of1Arr = [] @@ -660,7 +660,7 @@ Page({ }); }, - //线索来源 + //客户来源 changeOf1(e) { if(this.data.of1Index!=e.detail.value){ let of2Arr = []