From 4e0f3c5a8532f9621d1e2a64648b865b1e2dc6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=8D=97=E5=9B=BD?= <164292041@qq.com> Date: Mon, 8 Jun 2026 15:16:32 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/backend/dashboard.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/web/src/views/backend/dashboard.vue b/web/src/views/backend/dashboard.vue index 9803cc8..358cf13 100644 --- a/web/src/views/backend/dashboard.vue +++ b/web/src/views/backend/dashboard.vue @@ -419,6 +419,10 @@ const customerSummary = reactive({ unclaimAmount: 0, unclaimReceipt: 0, }) +const transactionTotals = reactive({ + totalDeposit: 0, + totalWithdraw: 0, +}) const filters = reactive({ startDate: today(), @@ -432,8 +436,8 @@ const transactionPage = reactive({ }) const showAllBanks = ref(false) const visibleBanks = computed(() => (showAllBanks.value ? banks.value : banks.value.slice(0, 4))) -const totalDeposit = computed(() => customerSummary.totalDeposit) -const totalWithdraw = computed(() => customerSummary.totalWithdraw) +const totalDeposit = computed(() => transactionTotals.totalDeposit) +const totalWithdraw = computed(() => transactionTotals.totalWithdraw) const dateRangeText = computed(() => { const start = new Date(`${filters.startDate}T00:00:00`) const end = new Date(`${filters.endDate}T00:00:00`) @@ -446,8 +450,8 @@ const dateRangeText = computed(() => { }) }) const summary = computed(() => [ - { label: t('dashboard.Total Deposit / IN'), value: `AUD ${money(totalDeposit.value)}` }, - { label: t('dashboard.Total Withdraw / OUT'), value: `AUD ${money(totalWithdraw.value)}` }, + { label: t('dashboard.Total Deposit / IN'), value: `AUD ${money(customerSummary.totalDeposit)}` }, + { label: t('dashboard.Total Withdraw / OUT'), value: `AUD ${money(customerSummary.totalWithdraw)}` }, { label: t('dashboard.Deposit Count'), value: customerSummary.countDeposit }, { label: t('dashboard.Withdraw Count'), value: customerSummary.countWithdraw }, { label: t('dashboard.Active Player'), value: customerSummary.activePlayer }, @@ -566,6 +570,8 @@ const loadDashboard = (page = transactionPage.currentPage) => { transactionPage.currentPage = toNumber(transactionData?.current_page) || page transactionPage.lastPage = toNumber(transactionData?.last_page) || 1 transactionPage.pageSize = transactionPage.lastPage > 0 ? Math.max(1, Math.ceil(transactionPage.count / transactionPage.lastPage)) : 10 + transactionTotals.totalDeposit = toNumber(transactionData?.total_deposit) + transactionTotals.totalWithdraw = toNumber(transactionData?.total_withdraw) const customerData = res.data.customer as DashboardCustomerSummary | undefined customerSummary.totalDeposit = toNumber(customerData?.total_deposit)