fix withdraw and desposit ui

This commit is contained in:
2026-06-15 15:48:10 +03:30
parent f7b86a5fa1
commit 57a8fb9854
11 changed files with 438 additions and 100 deletions
@@ -2,6 +2,7 @@ import type { BaseTableColumn } from '@core/type/baseTable'
import {toJalali, toJalaliNoTime, toTime} from '@core/utils/useDataTime'
import CustomTag from '@/components/CustomTag.vue'
import { usePrice } from '@core/utils/usePrice'
import { getCashBalance, getGoldBalance } from '@/components/mobile/utils/wallet'
/*import BudgetSelect from '@/components/BudgetSelect.vue'
import { useStaticApiListsStore } from '@/store/staticApisStore'
import type { FilterSelect } from '@/model/filterSelect'
@@ -75,7 +76,7 @@ export const cols: BaseTableColumn[] = [
key: 'wallet.cash',
type: 'Number',
customRender(data) {
return usePrice(data.record?.wallet[0]?.cash ?? 0, true, '')
return usePrice(getCashBalance(data.record?.wallet, { walletCash: data.record?.wallet_cash }), true, '')
}
},
{
@@ -85,9 +86,7 @@ export const cols: BaseTableColumn[] = [
type: 'Number',
filterable: false,
customRender(data) {
let sum = 0
data.record.wallet.forEach((x) => (sum += x.gold))
return sum.toFixed(3)
return getGoldBalance(data.record?.wallet, { walletGold: data.record?.wallet_gold })
}
},
{