From 22449e0279eff502e4496b57da2ba602360e5b13 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期三, 25 十一月 2026 13:50:03 +0800
Subject: [PATCH] 回款明细修改
---
src/utils/money.js | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/src/utils/money.js b/src/utils/money.js
index a8d93b1..b198aa0 100644
--- a/src/utils/money.js
+++ b/src/utils/money.js
@@ -236,5 +236,26 @@
moneyCmp,
moneyRound,
moneyText,
- moneyDecimal
+ moneyDecimal,
+ formatMoneyValue,
+ moneyColumnFormatter
+}
+
+/**
+ * 閲戦灞曠ず鏍煎紡鍖栵細null/绌轰繚鎸佺┖锛�0 鏄剧ず 0.00锛屽叾浣欎繚鐣欎袱浣嶅皬鏁般��
+ */
+export function formatMoneyValue(value) {
+ if (value === null || value === undefined || value === '') {
+ return ''
+ }
+ const num = Number(value)
+ if (!Number.isFinite(num)) {
+ return value
+ }
+ return num.toFixed(2)
+}
+
+/** el-table-column formatter 绛惧悕锛�(row, column, cellValue, index) */
+export function moneyColumnFormatter(row, column, cellValue) {
+ return formatMoneyValue(cellValue)
}
--
Gitblit v1.9.3