diff --git a/apps/web-antd/src/views/pay/demo/withdraw/index.vue b/apps/web-antd/src/views/pay/demo/withdraw/index.vue
index cbfe713a6..f92e408c5 100644
--- a/apps/web-antd/src/views/pay/demo/withdraw/index.vue
+++ b/apps/web-antd/src/views/pay/demo/withdraw/index.vue
@@ -12,6 +12,7 @@ import {
transferDemoWithdraw,
} from '#/api/pay/demo/withdraw';
import { $t } from '#/locales';
+import { floatToFixed2 } from '#/utils';
import { useGridColumns } from './data';
import Form from './modules/form.vue';
@@ -109,7 +110,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
钱包余额
- ¥{{ (row.price / 100.0).toFixed(2) }}
+ ¥{{ floatToFixed2(row.price) }}
diff --git a/apps/web-antd/src/views/pay/order/modules/detail.vue b/apps/web-antd/src/views/pay/order/modules/detail.vue
index 3d9b6e539..d91fc9d13 100644
--- a/apps/web-antd/src/views/pay/order/modules/detail.vue
+++ b/apps/web-antd/src/views/pay/order/modules/detail.vue
@@ -10,7 +10,7 @@ import { Descriptions, Divider, Tag } from 'ant-design-vue';
import { getOrder } from '#/api/pay/order';
import { DictTag } from '#/components/dict-tag';
-import { DICT_TYPE } from '#/utils';
+import { DICT_TYPE, floatToFixed2 } from '#/utils';
const detailData = ref();
@@ -63,16 +63,16 @@ const [Modal, modalApi] = useVbenModal({
- ¥{{ (detailData?.price || 0 / 100.0).toFixed(2) }}
+ ¥{{ floatToFixed2(detailData?.price) }}
- ¥{{ (detailData?.channelFeePrice || 0 / 100.0).toFixed(2) }}
+ ¥{{ floatToFixed2(detailData?.channelFeePrice) }}
- {{ (detailData?.channelFeeRate || 0 / 100.0).toFixed(2) }}%
+ {{ floatToFixed2(detailData?.channelFeeRate) }}%
{{ formatDateTime(detailData?.successTime) }}
@@ -115,7 +115,7 @@ const [Modal, modalApi] = useVbenModal({
- ¥{{ (detailData?.refundPrice || 0 / 100.0).toFixed(2) }}
+ ¥{{ floatToFixed2(detailData?.refundPrice) }}
diff --git a/apps/web-antd/src/views/pay/transfer/data.ts b/apps/web-antd/src/views/pay/transfer/data.ts
index 36d7cb861..06f875b6a 100644
--- a/apps/web-antd/src/views/pay/transfer/data.ts
+++ b/apps/web-antd/src/views/pay/transfer/data.ts
@@ -9,7 +9,12 @@ import { formatDateTime } from '@vben/utils';
import { Tag } from 'ant-design-vue';
import { DictTag } from '#/components/dict-tag';
-import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
+import {
+ DICT_TYPE,
+ floatToFixed2,
+ getDictOptions,
+ getRangePickerDefaultProps,
+} from '#/utils';
/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {
@@ -120,7 +125,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
field: 'price',
title: '转账金额',
- formatter: ({ cellValue }) => `¥${(cellValue / 100).toFixed(2)}`,
+ formatter: 'formatAmount2',
},
{
field: 'status',
@@ -217,7 +222,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
content: (data) => {
return h(Tag, {
color: 'blue',
- content: `¥${(data?.price / 100).toFixed(2)}`,
+ content: `¥${floatToFixed2(data?.price)}`,
});
},
},