From 7e3693d18c95e9ee8ae0a3e1e74531f0d5a6fddb Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 30 Mar 2026 20:35:23 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(mes):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E8=AE=B0=E5=BD=95ID=E5=92=8C=E6=94=B6?= =?UTF-8?q?=E8=B4=A7=E5=9C=B0=E5=9D=80=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在销售出库相关的多个数据对象中新增库存记录ID和收货地址字段,以支持更全面的出库信息管理。这些字段将帮助在出库单中更好地追踪库存和收货信息,提高系统的可用性和用户体验。 --- src/views/mes/utils/constants.ts | 3 +- .../productsales/ProductSalesDetailForm.vue | 22 ++++ .../mes/wm/productsales/ProductSalesForm.vue | 34 ++++-- .../wm/productsales/ProductSalesLineList.vue | 27 ++++- src/views/mes/wm/productsales/index.vue | 11 +- .../components/WmSalesNoticeLineSelect.vue | 100 ++++++++++++++++++ 6 files changed, 185 insertions(+), 12 deletions(-) create mode 100644 src/views/mes/wm/salesnotice/components/WmSalesNoticeLineSelect.vue diff --git a/src/views/mes/utils/constants.ts b/src/views/mes/utils/constants.ts index c70c65827..93c645820 100644 --- a/src/views/mes/utils/constants.ts +++ b/src/views/mes/utils/constants.ts @@ -437,7 +437,8 @@ export const MesAutoCodeRuleCode = { QC_RQC_CODE: 'QC_RQC_CODE', // 退货检验单编码 WM_WAREHOUSE_CODE: 'WM_WAREHOUSE_CODE', // 仓库编码 WM_LOCATION_CODE: 'WM_LOCATION_CODE', // 库区编码 - WM_AREA_CODE: 'WM_AREA_CODE' // 库位编码 + WM_AREA_CODE: 'WM_AREA_CODE', // 库位编码 + WM_PRODUCT_SALES_CODE: 'WM_PRODUCT_SALES_CODE' // 销售出库单编码 } as const /** 获取物料/产品标识的标签 */ diff --git a/src/views/mes/wm/productsales/ProductSalesDetailForm.vue b/src/views/mes/wm/productsales/ProductSalesDetailForm.vue index 0a2079398..c391598c4 100644 --- a/src/views/mes/wm/productsales/ProductSalesDetailForm.vue +++ b/src/views/mes/wm/productsales/ProductSalesDetailForm.vue @@ -11,6 +11,13 @@ + + + @@ -54,6 +61,7 @@ import WmWarehouseSelect from '@/views/mes/wm/warehouse/components/WmWarehouseSe import WmWarehouseLocationSelect from '@/views/mes/wm/warehouse/components/WmWarehouseLocationSelect.vue' import WmWarehouseAreaSelect from '@/views/mes/wm/warehouse/components/WmWarehouseAreaSelect.vue' import WmBatchSelect from '@/views/mes/wm/batch/components/WmBatchSelect.vue' +import WmMaterialStockSelect from '@/views/mes/wm/materialstock/components/WmMaterialStockSelect.vue' defineOptions({ name: 'ProductSalesDetailForm' }) @@ -78,6 +86,7 @@ const formData = ref({ salesId: undefined as number | undefined, itemId: undefined as number | undefined, quantity: undefined as number | undefined, + materialStockId: undefined as number | undefined, warehouseId: undefined as number | undefined, locationId: undefined as number | undefined, areaId: undefined as number | undefined, @@ -118,6 +127,18 @@ const handleBatchChange = (batch: any) => { formData.value.batchCode = batch?.code } +/** 库存选中回调,自动填充仓库/库区/库位/批次 */ +// TODO @AI:参考下别的模块 handleStockChange;有不同的逻辑;对齐下; +const handleStockChange = (stock: any) => { + if (stock) { + formData.value.warehouseId = stock.warehouseId + formData.value.locationId = stock.locationId + formData.value.areaId = stock.areaId + formData.value.batchId = stock.batchId + formData.value.batchCode = stock.batchCode + } +} + /** 提交表单 */ const submitForm = async () => { // 校验表单 @@ -153,6 +174,7 @@ const resetForm = () => { salesId: undefined, itemId: undefined, quantity: undefined, + materialStockId: undefined, warehouseId: undefined, locationId: undefined, areaId: undefined, diff --git a/src/views/mes/wm/productsales/ProductSalesForm.vue b/src/views/mes/wm/productsales/ProductSalesForm.vue index 4dcdc5d42..5e06459a6 100644 --- a/src/views/mes/wm/productsales/ProductSalesForm.vue +++ b/src/views/mes/wm/productsales/ProductSalesForm.vue @@ -16,9 +16,7 @@ :disabled="isHeaderReadonly" > @@ -32,6 +30,7 @@ /> + @@ -39,8 +38,6 @@ - - + + + + + @@ -100,6 +106,7 @@ + 运输信息 @@ -125,7 +132,11 @@