feat(admin,api,player): 代理层级管理、额度上下分与玩家钱包详情

新增代理管理器与二级代理体系,完善信用额度/上下分上下文与冻结策略;代理端玩家与子代理管理增强;玩家端新增钱包详情页与交易筛选优化。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-08 15:34:12 +08:00
parent b2216abd0c
commit 414998ce36
54 changed files with 6641 additions and 481 deletions

View File

@@ -10,22 +10,39 @@ interface Transaction {
transactionId?: string;
}
const props = defineProps<{ items: Transaction[] }>();
const props = withDefaults(defineProps<{
items: Transaction[];
cashbackTotal?: string;
}>(), {
cashbackTotal: '0',
});
const { t, locale } = useI18n();
const CASHBACK_TYPES = new Set(['CASHBACK', 'CASHBACK_DEPOSIT']);
const stats = computed(() => {
let income = 0;
let expense = 0;
let cashback = 0;
for (const tx of props.items) {
const amt = parseAmount(tx.amount);
const isCb = CASHBACK_TYPES.has(tx.transactionType.toUpperCase());
if (isCb) {
cashback += Math.abs(amt);
}
if (amt >= 0) income += amt;
else expense += Math.abs(amt);
}
// Use server-side cashback total if provided (more accurate across all pages)
if (props.cashbackTotal !== '0') {
cashback = Math.abs(parseAmount(props.cashbackTotal));
}
const net = income - expense;
return { income, expense, net };
return { income, expense, net, cashback };
});
</script>
@@ -48,6 +65,11 @@ const stats = computed(() => {
</span>
<span class="stat-label">{{ t('wallet.stats_net') }}</span>
</div>
<div class="stat-divider" />
<div class="stat-item">
<span class="stat-val cashback">{{ formatMoney(stats.cashback, locale) }}</span>
<span class="stat-label">{{ t('wallet.stats_cashback') }}</span>
</div>
</div>
</div>
</template>
@@ -92,6 +114,7 @@ const stats = computed(() => {
.stat-val.income { color: #3db865; }
.stat-val.expense { color: #e05050; }
.stat-val.cashback { color: #f0b90b; }
.stat-label {
display: block;