diff --git a/src/views/data/index.vue b/src/views/data/index.vue index 947c3c3..788111c 100644 --- a/src/views/data/index.vue +++ b/src/views/data/index.vue @@ -52,7 +52,7 @@ 营业
- +
@@ -391,7 +391,7 @@ export default { }, ], branchList: [], - storeId: null, + shopId: null, trade: {}, formatDecimal, topData: "", @@ -486,10 +486,18 @@ export default { // this.initCardUserChart(); }, methods: { + /** + * 获取分店列表 + */ async geiShopList() { let res = await ShopApi.getBranchList() this.branchList = res; }, + shopChange(){ + this.summarytrade(); + this.lineChartTypeChange(this.lineChartType) + this.dateProduct() + }, // 切换时间 timeChange(e) { const format = ["YYYY-MM-DD 00:00:00", "YYYY-MM-DD 23:59:59"]; @@ -555,6 +563,7 @@ export default { const res = await dataSummaryApi.trade({ beginDate: this.query.createdAt[0], endDate: this.query.createdAt[1], + shopId: this.shopId }); this.trade = res; this.tradeLoading = false; @@ -878,7 +887,7 @@ export default { async dateAmount() { try { this.saleLoading = true; - const res = await dataSummaryApi.dateAmount({ day: this.saleActive }); + const res = await dataSummaryApi.dateAmount({ day: this.saleActive,shopId: this.shopId }); const data = res.total.map((item) => { return { orderAmount: item.orderAmount, @@ -907,6 +916,7 @@ export default { day: this.saleTableActive, page: this.saleTablePage, size: this.saleTableSize, + shopId: this.shopId }); this.saleTable = res.records; this.saleTableTotal = res.totalRow * 1; @@ -922,7 +932,7 @@ export default { async datePayType() { try { this.payChartLoading = true; - const res = await dataSummaryApi.datePayType({ day: this.saleActive }); + const res = await dataSummaryApi.datePayType({ day: this.saleActive,shopId: this.shopId }); const data = res.countPayType.map((item) => { return { value: item.count, diff --git a/src/views/data/sales.vue b/src/views/data/sales.vue index a20a397..e972574 100644 --- a/src/views/data/sales.vue +++ b/src/views/data/sales.vue @@ -12,7 +12,7 @@ - + @@ -157,6 +157,7 @@