diff --git a/commons/css/base/fontSize.wxss b/commons/css/base/fontSize.wxss index c8a4159..73048b6 100644 --- a/commons/css/base/fontSize.wxss +++ b/commons/css/base/fontSize.wxss @@ -26,4 +26,5 @@ .font-75{font-size:75rpx;} .font-80{font-size:80rpx;} .font-90{font-size:90rpx;} -.font-120{font-size:120rpx;} \ No newline at end of file +.font-120{font-size:120rpx;} +.font-180{font-size:180rpx;} \ No newline at end of file diff --git a/commons/css/base/margin.wxss b/commons/css/base/margin.wxss index d0eb008..a381020 100644 --- a/commons/css/base/margin.wxss +++ b/commons/css/base/margin.wxss @@ -19,6 +19,7 @@ .mt90{margin-top:90rpx;} .mt110{margin-top:110rpx;} .mt120{margin-top:120rpx;} +.mt130{margin-top:130rpx;} .mt150{margin-top:150rpx;} .mt190{margin-top:190rpx;} .ml-1{margin-left:-1rpx;} diff --git a/pages/customer/detail/index.js b/pages/customer/detail/index.js index aa4d905..7a2dd8b 100644 --- a/pages/customer/detail/index.js +++ b/pages/customer/detail/index.js @@ -116,7 +116,7 @@ Page({ }) } - if((cn-cDay)>13){//相差14天以上不用特意补下个月 + if((cn-cDay)>14){//相差15天以上不用特意补下个月 let lweek = new Date(cYear,cMonth-1,cn).getDay();//本月最后天星期几 let sbu = 6 - lweek //最后一周补齐 for(let i=1;i<=sbu;i++){ @@ -129,7 +129,7 @@ Page({ }) } }else{ - let zbu = 14 - (cn-cDay) //至少要补多少天 + let zbu = 15 - (cn-cDay) //至少要补多少天 let bweek = ''//至少要补的最后一天星期几 if(cMonth==12){ bweek = new Date(cYear+1,1,zbu).getDay() @@ -792,7 +792,7 @@ Page({ } }) dateList.forEach((item,index) => { - if(cindex<=index&&index{{item}} - - + + {{cMonth}} + {{item.day}} diff --git a/pages/customer/filterList/index.js b/pages/customer/filterList/index.js index 3348345..319e77e 100644 --- a/pages/customer/filterList/index.js +++ b/pages/customer/filterList/index.js @@ -31,6 +31,8 @@ Page({ }) } this.getAppCustomersList() + //销售顾问 + this.getAppUserAdmins() wx.setNavigationBarTitle({ title: this.data.title||'客户' @@ -194,6 +196,90 @@ Page({ } }, + //获取销售顾问 + getAppUserAdmins(){ + let params = {}; + params['page'] = 1; + params['size'] = 1000; + _.apiQuery.getAppUserAdmins(params).then(res => { + let staffArray = [] + res.data.list.forEach(item => { + staffArray.push(item.uname) + }) + this.setData({ + staffArray:staffArray, + staffobj: res.data.list, + }) + }); + }, + + //销售弹窗显示隐藏 + optEmployees(e){ + if(e.currentTarget.dataset.cid){ + this.setData({ + isShowEmployees:true, + employeeIndex:-1, + employee_id:'', + cid:[e.currentTarget.dataset.cid], + }) + }else{ + this.setData({ + isShowEmployees:!this.data.isShowEmployees, + employeeIndex:-1, + employee_id:'', + cid:[], + }) + } + }, + + //选择店员 + changeEmployee(e) { + let employee_id = '' + if(e.detail.value >= 0){ + employee_id = this.data.staffobj[e.detail.value].id + } + this.setData({ + employee_id, + employeeIndex:e.detail.value, + }) + }, + + //分配客户 + putAppCustomersAdmins(){ + let that = this + if (that.data.employeeIndex == -1 ) { + wx.showToast({ + title: '请选择店员', + icon: 'none' + }) + }else{ + that.setData({ + submitFlag: true, + }) + let params = {}; + params['ids'] = that.data.cid; + params['admin_id'] = that.data.employee_id; + _.apiQuery.putAppCustomersAdmins(params).then(res => { + + wx.showToast({ + title: '分配成功', + icon: 'success', + duration: 2000 + }) + that.setData({ + isShowEmployees:false, + submitFlag:false, + }) + that.onPullDownRefresh() + + }).catch(res=>{ + that.setData({ + submitFlag: false, + }) + }); + } + }, + //页面相关事件处理函数--监听用户下拉动作 onPullDownRefresh(){ this.setData({ diff --git a/pages/customer/filterList/index.wxml b/pages/customer/filterList/index.wxml index e2aaf9f..0ce82ad 100644 --- a/pages/customer/filterList/index.wxml +++ b/pages/customer/filterList/index.wxml @@ -4,7 +4,10 @@ - {{item.defeat}} + + {{item.defeat}} + {{item.orders_pay}} + {{item.name}} @@ -34,7 +37,14 @@ {{key}} - {{value}} + + + {{value}} + 待分配 + {{value?'重新分配':'分配'}} + + + {{value}} @@ -57,4 +67,21 @@ + + + + + + 销售选择 + + 请选择 + {{staffArray[employeeIndex]}} + + + + + + + + \ No newline at end of file diff --git a/pages/customer/index.js b/pages/customer/index.js index 28b1d98..8c89de4 100644 --- a/pages/customer/index.js +++ b/pages/customer/index.js @@ -25,18 +25,20 @@ Page({ o_type:'',//排序类型 isShowfilter:false,//是否显示筛查 timeSlotIndex:-1,//常用时间索引 + s_visit_time:'',//跟进时间段开始 + e_visit_time:'',//跟进时间段结束 timeSlot:[//常用时间数组 { title:'今天', }, { - title:'昨天', + title:'明天', }, { - title:'近七天', + title:'未来三天', }, { - title:'近三十天', + title:'未来七天', }, ], testDriveIndex:-1,//是否试驾索引 @@ -249,6 +251,10 @@ Page({ if(this.data.staffIndex>-1){ params['admin_id'] = this.data.staffobj[this.data.staffIndex].id; } + if(this.data.s_visit_time != ''&&this.data.e_visit_time != ''){ + params['s_visit_time'] = this.data.s_visit_time; + params['e_visit_time'] = this.data.e_visit_time; + } _.apiQuery.getAppCustomersList(params).then(res => { this.setData({ flag: this.data.flag - 1 @@ -294,21 +300,31 @@ Page({ today:res, }) }) - popularData.getDateLater(1,0).then(res => { + popularData.getDateLater(-1,0).then(res => { this.setData({ tomorrow:res, }) }) - popularData.getDateLater(0,6).then(res => { + popularData.getDateLater(-3,2).then(res => { this.setData({ - last7:res, + next3:res, }) }) - popularData.getDateLater(0,29).then(res => { + popularData.getDateLater(-7,6).then(res => { this.setData({ - last30:res, + next7:res, }) }) + // popularData.getDateLater(0,6).then(res => { + // this.setData({ + // last7:res, + // }) + // }) + // popularData.getDateLater(0,29).then(res => { + // this.setData({ + // last30:res, + // }) + // }) }, //拨打客户电话xz @@ -359,7 +375,6 @@ Page({ this.setData({ s_time: e.detail.value, }) - this.matchDate() }, //建卡时间 @@ -367,34 +382,6 @@ Page({ this.setData({ e_time: e.detail.value, }) - this.matchDate() - }, - - //匹配选择时间是否等于常用时间 - matchDate(){ - this.setData({ - timeSlotIndex:-1, - }) - if(this.data.s_time == this.data.today[0] && this.data.e_time == this.data.today[1] ){ - this.setData({ - timeSlotIndex:0, - }) - } - if(this.data.s_time == this.data.tomorrow[0] && this.data.e_time == this.data.tomorrow[1] ){ - this.setData({ - timeSlotIndex:1, - }) - } - if(this.data.s_time == this.data.last7[0] && this.data.e_time == this.data.last7[1] ){ - this.setData({ - timeSlotIndex:2, - }) - } - if(this.data.s_time == this.data.last30[0] && this.data.e_time == this.data.last30[1] ){ - this.setData({ - timeSlotIndex:3, - }) - } }, //单选 @@ -406,26 +393,26 @@ Page({ switch (e.currentTarget.dataset.index) { case 0: this.setData({ - s_time:this.data.today[0], - e_time:this.data.today[1], + s_visit_time:this.data.today[0], + e_visit_time:this.data.today[1], }) break; case 1: this.setData({ - s_time:this.data.tomorrow[0], - e_time:this.data.tomorrow[1], + s_visit_time:this.data.tomorrow[0], + e_visit_time:this.data.tomorrow[1], }) break; case 2: this.setData({ - s_time:this.data.last7[0], - e_time:this.data.last7[1], + s_visit_time:this.data.next3[0], + e_visit_time:this.data.next3[1], }) break; case 3: this.setData({ - s_time:this.data.last30[0], - e_time:this.data.last30[1], + s_visit_time:this.data.next7[0], + e_visit_time:this.data.next7[1], }) break; } @@ -528,6 +515,8 @@ Page({ of1Index:-1, of2Index:-1, timeSlotIndex:-1, + s_visit_time:'',//跟进时间段开始 + e_visit_time:'',//跟进时间段结束 testDriveIndex:-1, levelIndex:-1, brandIndex:-1, diff --git a/pages/customer/index.wxml b/pages/customer/index.wxml index ccde310..735e487 100644 --- a/pages/customer/index.wxml +++ b/pages/customer/index.wxml @@ -146,16 +146,16 @@ - +