feat: 添加 fen 转 yuan 金额格式化方法
- 在 vxe-table 格式化方法中添加 formatFenToYuanAmount - 该方法将 fen 单位的金额转换为 yuan 单位,并进行格式化 - 在多个模块中将 formatAmount2 替换为 formatFenToYuanAmount
This commit is contained in:
@@ -50,12 +50,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
field: 'price',
|
||||
title: '支付价格',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'refundPrice',
|
||||
title: '退款金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
|
||||
@@ -78,7 +78,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
field: 'price',
|
||||
title: '提现金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
|
||||
@@ -87,17 +87,17 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
title: '支付金额',
|
||||
field: 'price',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '退款金额',
|
||||
field: 'refundPrice',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '手续金额',
|
||||
field: 'channelFeePrice',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
|
||||
@@ -99,12 +99,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
field: 'payPrice',
|
||||
title: '支付金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'refundPrice',
|
||||
title: '退款金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
|
||||
@@ -120,7 +120,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
field: 'price',
|
||||
title: '转账金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
|
||||
@@ -54,22 +54,22 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
title: '余额',
|
||||
field: 'balance',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '累计支出',
|
||||
field: 'totalExpense',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '累计充值',
|
||||
field: 'totalRecharge',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '冻结金额',
|
||||
field: 'freezePrice',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
|
||||
@@ -89,12 +89,12 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
field: 'payPrice',
|
||||
title: '支付金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'bonusPrice',
|
||||
title: '赠送金额',
|
||||
formatter: 'formatAmount2',
|
||||
formatter: 'formatFenToYuanAmount',
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
|
||||
Reference in New Issue
Block a user