This commit is contained in:
2026-07-20 10:16:27 +08:00
parent 8493f0df03
commit f3d2951dc3
24 changed files with 23623 additions and 1546 deletions
@@ -37,22 +37,22 @@ onMounted(() => {
refreshFinance()
})
// 字段名对齐后端 FinanceSummaryResponse:
// receivable_total / payable_total / period_receipt_total / period_payment_total
// 字段名对齐后端 FinanceSummaryResponse。
// 后端 Decimal 序列化为 JSON 字符串,故用 Number() 转换再填充 0。
const totalReceivable = computed(() => {
return state.financeSummary?.receivable_total ?? 0
return Number(state.financeSummary?.receivable_total) || 0
})
const totalPayable = computed(() => {
return state.financeSummary?.payable_total ?? 0
return Number(state.financeSummary?.payable_total) || 0
})
const periodReceived = computed(() => {
return state.financeSummary?.period_receipt_total ?? 0
return Number(state.financeSummary?.period_receipt_total) || 0
})
const periodPaid = computed(() => {
return state.financeSummary?.period_payment_total ?? 0
return Number(state.financeSummary?.period_payment_total) || 0
})
function getTransactionTypeLabel(type: string): string {