From ca6c04348c6e4612dfc62f4602298b8aa935cc23 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 May 2024 11:38:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E7=A7=BB=E9=99=A4=E9=97=A8?= =?UTF-8?q?=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/statement/index.vue | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/pages/statement/index.vue b/src/pages/statement/index.vue index 46cb6c1..a159d7e 100644 --- a/src/pages/statement/index.vue +++ b/src/pages/statement/index.vue @@ -4,7 +4,7 @@ - + - + 支出金额 兑奖金额 - {{ ledger.expenditure }} + {{ + ledger.expenditure + }} @@ -219,7 +224,7 @@ function generateTimeArrayWithLastPeriod() { .toDate(), endDate: dayjs(timeRange.current.endDate) .subtract(1, 'month') - .endOf('month') + .endOf('month'), } break default: @@ -261,12 +266,18 @@ const tabChange1 = (e) => { const getList = async () => { const url = tabIndex1.value == 0 ? '/statistics/sales' : '/statistics/stores' - const resData = await http.get(url, { - params: { - start_at: currentC.value.start, - end_at: currentC.value.end, + let params = { + start_at: currentC.value.start, + end_at: currentC.value.end + } + if (tabIndex.value == 0) { + params = { + ...params, ...shoreInfo.value, - }, + } + } + const resData = await http.get(url, { + params: params, }) list.value = resData }