diff --git a/src/api/erp/product/category/index.ts b/src/api/erp/product/category/index.ts new file mode 100644 index 00000000..945be207 --- /dev/null +++ b/src/api/erp/product/category/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +// ERP 商品分类 VO +export interface ProductCategoryVO { + // 分类编号 + id: number + // 父分类编号 + parentId: number + // 分类名称 + name: string + // 分类编码 + code: string + // 分类排序 + sort: number + // 开启状态 + status: number +} + +// ERP 商品分类 API +export const ProductCategoryApi = { + // 查询ERP 商品分类列表 + getProductCategoryList: async (params) => { + return await request.get({ url: `/erp/product-category/list`, params }) + }, + + // 查询ERP 商品分类详情 + 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 + 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 new file mode 100644 index 00000000..3729064c --- /dev/null +++ b/src/api/erp/product/index.ts @@ -0,0 +1,64 @@ +import request from '@/config/axios' + +// ERP 产品 VO +export interface ProductVO { + // 产品编号 + id: number + // 产品名称 + name: string + // 产品条码 + barCode: string + // 产品类型编号 + categoryId: number + // 单位编号 + unitId: number + // 产品状态 + status: number + // 产品规格 + standard: string + // 产品备注 + remark: string + // 保质期天数 + expiryDay: number + // 基础重量(kg) + weight: number + // 采购价格,单位:元 + purchasePrice: number + // 销售价格,单位:元 + salePrice: number + // 最低价格,单位:元 + minPrice: number +} + +// 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 + 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 new file mode 100644 index 00000000..6a6682e4 --- /dev/null +++ b/src/api/erp/product/unit/index.ts @@ -0,0 +1,44 @@ +import request from '@/config/axios' + +// ERP 产品单位 VO +export interface ProductUnitVO { + // 单位编号 + id: number + // 单位名字 + name: string + // 单位状态 + status: number +} + +// ERP 产品单位 API +export const ProductUnitApi = { + // 查询ERP 产品单位分页 + getProductUnitPage: async (params: any) => { + return await request.get({ url: `/erp/product-unit/page`, params }) + }, + + // 查询ERP 产品单位详情 + 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 + 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 new file mode 100644 index 00000000..08ff5cd9 --- /dev/null +++ b/src/views/erp/product/ProductForm.vue @@ -0,0 +1,154 @@ + + + diff --git a/src/views/erp/product/category/ProductCategoryForm.vue b/src/views/erp/product/category/ProductCategoryForm.vue new file mode 100644 index 00000000..ef4a003e --- /dev/null +++ b/src/views/erp/product/category/ProductCategoryForm.vue @@ -0,0 +1,145 @@ + + diff --git a/src/views/erp/product/category/index.vue b/src/views/erp/product/category/index.vue new file mode 100644 index 00000000..e3659ff6 --- /dev/null +++ b/src/views/erp/product/category/index.vue @@ -0,0 +1,220 @@ + + + diff --git a/src/views/erp/product/index.vue b/src/views/erp/product/index.vue new file mode 100644 index 00000000..ef7c7cae --- /dev/null +++ b/src/views/erp/product/index.vue @@ -0,0 +1,208 @@ + + + + diff --git a/src/views/erp/product/unit/ProductUnitForm.vue b/src/views/erp/product/unit/ProductUnitForm.vue new file mode 100644 index 00000000..65fe5701 --- /dev/null +++ b/src/views/erp/product/unit/ProductUnitForm.vue @@ -0,0 +1,100 @@ + + diff --git a/src/views/erp/product/unit/index.vue b/src/views/erp/product/unit/index.vue new file mode 100644 index 00000000..c574df7c --- /dev/null +++ b/src/views/erp/product/unit/index.vue @@ -0,0 +1,200 @@ + + +