fix(withdraws): 提现账本校验区分现金/邀请金两本账展示 (#39)
配合后端 ledger-check 分账改造: - 异常清单按「现金」「邀请金」分别标注(缺扣款/缺退款/重复退款/ 非退款终态退款/余额差额),便于定位问题落在哪本账。 - 绿色(校验正常)时分别展示两账的余额与流水净额。 - WithdrawLedgerCheck 类型同步后端新增的 7 个 invite_* 字段。 修复现象:此前邀请奖励金提现单被误判为「缺扣款/缺退款流水」, 导致提现审核页现金账本报红。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: zzhyyyyy <2685922758@qq.com> Reviewed-on: #39 Co-authored-by: zhuzihao <zhuzihao@wonderable.ai> Co-committed-by: zhuzihao <zhuzihao@wonderable.ai>
This commit was merged in pull request #39.
This commit is contained in:
@@ -624,12 +624,27 @@ export default function WithdrawsPage() {
|
|||||||
const rejectAmount = rejectTargets.reduce((sum, item) => sum + item.amount_cents, 0);
|
const rejectAmount = rejectTargets.reduce((sum, item) => sum + item.amount_cents, 0);
|
||||||
const ledgerIssues = ledger
|
const ledgerIssues = ledger
|
||||||
? [
|
? [
|
||||||
ledger.balance_diff_cents ? `余额差额 ${yuan(ledger.balance_diff_cents)}` : '',
|
// 普通现金账(coin_cash)
|
||||||
ledger.missing_withdraw_txn_count ? `缺扣款流水 ${ledger.missing_withdraw_txn_count} 笔` : '',
|
ledger.balance_diff_cents ? `现金余额差额 ${yuan(ledger.balance_diff_cents)}` : '',
|
||||||
ledger.missing_refund_txn_count ? `缺退款流水 ${ledger.missing_refund_txn_count} 笔` : '',
|
ledger.missing_withdraw_txn_count ? `现金缺扣款流水 ${ledger.missing_withdraw_txn_count} 笔` : '',
|
||||||
ledger.duplicate_refund_txn_count ? `重复退款流水 ${ledger.duplicate_refund_txn_count} 类` : '',
|
ledger.missing_refund_txn_count ? `现金缺退款流水 ${ledger.missing_refund_txn_count} 笔` : '',
|
||||||
|
ledger.duplicate_refund_txn_count ? `现金重复退款流水 ${ledger.duplicate_refund_txn_count} 类` : '',
|
||||||
ledger.refund_txn_on_non_terminal_count
|
ledger.refund_txn_on_non_terminal_count
|
||||||
? `非退款终态存在退款流水 ${ledger.refund_txn_on_non_terminal_count} 笔`
|
? `现金非退款终态存在退款流水 ${ledger.refund_txn_on_non_terminal_count} 笔`
|
||||||
|
: '',
|
||||||
|
// 邀请奖励金账(invite_cash)
|
||||||
|
ledger.invite_balance_diff_cents ? `邀请金余额差额 ${yuan(ledger.invite_balance_diff_cents)}` : '',
|
||||||
|
ledger.invite_missing_withdraw_txn_count
|
||||||
|
? `邀请金缺扣款流水 ${ledger.invite_missing_withdraw_txn_count} 笔`
|
||||||
|
: '',
|
||||||
|
ledger.invite_missing_refund_txn_count
|
||||||
|
? `邀请金缺退款流水 ${ledger.invite_missing_refund_txn_count} 笔`
|
||||||
|
: '',
|
||||||
|
ledger.invite_duplicate_refund_txn_count
|
||||||
|
? `邀请金重复退款流水 ${ledger.invite_duplicate_refund_txn_count} 类`
|
||||||
|
: '',
|
||||||
|
ledger.invite_refund_txn_on_non_terminal_count
|
||||||
|
? `邀请金非退款终态存在退款流水 ${ledger.invite_refund_txn_on_non_terminal_count} 笔`
|
||||||
: '',
|
: '',
|
||||||
].filter(Boolean)
|
].filter(Boolean)
|
||||||
: [];
|
: [];
|
||||||
@@ -669,7 +684,7 @@ export default function WithdrawsPage() {
|
|||||||
message={ledger.ok ? '现金账本校验正常' : '现金账本存在异常'}
|
message={ledger.ok ? '现金账本校验正常' : '现金账本存在异常'}
|
||||||
description={
|
description={
|
||||||
ledger.ok
|
ledger.ok
|
||||||
? `账户余额合计 ${yuan(ledger.cash_balance_total_cents)},现金流水净额 ${yuan(ledger.cash_transaction_total_cents)}`
|
? `现金 余额 ${yuan(ledger.cash_balance_total_cents)} / 流水 ${yuan(ledger.cash_transaction_total_cents)};邀请金 余额 ${yuan(ledger.invite_cash_balance_total_cents)} / 流水 ${yuan(ledger.invite_cash_transaction_total_cents)}`
|
||||||
: ledgerIssues.join(';')
|
: ledgerIssues.join(';')
|
||||||
}
|
}
|
||||||
action={
|
action={
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ export interface WithdrawBulkResult {
|
|||||||
|
|
||||||
export interface WithdrawLedgerCheck {
|
export interface WithdrawLedgerCheck {
|
||||||
ok: boolean;
|
ok: boolean;
|
||||||
|
// 普通现金账(coin_cash)
|
||||||
cash_balance_total_cents: number;
|
cash_balance_total_cents: number;
|
||||||
cash_transaction_total_cents: number;
|
cash_transaction_total_cents: number;
|
||||||
balance_diff_cents: number;
|
balance_diff_cents: number;
|
||||||
@@ -240,6 +241,14 @@ export interface WithdrawLedgerCheck {
|
|||||||
missing_refund_txn_count: number;
|
missing_refund_txn_count: number;
|
||||||
duplicate_refund_txn_count: number;
|
duplicate_refund_txn_count: number;
|
||||||
refund_txn_on_non_terminal_count: number;
|
refund_txn_on_non_terminal_count: number;
|
||||||
|
// 邀请奖励金账(invite_cash:与普通现金物理隔离,各自对账)
|
||||||
|
invite_cash_balance_total_cents: number;
|
||||||
|
invite_cash_transaction_total_cents: number;
|
||||||
|
invite_balance_diff_cents: number;
|
||||||
|
invite_missing_withdraw_txn_count: number;
|
||||||
|
invite_missing_refund_txn_count: number;
|
||||||
|
invite_duplicate_refund_txn_count: number;
|
||||||
|
invite_refund_txn_on_non_terminal_count: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WxpayHealthCheck {
|
export interface WxpayHealthCheck {
|
||||||
|
|||||||
Reference in New Issue
Block a user