From 0e5ef6e546db5b82f314bdbd58f8c62c34abb0f6 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Sat, 28 Jun 2025 00:07:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=87=91=E9=A2=9D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/crm/contract/data.ts | 6 ++++-- .../src/views/crm/contract/modules/detail-data.ts | 10 ++++------ apps/web-antd/src/views/crm/receivable/plan/data.ts | 6 +++--- apps/web-antd/src/views/pay/demo/withdraw/index.vue | 4 ++-- apps/web-antd/src/views/pay/order/data.ts | 10 +++++----- apps/web-antd/src/views/pay/transfer/data.ts | 4 ++-- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/web-antd/src/views/crm/contract/data.ts b/apps/web-antd/src/views/crm/contract/data.ts index 44a0cd144..727d8661a 100644 --- a/apps/web-antd/src/views/crm/contract/data.ts +++ b/apps/web-antd/src/views/crm/contract/data.ts @@ -2,7 +2,7 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import { useUserStore } from '@vben/stores'; -import { erpPriceMultiply, floatToFixed2 } from '@vben/utils'; +import { erpPriceInputFormatter, erpPriceMultiply } from '@vben/utils'; import { z } from '#/adapter/form'; import { getSimpleBusinessList } from '#/api/crm/business'; @@ -341,7 +341,9 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { field: 'unpaidPrice', minWidth: 150, formatter: ({ row }) => { - return floatToFixed2(row.totalPrice - row.totalReceivablePrice); + return erpPriceInputFormatter( + row.totalPrice - row.totalReceivablePrice, + ); }, }, { diff --git a/apps/web-antd/src/views/crm/contract/modules/detail-data.ts b/apps/web-antd/src/views/crm/contract/modules/detail-data.ts index 2421459a7..c8ffeb153 100644 --- a/apps/web-antd/src/views/crm/contract/modules/detail-data.ts +++ b/apps/web-antd/src/views/crm/contract/modules/detail-data.ts @@ -3,11 +3,7 @@ import type { DescriptionItemSchema } from '#/components/description'; import { h } from 'vue'; -import { - erpPriceInputFormatter, - floatToFixed2, - formatDateTime, -} from '@vben/utils'; +import { erpPriceInputFormatter, formatDateTime } from '@vben/utils'; import { DictTag } from '#/components/dict-tag'; import { DICT_TYPE } from '#/utils'; @@ -148,7 +144,9 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] { field: 'unpaidPrice', minWidth: 150, formatter: ({ row }) => { - return floatToFixed2(row.totalPrice - row.totalReceivablePrice); + return erpPriceInputFormatter( + row.totalPrice - row.totalReceivablePrice, + ); }, }, { diff --git a/apps/web-antd/src/views/crm/receivable/plan/data.ts b/apps/web-antd/src/views/crm/receivable/plan/data.ts index 1704b3765..baab21d1d 100644 --- a/apps/web-antd/src/views/crm/receivable/plan/data.ts +++ b/apps/web-antd/src/views/crm/receivable/plan/data.ts @@ -2,7 +2,7 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import { useUserStore } from '@vben/stores'; -import { floatToFixed2 } from '@vben/utils'; +import { erpPriceInputFormatter } from '@vben/utils'; import { getContractSimpleList } from '#/api/crm/contract'; import { getCustomerSimpleList } from '#/api/crm/customer'; @@ -254,9 +254,9 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { minWidth: 160, formatter: ({ row }) => { if (row.receivable) { - return floatToFixed2(row.price - row.receivable.price); + return erpPriceInputFormatter(row.price - row.receivable.price); } - return floatToFixed2(row.price); + return erpPriceInputFormatter(row.price); }, }, { 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 5243bd4e4..fd683883b 100644 --- a/apps/web-antd/src/views/pay/demo/withdraw/index.vue +++ b/apps/web-antd/src/views/pay/demo/withdraw/index.vue @@ -3,7 +3,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { DemoWithdrawApi } from '#/api/pay/demo/withdraw'; import { DocAlert, Page, useVbenModal } from '@vben/common-ui'; -import { floatToFixed2 } from '@vben/utils'; +import { erpPriceInputFormatter } from '@vben/utils'; import { message, Tag } from 'ant-design-vue'; @@ -110,7 +110,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ 钱包余额