diff --git a/src/api/crm/product/index.ts b/src/api/crm/product/index.ts new file mode 100644 index 00000000..cb1ddcda --- /dev/null +++ b/src/api/crm/product/index.ts @@ -0,0 +1,43 @@ +import request from '@/config/axios' + +export interface ProductVO { + id: number + name: string + no: string + unit: string + price: number + status: number + categoryId: number + description: string + ownerUserId: number +} + +// 查询产品列表 +export const getProductPage = async (params) => { + return await request.get({ url: `/crm/product/page`, params }) +} + +// 查询产品详情 +export const getProduct = async (id: number) => { + return await request.get({ url: `/crm/product/get?id=` + id }) +} + +// 新增产品 +export const createProduct = async (data: ProductVO) => { + return await request.post({ url: `/crm/product/create`, data }) +} + +// 修改产品 +export const updateProduct = async (data: ProductVO) => { + return await request.put({ url: `/crm/product/update`, data }) +} + +// 删除产品 +export const deleteProduct = async (id: number) => { + return await request.delete({ url: `/crm/product/delete?id=` + id }) +} + +// 导出产品 Excel +export const exportProduct = async (params) => { + return await request.download({ url: `/crm/product/export-excel`, params }) +} diff --git a/src/api/crm/productCategory/index.ts b/src/api/crm/productCategory/index.ts new file mode 100644 index 00000000..cdf8a966 --- /dev/null +++ b/src/api/crm/productCategory/index.ts @@ -0,0 +1,32 @@ +import request from '@/config/axios' + +export interface ProductCategoryVO { + id: number + name: string + parentId: number +} + +// 查询产品分类详情 +export const getProductCategory = async (id: number) => { + return await request.get({ url: `/crm/product-category/get?id=` + id }) +} + +// 新增产品分类 +export const createProductCategory = async (data: ProductCategoryVO) => { + return await request.post({ url: `/crm/product-category/create`, data }) +} + +// 修改产品分类 +export const updateProductCategory = async (data: ProductCategoryVO) => { + return await request.put({ url: `/crm/product-category/update`, data }) +} + +// 删除产品分类 +export const deleteProductCategory = async (id: number) => { + return await request.delete({ url: `/crm/product-category/delete?id=` + id }) +} + +// 产品分类列表 +export const getProductCategoryList = async (params) => { + return await request.get({ url: `/crm/product-category/list`, params }) +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 05d710c0..9fe429e9 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -194,5 +194,6 @@ export enum DICT_TYPE { CRM_RETURN_TYPE = 'crm_return_type', CRM_CUSTOMER_INDUSTRY = 'crm_customer_industry', CRM_CUSTOMER_LEVEL = 'crm_customer_level', - CRM_CUSTOMER_SOURCE = 'crm_customer_source' + CRM_CUSTOMER_SOURCE = 'crm_customer_source', + CRM_PRODUCT_STATUS = 'crm_product_status' } diff --git a/src/views/crm/product/ProductDetail.vue b/src/views/crm/product/ProductDetail.vue new file mode 100644 index 00000000..f14e571a --- /dev/null +++ b/src/views/crm/product/ProductDetail.vue @@ -0,0 +1,70 @@ + + diff --git a/src/views/crm/product/ProductForm.vue b/src/views/crm/product/ProductForm.vue new file mode 100644 index 00000000..78d2a7c1 --- /dev/null +++ b/src/views/crm/product/ProductForm.vue @@ -0,0 +1,184 @@ + + diff --git a/src/views/crm/product/index.vue b/src/views/crm/product/index.vue new file mode 100644 index 00000000..122f964d --- /dev/null +++ b/src/views/crm/product/index.vue @@ -0,0 +1,269 @@ + + + diff --git a/src/views/crm/productCategory/ProductCategoryForm.vue b/src/views/crm/productCategory/ProductCategoryForm.vue new file mode 100644 index 00000000..22cd09a8 --- /dev/null +++ b/src/views/crm/productCategory/ProductCategoryForm.vue @@ -0,0 +1,110 @@ + + diff --git a/src/views/crm/productCategory/index.vue b/src/views/crm/productCategory/index.vue new file mode 100644 index 00000000..3cf7c5f0 --- /dev/null +++ b/src/views/crm/productCategory/index.vue @@ -0,0 +1,137 @@ + + +