From ab63660bf87208c637f96a18d176edb526fa4d3f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 10 Feb 2024 00:07:00 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20ERP=EF=BC=9A=E5=A2=9E=E5=8A=A0=20ER?= =?UTF-8?q?P=20=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=2050%=EF=BC=88=E8=AF=A6=E6=83=85=EF=BC=89?= 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 | 5 + src/api/erp/stock/warehouse/index.ts | 4 +- src/views/erp/sale/order/SaleOrderForm.vue | 17 +-- .../order/components/SaleOrderItemForm.vue | 116 +++++++++--------- src/views/erp/sale/order/index.vue | 6 +- .../check/components/StockCheckItemForm.vue | 15 +-- .../stock/in/components/StockInItemForm.vue | 15 +-- .../move/components/StockMoveItemForm.vue | 15 +-- .../stock/out/components/StockOutItemForm.vue | 15 +-- 10 files changed, 94 insertions(+), 119 deletions(-) diff --git a/src/api/erp/product/product/index.ts b/src/api/erp/product/product/index.ts index 226fc38c..1136282f 100644 --- a/src/api/erp/product/product/index.ts +++ b/src/api/erp/product/product/index.ts @@ -7,6 +7,7 @@ export interface ProductVO { barCode: string // 产品条码 categoryId: number // 产品类型编号 unitId: number // 单位编号 + unitName?: string // 单位名字 status: number // 产品状态 standard: string // 产品规格 remark: string // 产品备注 @@ -25,8 +26,8 @@ export const ProductApi = { }, // 查询产品精简列表 - getProductSimpleList: async (params: any) => { - return await request.get({ url: `/erp/product/simple-list`, params }) + getProductSimpleList: async () => { + return await request.get({ url: `/erp/product/simple-list` }) }, // 查询产品详情 diff --git a/src/api/erp/stock/stock/index.ts b/src/api/erp/stock/stock/index.ts index 9296efa0..4de86fb1 100644 --- a/src/api/erp/stock/stock/index.ts +++ b/src/api/erp/stock/stock/index.ts @@ -29,6 +29,11 @@ export const StockApi = { return await request.get({ url: `/erp/stock/get`, params: { productId, warehouseId } }) }, + // 获得产品库存数量 + getStockCount: async (productId: number) => { + return await request.get({ url: `/erp/stock/get-count`, params: { productId } }) + }, + // 导出产品库存 Excel exportStock: async (params) => { return await request.download({ url: `/erp/stock/export-excel`, params }) diff --git a/src/api/erp/stock/warehouse/index.ts b/src/api/erp/stock/warehouse/index.ts index 0f493f8e..598824bf 100644 --- a/src/api/erp/stock/warehouse/index.ts +++ b/src/api/erp/stock/warehouse/index.ts @@ -22,8 +22,8 @@ export const WarehouseApi = { }, // 查询仓库精简列表 - getWarehouseSimpleList: async (params: any) => { - return await request.get({ url: `/erp/warehouse/simple-list`, params }) + getWarehouseSimpleList: async () => { + return await request.get({ url: `/erp/warehouse/simple-list` }) }, // 查询仓库详情 diff --git a/src/views/erp/sale/order/SaleOrderForm.vue b/src/views/erp/sale/order/SaleOrderForm.vue index a19b43d9..59bd3137 100644 --- a/src/views/erp/sale/order/SaleOrderForm.vue +++ b/src/views/erp/sale/order/SaleOrderForm.vue @@ -10,17 +10,17 @@ > - + - + @@ -62,7 +62,7 @@ - + @@ -80,7 +80,7 @@ import { SaleOrderApi, SaleOrderVO } from '@/api/erp/sale/order' import SaleOrderItemForm from './components/SaleOrderItemForm.vue' import { CustomerApi, CustomerVO } from '@/api/erp/sale/customer' -/** ERP 其它出库单表单 */ +/** ERP 销售订单表单 */ defineOptions({ name: 'SaleOrderForm' }) const { t } = useI18n() // 国际化 @@ -96,10 +96,11 @@ const formData = ref({ orderTime: undefined, remark: undefined, fileUrl: '', - items: [] + items: [], + no: undefined // 订单单号,后端返回 }) const formRules = reactive({ - orderTime: [{ required: true, message: '出库时间不能为空', trigger: 'blur' }] + orderTime: [{ required: true, message: '订单时间不能为空', trigger: 'blur' }] }) const disabled = computed(() => formType.value === 'detail') const formRef = ref() // 表单 Ref diff --git a/src/views/erp/sale/order/components/SaleOrderItemForm.vue b/src/views/erp/sale/order/components/SaleOrderItemForm.vue index 8ac8b1ee..1c388c70 100644 --- a/src/views/erp/sale/order/components/SaleOrderItemForm.vue +++ b/src/views/erp/sale/order/components/SaleOrderItemForm.vue @@ -10,29 +10,6 @@ > - - -