diff --git a/apps/web-antd/src/views/mall/product/spu/components/spu-select-data.ts b/apps/web-antd/src/views/mall/product/spu/components/spu-select-data.ts index d2f45c864..d0a9dfc9f 100644 --- a/apps/web-antd/src/views/mall/product/spu/components/spu-select-data.ts +++ b/apps/web-antd/src/views/mall/product/spu/components/spu-select-data.ts @@ -89,10 +89,10 @@ export function useGridColumns( }, { field: 'price', - title: '商品售价', + title: '商品售价(元)', minWidth: 90, align: 'center', - formatter: 'formatAmount2', + formatter: 'formatFenToYuanAmount', }, { field: 'salesCount', diff --git a/apps/web-antd/src/views/mall/product/spu/data.ts b/apps/web-antd/src/views/mall/product/spu/data.ts index 4373022bd..cc71ef707 100644 --- a/apps/web-antd/src/views/mall/product/spu/data.ts +++ b/apps/web-antd/src/views/mall/product/spu/data.ts @@ -2,7 +2,7 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { MallSpuApi } from '#/api/mall/product/spu'; -import { fenToYuan, handleTree, treeToString } from '@vben/utils'; +import { handleTree, treeToString } from '@vben/utils'; import { getCategoryList } from '#/api/mall/product/category'; import { getRangePickerDefaultProps } from '#/utils'; @@ -101,25 +101,21 @@ export function useGridColumns( }, { field: 'price', - title: '价格', + title: '价格(元)', minWidth: 100, - formatter: 'formatAmount2', + formatter: 'formatFenToYuanAmount', }, { field: 'marketPrice', - title: '市场价', + title: '市场价(元)', minWidth: 100, - formatter: ({ row }) => { - return `${fenToYuan(row.marketPrice)} 元`; - }, + formatter: 'formatFenToYuanAmount', }, { field: 'costPrice', - title: '成本价', + title: '成本价(元)', minWidth: 100, - formatter: ({ row }) => { - return `${fenToYuan(row.costPrice)} 元`; - }, + formatter: 'formatFenToYuanAmount', }, { field: 'salesCount', diff --git a/apps/web-ele/src/views/mall/product/spu/components/spu-select-data.ts b/apps/web-ele/src/views/mall/product/spu/components/spu-select-data.ts index bb1296995..693966e50 100644 --- a/apps/web-ele/src/views/mall/product/spu/components/spu-select-data.ts +++ b/apps/web-ele/src/views/mall/product/spu/components/spu-select-data.ts @@ -88,10 +88,10 @@ export function useGridColumns( }, { field: 'price', - title: '商品售价', + title: '商品售价(元)', minWidth: 90, align: 'center', - formatter: 'formatAmount2', + formatter: 'formatFenToYuanAmount', }, { field: 'salesCount', diff --git a/apps/web-ele/src/views/mall/product/spu/data.ts b/apps/web-ele/src/views/mall/product/spu/data.ts index f26dc8e43..5bc5695aa 100644 --- a/apps/web-ele/src/views/mall/product/spu/data.ts +++ b/apps/web-ele/src/views/mall/product/spu/data.ts @@ -2,7 +2,7 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { MallSpuApi } from '#/api/mall/product/spu'; -import { fenToYuan, handleTree, treeToString } from '@vben/utils'; +import { handleTree, treeToString } from '@vben/utils'; import { getCategoryList } from '#/api/mall/product/category'; import { getRangePickerDefaultProps } from '#/utils'; @@ -105,25 +105,21 @@ export function useGridColumns( }, { field: 'price', - title: '价格', + title: '价格(元)', minWidth: 100, - formatter: 'formatAmount2', + formatter: 'formatFenToYuanAmount', }, { field: 'marketPrice', - title: '市场价', + title: '市场价(元)', minWidth: 100, - formatter: ({ row }) => { - return `${fenToYuan(row.marketPrice)} 元`; - }, + formatter: 'formatFenToYuanAmount', }, { field: 'costPrice', - title: '成本价', + title: '成本价(元)', minWidth: 100, - formatter: ({ row }) => { - return `${fenToYuan(row.costPrice)} 元`; - }, + formatter: 'formatFenToYuanAmount', }, { field: 'salesCount',