feat(admin+api+player): 优胜赛结算态、禁止新增单场与钱包流水展示优化

- API/管理端:优胜赛 SETTLED 后禁止新增单场,列表与子页展示结算状态
- 玩家端:已结算 outright 只读展示并高亮冠军
- 管理端:结算后 stale 标记驱动列表刷新;财务流水时间与备注 i18n 优化
- shared:txDisplayAmount 与 LEAGUE_OUTRIGHT_SETTLED 错误码
This commit is contained in:
2026-06-23 12:20:40 +08:00
parent ce84226219
commit d3c211411b
36 changed files with 525 additions and 128 deletions

View File

@@ -0,0 +1,11 @@
/** 钱包流水展示用金额:输单结算 amount 为 0可用余额未变用冻结差额表示亏损 */
export function txDisplayAmount(tx) {
const type = tx.transactionType.toUpperCase();
const amt = parseFloat(tx.amount);
if (type === 'BET_SETTLE_LOSE' && amt === 0 && tx.frozenBefore != null && tx.frozenAfter != null) {
const frozenDelta = parseFloat(tx.frozenBefore) - parseFloat(tx.frozenAfter);
if (frozenDelta > 0)
return (-frozenDelta).toString();
}
return tx.amount;
}