From 36a033027734b8c69de1347b8803837135263677 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 5 Feb 2024 00:15:40 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ERP=EF=BC=9A=E5=AE=8C=E6=88=90=20pr?= =?UTF-8?q?oduct=20=E4=BF=A1=E6=81=AF=E3=80=81=E5=88=86=E7=B1=BB=E3=80=81?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/product/category/index.ts | 19 +- src/api/erp/product/index.ts | 14 +- src/api/erp/product/unit/index.ts | 19 +- src/views/erp/product/ProductForm.vue | 170 +++++++++++++----- src/views/erp/product/category/index.vue | 6 +- src/views/erp/product/index.vue | 54 +++--- .../erp/product/unit/ProductUnitForm.vue | 12 +- src/views/erp/product/unit/index.vue | 33 ++-- 8 files changed, 212 insertions(+), 115 deletions(-) diff --git a/src/api/erp/product/category/index.ts b/src/api/erp/product/category/index.ts index 945be207..c457be2d 100644 --- a/src/api/erp/product/category/index.ts +++ b/src/api/erp/product/category/index.ts @@ -18,33 +18,38 @@ export interface ProductCategoryVO { // ERP 商品分类 API export const ProductCategoryApi = { - // 查询ERP 商品分类列表 + // 查询商品分类列表 getProductCategoryList: async (params) => { return await request.get({ url: `/erp/product-category/list`, params }) }, - // 查询ERP 商品分类详情 + // 查询商品分类精简列表 + getProductCategorySimpleList: async () => { + return await request.get({ url: `/erp/product-category/simple-list` }) + }, + + // 查询商品分类详情 getProductCategory: async (id: number) => { return await request.get({ url: `/erp/product-category/get?id=` + id }) }, - // 新增ERP 商品分类 + // 新增商品分类 createProductCategory: async (data: ProductCategoryVO) => { return await request.post({ url: `/erp/product-category/create`, data }) }, - // 修改ERP 商品分类 + // 修改商品分类 updateProductCategory: async (data: ProductCategoryVO) => { return await request.put({ url: `/erp/product-category/update`, data }) }, - // 删除ERP 商品分类 + // 删除商品分类 deleteProductCategory: async (id: number) => { return await request.delete({ url: `/erp/product-category/delete?id=` + id }) }, - // 导出ERP 商品分类 Excel + // 导出商品分类 Excel exportProductCategory: async (params) => { return await request.download({ url: `/erp/product-category/export-excel`, params }) } -} \ No newline at end of file +} diff --git a/src/api/erp/product/index.ts b/src/api/erp/product/index.ts index 3729064c..bb50df71 100644 --- a/src/api/erp/product/index.ts +++ b/src/api/erp/product/index.ts @@ -32,33 +32,33 @@ export interface ProductVO { // ERP 产品 API export const ProductApi = { - // 查询ERP 产品分页 + // 查询产品分页 getProductPage: async (params: any) => { return await request.get({ url: `/erp/product/page`, params }) }, - // 查询ERP 产品详情 + // 查询产品详情 getProduct: async (id: number) => { return await request.get({ url: `/erp/product/get?id=` + id }) }, - // 新增ERP 产品 + // 新增产品 createProduct: async (data: ProductVO) => { return await request.post({ url: `/erp/product/create`, data }) }, - // 修改ERP 产品 + // 修改产品 updateProduct: async (data: ProductVO) => { return await request.put({ url: `/erp/product/update`, data }) }, - // 删除ERP 产品 + // 删除产品 deleteProduct: async (id: number) => { return await request.delete({ url: `/erp/product/delete?id=` + id }) }, - // 导出ERP 产品 Excel + // 导出产品 Excel exportProduct: async (params) => { return await request.download({ url: `/erp/product/export-excel`, params }) } -} \ No newline at end of file +} diff --git a/src/api/erp/product/unit/index.ts b/src/api/erp/product/unit/index.ts index 6a6682e4..e48b2792 100644 --- a/src/api/erp/product/unit/index.ts +++ b/src/api/erp/product/unit/index.ts @@ -12,33 +12,38 @@ export interface ProductUnitVO { // ERP 产品单位 API export const ProductUnitApi = { - // 查询ERP 产品单位分页 + // 查询产品单位分页 getProductUnitPage: async (params: any) => { return await request.get({ url: `/erp/product-unit/page`, params }) }, - // 查询ERP 产品单位详情 + // 查询商品单位精简列表 + getProductUnitSimpleList: async () => { + return await request.get({ url: `/erp/product-unit/simple-list` }) + }, + + // 查询产品单位详情 getProductUnit: async (id: number) => { return await request.get({ url: `/erp/product-unit/get?id=` + id }) }, - // 新增ERP 产品单位 + // 新增产品单位 createProductUnit: async (data: ProductUnitVO) => { return await request.post({ url: `/erp/product-unit/create`, data }) }, - // 修改ERP 产品单位 + // 修改产品单位 updateProductUnit: async (data: ProductUnitVO) => { return await request.put({ url: `/erp/product-unit/update`, data }) }, - // 删除ERP 产品单位 + // 删除产品单位 deleteProductUnit: async (id: number) => { return await request.delete({ url: `/erp/product-unit/delete?id=` + id }) }, - // 导出ERP 产品单位 Excel + // 导出产品单位 Excel exportProductUnit: async (params) => { return await request.download({ url: `/erp/product-unit/export-excel`, params }) } -} \ No newline at end of file +} diff --git a/src/views/erp/product/ProductForm.vue b/src/views/erp/product/ProductForm.vue index 08ff5cd9..b981c0dc 100644 --- a/src/views/erp/product/ProductForm.vue +++ b/src/views/erp/product/ProductForm.vue @@ -8,44 +8,120 @@ label-width="100px" v-loading="formLoading" > - - - - - - - - - - - - - - - 请选择字典生成 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ dict.label }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/erp/product/unit/ProductUnitForm.vue b/src/views/erp/product/unit/ProductUnitForm.vue index 65fe5701..ca14ff43 100644 --- a/src/views/erp/product/unit/ProductUnitForm.vue +++ b/src/views/erp/product/unit/ProductUnitForm.vue @@ -12,7 +12,13 @@ - 请选择字典生成 + + {{ dict.label }} + @@ -24,6 +30,8 @@