[fix]修改数据错误
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user