From 26343635e4b25eb5e2969244fae7569fecde7efe Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 5 Feb 2024 19:24:26 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ERP=EF=BC=9A=E5=AE=8C=E6=88=90=20st?= =?UTF-8?q?ock=20=E4=BA=A7=E5=93=81=E5=BA=93=E5=AD=98=E3=80=81=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=98=8E=E7=BB=86=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/{ => product}/index.ts | 5 + src/api/erp/stock/stock/index.ts | 31 +++ src/api/erp/stock/stockRecord/index.ts | 32 +++ src/api/erp/stock/warehouse/index.ts | 5 + src/utils/dict.ts | 4 +- .../erp/product/{ => product}/ProductForm.vue | 2 +- src/views/erp/product/{ => product}/index.vue | 2 +- src/views/erp/product/unit/index.vue | 3 +- src/views/erp/stock/stock/index.vue | 176 +++++++++++++ src/views/erp/stock/stockRecord/index.vue | 231 ++++++++++++++++++ src/views/erp/stock/warehouse/index.vue | 3 +- 11 files changed, 486 insertions(+), 8 deletions(-) rename src/api/erp/product/{ => product}/index.ts (90%) create mode 100644 src/api/erp/stock/stock/index.ts create mode 100644 src/api/erp/stock/stockRecord/index.ts rename src/views/erp/product/{ => product}/ProductForm.vue (99%) rename src/views/erp/product/{ => product}/index.vue (98%) create mode 100644 src/views/erp/stock/stock/index.vue create mode 100644 src/views/erp/stock/stockRecord/index.vue diff --git a/src/api/erp/product/index.ts b/src/api/erp/product/product/index.ts similarity index 90% rename from src/api/erp/product/index.ts rename to src/api/erp/product/product/index.ts index e37e7712..226fc38c 100644 --- a/src/api/erp/product/index.ts +++ b/src/api/erp/product/product/index.ts @@ -24,6 +24,11 @@ export const ProductApi = { return await request.get({ url: `/erp/product/page`, params }) }, + // 查询产品精简列表 + getProductSimpleList: async (params: any) => { + return await request.get({ url: `/erp/product/simple-list`, params }) + }, + // 查询产品详情 getProduct: async (id: number) => { return await request.get({ url: `/erp/product/get?id=` + id }) diff --git a/src/api/erp/stock/stock/index.ts b/src/api/erp/stock/stock/index.ts new file mode 100644 index 00000000..2c5bf5ec --- /dev/null +++ b/src/api/erp/stock/stock/index.ts @@ -0,0 +1,31 @@ +import request from '@/config/axios' + +// ERP 产品库存 VO +export interface StockVO { + // 编号 + id: number + // 产品编号 + productId: number + // 仓库编号 + warehouseId: number + // 库存数量 + count: number +} + +// ERP 产品库存 API +export const StockApi = { + // 查询产品库存分页 + getStockPage: async (params: any) => { + return await request.get({ url: `/erp/stock/page`, params }) + }, + + // 查询产品库存详情 + getStock: async (id: number) => { + return await request.get({ url: `/erp/stock/get?id=` + id }) + }, + + // 导出产品库存 Excel + exportStock: async (params) => { + return await request.download({ url: `/erp/stock/export-excel`, params }) + } +} diff --git a/src/api/erp/stock/stockRecord/index.ts b/src/api/erp/stock/stockRecord/index.ts new file mode 100644 index 00000000..a758eb49 --- /dev/null +++ b/src/api/erp/stock/stockRecord/index.ts @@ -0,0 +1,32 @@ +import request from '@/config/axios' + +// ERP 产品库存明细 VO +export interface StockRecordVO { + id: number // 编号 + productId: number // 产品编号 + warehouseId: number // 仓库编号 + count: number // 出入库数量 + totalCount: number // 总库存量 + bizType: number // 业务类型 + bizId: number // 业务编号 + bizItemId: number // 业务项编号 + bizNo: string // 业务单号 +} + +// ERP 产品库存明细 API +export const StockRecordApi = { + // 查询产品库存明细分页 + getStockRecordPage: async (params: any) => { + return await request.get({ url: `/erp/stock-record/page`, params }) + }, + + // 查询产品库存明细详情 + getStockRecord: async (id: number) => { + return await request.get({ url: `/erp/stock-record/get?id=` + id }) + }, + + // 导出产品库存明细 Excel + exportStockRecord: async (params) => { + return await request.download({ url: `/erp/stock-record/export-excel`, params }) + } +} diff --git a/src/api/erp/stock/warehouse/index.ts b/src/api/erp/stock/warehouse/index.ts index 198d19af..0f493f8e 100644 --- a/src/api/erp/stock/warehouse/index.ts +++ b/src/api/erp/stock/warehouse/index.ts @@ -21,6 +21,11 @@ export const WarehouseApi = { return await request.get({ url: `/erp/warehouse/page`, params }) }, + // 查询仓库精简列表 + getWarehouseSimpleList: async (params: any) => { + return await request.get({ url: `/erp/warehouse/simple-list`, params }) + }, + // 查询仓库详情 getWarehouse: async (id: number) => { return await request.get({ url: `/erp/warehouse/get?id=` + id }) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 4c490f59..14c3d67e 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -205,6 +205,6 @@ export enum DICT_TYPE { CRM_PRODUCT_UNIT = 'crm_product_unit', // 产品单位 CRM_FOLLOW_UP_TYPE = 'crm_follow_up_type', // 跟进方式 - // ========== BI - 商业智能模块 ========== - BI_ANALYZE_TYPE = 'bi_analyze_type' // 分析类型 + // ========== ERP - 企业资源计划模块 ========== + ERP_STOCK_RECORD_BIZ_TYPE = 'erp_stock_record_biz_type' // 库存明细的业务类型 } diff --git a/src/views/erp/product/ProductForm.vue b/src/views/erp/product/product/ProductForm.vue similarity index 99% rename from src/views/erp/product/ProductForm.vue rename to src/views/erp/product/product/ProductForm.vue index b981c0dc..3f9de0ad 100644 --- a/src/views/erp/product/ProductForm.vue +++ b/src/views/erp/product/product/ProductForm.vue @@ -130,7 +130,7 @@ diff --git a/src/views/erp/stock/stockRecord/index.vue b/src/views/erp/stock/stockRecord/index.vue new file mode 100644 index 00000000..6b4c189f --- /dev/null +++ b/src/views/erp/stock/stockRecord/index.vue @@ -0,0 +1,231 @@ + + + + diff --git a/src/views/erp/stock/warehouse/index.vue b/src/views/erp/stock/warehouse/index.vue index 27a13a42..ebd87b3e 100644 --- a/src/views/erp/stock/warehouse/index.vue +++ b/src/views/erp/stock/warehouse/index.vue @@ -138,8 +138,7 @@ const { t } = useI18n() // 国际化 const loading = ref(true) // 列表的加载中 const list = ref([]) // 列表的数据 -// 列表的总页数 -const total = ref(0) +const total = ref(0) // 列表的总页数 const queryParams = reactive({ pageNo: 1, pageSize: 10,