feat(admin,api,player): settlement stats, team crests, MS fields and list bet summary

This commit is contained in:
2026-06-04 17:30:48 +08:00
parent cc737e2924
commit 9fcee31a9a
27 changed files with 2296 additions and 427 deletions

View File

@@ -9,6 +9,34 @@ const transactions = ref<
Array<{ transactionType: string; amount: string; createdAt: string; transactionId?: string }>
>([]);
const TX_KEY_MAP: Record<string, string> = {
MANUAL_DEPOSIT: 'wallet.tx_deposit',
MANUAL_WITHDRAW: 'wallet.tx_withdraw',
MANUAL_ADJUST: 'wallet.tx_adjust',
BET_FREEZE: 'wallet.tx_bet_freeze',
BET_DEDUCT: 'wallet.tx_bet_deduct',
BET_SETTLE_WIN: 'wallet.tx_bet_win',
BET_SETTLE_LOSE: 'wallet.tx_bet_lose',
BET_SETTLE_PUSH: 'wallet.tx_bet_push',
BET_WIN: 'wallet.tx_bet_win',
BET_REFUND: 'wallet.tx_bet_refund',
BET_VOID: 'wallet.tx_bet_void',
BET_VOID_REFUND: 'wallet.tx_bet_void',
CASHBACK: 'wallet.tx_cashback',
RESETTLE_REVERSE: 'wallet.tx_resettle',
DEPOSIT: 'wallet.tx_deposit',
WITHDRAW: 'wallet.tx_withdraw',
};
function txLabel(type: string): string {
const key = TX_KEY_MAP[type.toUpperCase()];
if (key) {
const translated = t(key);
if (translated !== key) return translated;
}
return type;
}
onMounted(async () => {
const { data } = await api.get('/player/wallet/transactions');
transactions.value = data.data.items ?? [];
@@ -24,7 +52,7 @@ onMounted(async () => {
:key="tx.transactionId ?? tx.createdAt"
class="tx-row"
>
<span>{{ tx.transactionType }}</span>
<span class="tx-type">{{ txLabel(tx.transactionType) }}</span>
<span :class="parseFloat(tx.amount) >= 0 ? 'pos' : 'neg'">
{{ formatMoney(tx.amount, locale) }}
</span>
@@ -47,6 +75,7 @@ onMounted(async () => {
.tx-row:last-child {
border-bottom: none;
}
.tx-type { font-weight: 700; color: var(--text); }
.pos { color: var(--primary-light); font-weight: 800; font-size: 15px; }
.neg { color: var(--danger); font-weight: 700; }
.tx-time { width: 100%; font-size: 11px; color: var(--text-muted); margin-top: 4px; }