feat: 添加 fen 转 yuan 金额格式化方法

- 在 vxe-table 格式化方法中添加 formatFenToYuanAmount
- 该方法将 fen 单位的金额转换为 yuan 单位,并进行格式化
- 在多个模块中将 formatAmount2 替换为 formatFenToYuanAmount
This commit is contained in:
lrl
2025-07-14 13:24:26 +08:00
parent 8f8f3481ff
commit 067df741b4
17 changed files with 42 additions and 28 deletions

View File

@@ -13,6 +13,7 @@ import {
import {
erpCountInputFormatter,
erpNumberFormatter,
fenToYuan,
formatPast2,
isFunction,
isString,
@@ -343,6 +344,12 @@ setupVbenVxeTable({
return `${erpNumberFormatter(cellValue, digits)}`;
},
});
vxeUI.formats.add('formatFenToYuanAmount', {
tableCellFormatMethod({ cellValue }, digits = 2) {
return `${erpNumberFormatter(fenToYuan(cellValue), digits)}`;
},
});
},
useVbenForm,
});