feat: 添加 fen 转 yuan 金额格式化方法
- 在 vxe-table 格式化方法中添加 formatFenToYuanAmount - 该方法将 fen 单位的金额转换为 yuan 单位,并进行格式化 - 在多个模块中将 formatAmount2 替换为 formatFenToYuanAmount
This commit is contained in:
@@ -74,7 +74,7 @@ export function useGridColumns<T = MallSpuApi.Spu>(
|
||||
{
|
||||
field: 'price',
|
||||
title: '价格',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'salesCount',
|
||||
|
||||
@@ -204,13 +204,13 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'bargainFirstPrice',
|
||||
title: '起始价格',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'bargainMinPrice',
|
||||
title: '砍价底价',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'recordUserCount',
|
||||
|
||||
@@ -72,13 +72,13 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'activity.bargainMinPrice',
|
||||
title: '最低价',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'bargainPrice',
|
||||
title: '当前价',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'activity.helpMaxCount',
|
||||
@@ -149,7 +149,7 @@ export function useHelpGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'reducePrice',
|
||||
title: '砍价金额',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
|
||||
@@ -86,7 +86,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'marketPrice',
|
||||
title: '原价',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'point',
|
||||
@@ -97,7 +97,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'price',
|
||||
title: '兑换金额',
|
||||
minWidth: 100,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
|
||||
@@ -99,7 +99,7 @@ export function useGridColumns(): VxeGridPropTypes.Columns {
|
||||
{
|
||||
field: 'refundPrice',
|
||||
title: '订单金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'user.nickname',
|
||||
|
||||
@@ -97,13 +97,13 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'price',
|
||||
title: '提现金额',
|
||||
minWidth: 80,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'feePrice',
|
||||
title: '提现手续费',
|
||||
minWidth: 80,
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'type',
|
||||
|
||||
@@ -81,7 +81,7 @@ export function useGridColumns(): VxeGridPropTypes.Columns {
|
||||
{
|
||||
field: 'payPrice',
|
||||
title: '实付金额(元)',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
minWidth: 180,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -166,7 +166,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
field: 'payPrice',
|
||||
title: '实际支付',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
minWidth: 180,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user