From a9e4ef9b7b0d161f41211fdd5d3a12a33891d41a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 24 Feb 2024 09:50:35 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20CRM=EF=BC=9A=E5=AE=8C=E5=96=84=20CR?= =?UTF-8?q?M=20=E7=9B=B8=E5=85=B3=E5=AE=9E=E7=8E=B0=EF=BC=88=E4=BA=A7?= =?UTF-8?q?=E5=93=81=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{productCategory => category}/index.ts | 0 src/api/crm/product/index.ts | 8 +------- .../crm/business/components/BusinessList.vue | 9 +++++++-- .../business/components/BusinessListModal.vue | 4 ++-- .../crm/contract/components/ContractList.vue | 4 ++-- src/views/crm/contract/detail/index.vue | 3 +-- src/views/crm/contract/index.vue | 1 - src/views/crm/product/ProductForm.vue | 2 +- .../product/category/ProductCategoryForm.vue | 2 +- src/views/crm/product/category/index.vue | 2 +- .../product/detail/ProductDetailsHeader.vue | 19 +++++-------------- .../crm/product/detail/ProductDetailsInfo.vue | 17 +++++------------ src/views/crm/product/index.vue | 1 - 13 files changed, 26 insertions(+), 46 deletions(-) rename src/api/crm/product/{productCategory => category}/index.ts (100%) 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' })