收敛前端金额表单命名

This commit is contained in:
yml
2026-06-09 20:59:50 +08:00
parent 60324765c5
commit 9cc959afc4
19 changed files with 103 additions and 232 deletions
@@ -78,16 +78,16 @@ export function calculateCheckoutTotal(
}
export function calculateCounterTotal(counterForm: {
consumable_amount: number
consumableAmountYuan: number
coin_consumed_m: number
other_amount: number
deposit_deduct_amount: number
otherAmountYuan: number
depositDeductAmountYuan: number
}): number {
return roundMoney(
counterForm.consumable_amount +
counterForm.consumableAmountYuan +
counterForm.coin_consumed_m +
counterForm.other_amount +
counterForm.deposit_deduct_amount
counterForm.otherAmountYuan +
counterForm.depositDeductAmountYuan
)
}
@@ -127,10 +127,10 @@ export function hydrateCounterFormFromOrder(order: Order | null) {
try {
const info = JSON.parse(order.counter_info) as Record<string, any>
return {
consumable_amount: readNumber(info.consumable_amount),
consumableAmountYuan: readNumber(info.consumableAmountYuan),
coin_consumed_m: readNumber(info.coin_consumed_m),
other_amount: readNumber(info.other_amount),
deposit_deduct_amount: readNumber(info.deposit_deduct_amount),
otherAmountYuan: readNumber(info.otherAmountYuan),
depositDeductAmountYuan: readNumber(info.depositDeductAmountYuan),
reason: String(info.reason || ''),
evidenceText: String(info.evidence || ''),
}