diff --git a/src/api/crm/product/productCategory/index.ts b/src/api/crm/product/category/index.ts similarity index 100% rename from src/api/crm/product/productCategory/index.ts rename to src/api/crm/product/category/index.ts diff --git a/src/api/crm/product/index.ts b/src/api/crm/product/index.ts index 787939e8..f0c23289 100644 --- a/src/api/crm/product/index.ts +++ b/src/api/crm/product/index.ts @@ -8,17 +8,11 @@ export interface ProductVO { price: number status: number categoryId: number + categoryName?: string description: string ownerUserId: number } -// TODO 芋艿:待删除 -export interface ProductExpandVO extends ProductVO { - count: number - discountPercent: number - totalPrice: number -} - // 查询产品列表 export const getProductPage = async (params) => { return await request.get({ url: `/crm/product/page`, params }) diff --git a/src/views/crm/business/components/BusinessList.vue b/src/views/crm/business/components/BusinessList.vue index b01781a4..f990606e 100644 --- a/src/views/crm/business/components/BusinessList.vue +++ b/src/views/crm/business/components/BusinessList.vue @@ -38,7 +38,12 @@ - + @@ -66,8 +71,8 @@ import * as BusinessApi from '@/api/crm/business' import * as ContactApi from '@/api/crm/contact' import BusinessForm from './../BusinessForm.vue' import { BizTypeEnum } from '@/api/crm/permission' -import { fenToYuanFormat } from '@/utils/formatter' import BusinessListModal from './BusinessListModal.vue' +import { erpPriceTableColumnFormatter } from '@/utils' const message = useMessage() // 消息 diff --git a/src/views/crm/business/components/BusinessListModal.vue b/src/views/crm/business/components/BusinessListModal.vue index 1abfdc7c..f2a39b10 100644 --- a/src/views/crm/business/components/BusinessListModal.vue +++ b/src/views/crm/business/components/BusinessListModal.vue @@ -49,7 +49,7 @@ label="商机金额" align="center" prop="price" - :formatter="fenToYuanFormat" + :formatter="erpPriceInputFormatter" /> @@ -75,7 +75,7 @@ diff --git a/src/views/crm/product/detail/ProductDetailsInfo.vue b/src/views/crm/product/detail/ProductDetailsInfo.vue index ba9e89af..52a11e96 100644 --- a/src/views/crm/product/detail/ProductDetailsInfo.vue +++ b/src/views/crm/product/detail/ProductDetailsInfo.vue @@ -8,11 +8,11 @@ {{ product.name }} {{ product.no }} - {{ fenToYuan(product.price) }}元 - {{ product.description }} - - {{ productCategoryList?.find((c) => c.id === product.categoryId)?.name }} + + {{ erpPriceInputFormatter(product.price) }} 元 + {{ product.description }} + {{ product.categoryName }} @@ -27,8 +27,7 @@ diff --git a/src/views/crm/product/index.vue b/src/views/crm/product/index.vue index 0f61b92e..10b9dbcf 100644 --- a/src/views/crm/product/index.vue +++ b/src/views/crm/product/index.vue @@ -133,7 +133,6 @@ import { dateFormatter } from '@/utils/formatTime' import download from '@/utils/download' import * as ProductApi from '@/api/crm/product' import ProductForm from './ProductForm.vue' -import { fenToYuanFormat } from '@/utils/formatter' import { erpPriceTableColumnFormatter } from '@/utils' defineOptions({ name: 'CrmProduct' })