Pre Merge pull request !173 from 痴货/master

pull/173/MERGE
痴货 2025-07-14 05:25:18 +00:00 committed by Gitee
commit d420453f8b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
17 changed files with 42 additions and 28 deletions

View File

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

View File

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

View File

@ -74,7 +74,7 @@ export function useGridColumns<T = MallSpuApi.Spu>(
{ {
field: 'price', field: 'price',
title: '价格', title: '价格',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'salesCount', field: 'salesCount',

View File

@ -204,13 +204,13 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
field: 'bargainFirstPrice', field: 'bargainFirstPrice',
title: '起始价格', title: '起始价格',
minWidth: 100, minWidth: 100,
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'bargainMinPrice', field: 'bargainMinPrice',
title: '砍价底价', title: '砍价底价',
minWidth: 100, minWidth: 100,
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'recordUserCount', field: 'recordUserCount',

View File

@ -72,13 +72,13 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
field: 'activity.bargainMinPrice', field: 'activity.bargainMinPrice',
title: '最低价', title: '最低价',
minWidth: 100, minWidth: 100,
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'bargainPrice', field: 'bargainPrice',
title: '当前价', title: '当前价',
minWidth: 100, minWidth: 100,
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'activity.helpMaxCount', field: 'activity.helpMaxCount',
@ -149,7 +149,7 @@ export function useHelpGridColumns(): VxeTableGridOptions['columns'] {
field: 'reducePrice', field: 'reducePrice',
title: '砍价金额', title: '砍价金额',
minWidth: 100, minWidth: 100,
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'createTime', field: 'createTime',

View File

@ -86,7 +86,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
field: 'marketPrice', field: 'marketPrice',
title: '原价', title: '原价',
minWidth: 100, minWidth: 100,
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'point', field: 'point',
@ -97,7 +97,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
field: 'price', field: 'price',
title: '兑换金额', title: '兑换金额',
minWidth: 100, minWidth: 100,
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'status', field: 'status',

View File

@ -99,7 +99,7 @@ export function useGridColumns(): VxeGridPropTypes.Columns {
{ {
field: 'refundPrice', field: 'refundPrice',
title: '订单金额', title: '订单金额',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'user.nickname', field: 'user.nickname',

View File

@ -97,13 +97,13 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
field: 'price', field: 'price',
title: '提现金额', title: '提现金额',
minWidth: 80, minWidth: 80,
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'feePrice', field: 'feePrice',
title: '提现手续费', title: '提现手续费',
minWidth: 80, minWidth: 80,
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'type', field: 'type',

View File

@ -81,7 +81,7 @@ export function useGridColumns(): VxeGridPropTypes.Columns {
{ {
field: 'payPrice', field: 'payPrice',
title: '实付金额(元)', title: '实付金额(元)',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
minWidth: 180, minWidth: 180,
}, },
{ {

View File

@ -166,7 +166,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{ {
field: 'payPrice', field: 'payPrice',
title: '实际支付', title: '实际支付',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
minWidth: 180, minWidth: 180,
}, },
{ {

View File

@ -50,12 +50,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{ {
field: 'price', field: 'price',
title: '支付价格', title: '支付价格',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'refundPrice', field: 'refundPrice',
title: '退款金额', title: '退款金额',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'createTime', field: 'createTime',

View File

@ -78,7 +78,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{ {
field: 'price', field: 'price',
title: '提现金额', title: '提现金额',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'userName', field: 'userName',

View File

@ -87,17 +87,17 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{ {
title: '支付金额', title: '支付金额',
field: 'price', field: 'price',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
title: '退款金额', title: '退款金额',
field: 'refundPrice', field: 'refundPrice',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
title: '手续金额', title: '手续金额',
field: 'channelFeePrice', field: 'channelFeePrice',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
title: '订单号', title: '订单号',

View File

@ -99,12 +99,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{ {
field: 'payPrice', field: 'payPrice',
title: '支付金额', title: '支付金额',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'refundPrice', field: 'refundPrice',
title: '退款金额', title: '退款金额',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'status', field: 'status',

View File

@ -120,7 +120,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{ {
field: 'price', field: 'price',
title: '转账金额', title: '转账金额',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'status', field: 'status',

View File

@ -54,22 +54,22 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{ {
title: '余额', title: '余额',
field: 'balance', field: 'balance',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
title: '累计支出', title: '累计支出',
field: 'totalExpense', field: 'totalExpense',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
title: '累计充值', title: '累计充值',
field: 'totalRecharge', field: 'totalRecharge',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
title: '冻结金额', title: '冻结金额',
field: 'freezePrice', field: 'freezePrice',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
title: '创建时间', title: '创建时间',

View File

@ -89,12 +89,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{ {
field: 'payPrice', field: 'payPrice',
title: '支付金额', title: '支付金额',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'bonusPrice', field: 'bonusPrice',
title: '赠送金额', title: '赠送金额',
formatter: 'formatAmount2', formatter: 'formatFenToYuanAmount',
}, },
{ {
field: 'status', field: 'status',