diff --git a/pages/center/Piabodata/index.vue b/pages/center/Piabodata/index.vue index d7c6443..9f19036 100644 --- a/pages/center/Piabodata/index.vue +++ b/pages/center/Piabodata/index.vue @@ -1,19 +1,14 @@ @@ -328,7 +351,15 @@ itemCount: 8 } }, - + + screenShow: false, // 时间筛选弹窗 + showTimeText: '近七天', // 展示文字 + showBeText: '全部业务', // + templateList: [], // 销讲业务 + showTemplate: false, // 展示选择销讲业务弹窗 + marketingBusiness: '', // 选择的业务id + + showTemplates: false, // 展示选择销讲业务弹窗 }; }, onShow() { @@ -344,7 +375,7 @@ // 获取项目id this.houseId = uni.getStorageSync('buildingID').id; // 获取数据看板 - + this.getMarketingBusiness() // 获取员工 this.getStaffList() // 获取团队 @@ -359,6 +390,7 @@ this.getindexZxl() }, onPullDownRefresh() { + this.getMarketingBusiness() // 获取员工 this.getStaffList() // 获取团队 @@ -376,6 +408,32 @@ }, 1000); }, methods: { + // 销讲业务方法 + templateCancel() { + this.showTemplate = false; + }, + + // 确认选择销讲业务 + templateConfirm(e) { + this.showTemplate = false; + this.marketingBusiness = e[0].value + this.showBeText = e[0].label + this.getdata() + }, + + + // 获取销讲业务 + getMarketingBusiness() { + this.$u.get('/customer/marketingBusiness', { + houseId: this.houseId, + }).then(res => { + this.templateList = res + this.templateList.unshift({ + templateName: '全部业务', + id: '' + }) + }) + }, getPercent(num) { console.log(num) return num || 0 @@ -404,7 +462,8 @@ houseId: this.houseId, timeType: this.lastEndDate ? null : this.activeTotal, lastEndDate: this.lastEndDate, - lastStartDate: this.lastStartDate + lastStartDate: this.lastStartDate, + marketingBusiness: this.marketingBusiness, }) .then(res => { // console.log(res) @@ -419,7 +478,8 @@ houseId: this.houseId, timeType: this.lastEndDate ? null : this.activeTotal, lastEndDate: this.lastEndDate, - lastStartDate: this.lastStartDate + lastStartDate: this.lastStartDate, + marketingBusiness: this.marketingBusiness, }) .then(res => { this.LOADING = false @@ -451,7 +511,8 @@ houseId: this.houseId, timeType: this.lastEndDate ? null : this.activeTotal, lastEndDate: this.lastEndDate, - lastStartDate: this.lastStartDate + lastStartDate: this.lastStartDate, + marketingBusiness: this.marketingBusiness, }) .then(res => { res.fraction = (res.fraction || 0) + '%' @@ -490,7 +551,8 @@ houseId: this.houseId, timeType: this.lastEndDate ? null : this.activeTotal + '', lastEndDate: this.lastEndDate, - lastStartDate: this.lastStartDate + lastStartDate: this.lastStartDate, + marketingBusiness: this.marketingBusiness, }) .then(res => { this.allnum1 = res.avg[0] @@ -523,7 +585,8 @@ houseId: this.houseId, timeType: this.lastEndDate ? null : this.activeTotal + '', lastEndDate: this.lastEndDate, - lastStartDate: this.lastStartDate + lastStartDate: this.lastStartDate, + marketingBusiness: this.marketingBusiness, }) .then(res => { // console.log(res) @@ -552,11 +615,15 @@ }) }, //时间切换 - tabtimetap(index) { + tabtimetap(index, text) { this.activeTotal = index; if (index == 3) { this.totalTimeShow = true; + this.screenShow = false } else { + this.screenShow = false + this.showTimeText = text + this.activeTotal = index; this.lastEndDate = '' this.lastStartDate = '' this.getdata() @@ -583,6 +650,8 @@ //自定义时间 totalTimeChange(e) { console.log(e.startDate, e.endDate) + this.screenShow = false + this.showTimeText = `${e.startDate}-${e.endDate}` this.activeTotal = 3; this.lastEndDate = e.endDate this.lastStartDate = e.startDate @@ -668,17 +737,66 @@ };