From 0ffd5117f3b33000d821bdf20a8fd81f9a964447 Mon Sep 17 00:00:00 2001 From: zx <604444282@qq.com> Date: Thu, 10 Mar 2022 11:08:09 +0800 Subject: [PATCH] zx --- src/views/SaleRank/CitySale/index.vue | 8 ++--- src/views/SaleRank/CitySale/tbEvent.js | 47 ++++++++++++++++++-------- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/src/views/SaleRank/CitySale/index.vue b/src/views/SaleRank/CitySale/index.vue index 0df3b85..a3f436f 100644 --- a/src/views/SaleRank/CitySale/index.vue +++ b/src/views/SaleRank/CitySale/index.vue @@ -5,10 +5,10 @@
- +
- + {{item.name}} @@ -19,7 +19,7 @@ - + 查询
@@ -197,9 +197,9 @@ export default { .choose-brand { width: 150px; + margin-left: 16px; } .choose-series { width: 150px; - margin-right: 16px; } \ No newline at end of file diff --git a/src/views/SaleRank/CitySale/tbEvent.js b/src/views/SaleRank/CitySale/tbEvent.js index 2ec84d5..57e9c0f 100644 --- a/src/views/SaleRank/CitySale/tbEvent.js +++ b/src/views/SaleRank/CitySale/tbEvent.js @@ -63,6 +63,21 @@ export default { //切换类型 handlerTime(activeIndex) { this.activeIndex = activeIndex + if(this.activeIndex == 0) { + getSalesType1(this.form).then(res => { + let data = res.data; + this.pagination.total = res.totalNum + this.tbData = data + this.tableLoad = false; + }); + } else { + getSalesType0(this.form).then(res => { + let data = res.data; + this.pagination2.total = res.totalNum + this.tbData2 = data; + this.tableLoad = false; + }) + } }, //返回 goBack() { @@ -76,18 +91,20 @@ export default { this.tableLoad = true; this.form.sStartTime = this.selTime[0]; this.form.sEndTime = this.selTime[1]; - getSalesType1(this.form).then(res => { - let data = res.data; - this.pagination.total = res.totalNum - this.tbData = data - this.tableLoad = false; - }); - getSalesType0(this.form).then(res => { - let data = res.data; - this.pagination2.total = res.totalNum - this.tbData2 = data; - this.tableLoad = false; - }) + if(this.activeIndex == 0) { + getSalesType1(this.form).then(res => { + let data = res.data; + this.pagination.total = res.totalNum + this.tbData = data + }); + } else { + getSalesType0(this.form).then(res => { + let data = res.data; + this.pagination2.total = res.totalNum + this.tbData2 = data; + }) + } + this.tableLoad = false; }, //点击明细 onSalePro(record) { @@ -98,7 +115,8 @@ export default { sEndTime: this.form.sEndTime, sBrandType: this.form.sBrandType, iPageIndex: 1, - sProv: record.key + sProv: record.key, + sBrand: this.form.sBrand } let o = { sBrand: this.form.sBrand, @@ -126,7 +144,8 @@ export default { sEndTime: this.form.sEndTime, sBrandType: this.form.sBrandType, iPageIndex: 1, - sCity: record.key + sCity: record.key, + sBrand: this.form.sBrand } getSalesType6(obj).then(res => { let data = res.data;