From 882c84ea1bdd724b00f1281e906900756942ed15 Mon Sep 17 00:00:00 2001 From: xs Date: Wed, 23 Oct 2024 14:04:40 +0800 Subject: [PATCH] =?UTF-8?q?3.3.2=20WMS:=202&3=E6=A5=BC=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E6=B4=BE=E5=B7=A5=E6=8A=95=E6=96=99=E9=9C=80=E8=A6=81=E6=8C=89?= =?UTF-8?q?=E7=85=A7bom=E6=8A=95=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/controller/WmsRawOutstockController.java | 4 ++-- .../service/impl/WmsStockTotalServiceImpl.java | 2 +- .../resources/mapper/wms/WmsStockTotalMapper.xml | 2 +- .../src/views/mes/productplan/editProductPlan.vue | 15 ++++++++++++++- hw-ui/src/views/wms/common/applyRawOutstock.vue | 12 ++++++++---- 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsRawOutstockController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsRawOutstockController.java index 7ad583f..8398734 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsRawOutstockController.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsRawOutstockController.java @@ -160,7 +160,7 @@ public class WmsRawOutstockController extends BaseController /** * 根据工位查询查询仓库列表 */ - @RequiresPermissions("wms:rawoutstock:apply") +// @RequiresPermissions("wms:rawoutstock:apply") @GetMapping("/getWarehouses4Apply") public AjaxResult getWarehouses4Apply(WmsBaseWarehouse queryBaseWarehouse) { queryBaseWarehouse.setWarehouseInstockType(WmsConstants.WMS_WAREHOUSE_INSTOCK_TYPE_RAW); @@ -172,7 +172,7 @@ public class WmsRawOutstockController extends BaseController /** * 获取物料库存信息 */ - @RequiresPermissions("wms:rawoutstock:apply") +// @RequiresPermissions("wms:rawoutstock:apply") @GetMapping("/getStockTotal") public TableDataInfo getStockTotal(WmsStockTotal queryStockTotal) { startPage(); diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsStockTotalServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsStockTotalServiceImpl.java index 9dde376..de01296 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsStockTotalServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsStockTotalServiceImpl.java @@ -159,7 +159,7 @@ public class WmsStockTotalServiceImpl implements IWmsStockTotalService { wmsStockTotal.setMaterialId(wmsStockTotal.getProductId()); wmsStockTotal.setAccessoriesFlag(null); } else { - if (wmsStockTotal.getAccessoriesFlag().equals(MesConstants.MES_MATERIAL_ACCESSORIES_FLAG_NO)) { + if (StringUtils.isEmpty(wmsStockTotal.getAccessoriesFlag()) || wmsStockTotal.getAccessoriesFlag().equals(MesConstants.MES_MATERIAL_ACCESSORIES_FLAG_NO)) { wmsStockTotal.setAncestors("0," + wmsStockTotal.getMaterialBomId()); wmsStockTotal.setAccessoriesFlag(null); } diff --git a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsStockTotalMapper.xml b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsStockTotalMapper.xml index e6fd72d..4de6b75 100644 --- a/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsStockTotalMapper.xml +++ b/hw-modules/hw-wms/src/main/resources/mapper/wms/WmsStockTotalMapper.xml @@ -172,7 +172,7 @@ wst.total_amount, wst.frozen_amount, wst.occupy_amount,wst.safe_flag,wst.sale_order_id, mbmi.material_code,mbmi.material_name,mbmi.material_spec, (select sum(wro.outstock_amount) from wms_raw_outstock wro where wro.stock_total_id=wst.stock_total_id and - wro.plan_code=#{planCode} and wro.plan_detail_code=#{planDetailCode} and wro.audit_status!='2') outstock_amount + wro.plan_code=#{planCode} and wro.plan_detail_code=#{planDetailCode} and wro.audit_status!='2' and wro.execute_status!='2') outstock_amount from wms_stock_total wst left join mes_base_material_info mbmi on wst.material_id = mbmi.material_id diff --git a/hw-ui/src/views/mes/productplan/editProductPlan.vue b/hw-ui/src/views/mes/productplan/editProductPlan.vue index fdccd76..f2b3e16 100644 --- a/hw-ui/src/views/mes/productplan/editProductPlan.vue +++ b/hw-ui/src/views/mes/productplan/editProductPlan.vue @@ -425,6 +425,11 @@ export default { components: { 'apply-raw-outstock': applyRawOutstock, }, + provide() { + return { + closeRawOutstockDialog: this.closeRawOutstockDialog, + } + }, props: { value: [String, Object, Array, Number], // sop文件数量限制 @@ -1408,10 +1413,18 @@ export default { this.productPlanData.planId = row.planId; this.productPlanData.dispatchAmount = row.dispatchAmount; this.productPlanData.saleOrderId = this.form.saleOrderId; + this.productPlanData.materialBomId = this.form.materialBomId; } - } + }, + + closeRawOutstockDialog() { + this.applyRawOutstockOpen = false; + }, + }, + + mounted() { } } diff --git a/hw-ui/src/views/wms/common/applyRawOutstock.vue b/hw-ui/src/views/wms/common/applyRawOutstock.vue index b76edd9..4c23929 100644 --- a/hw-ui/src/views/wms/common/applyRawOutstock.vue +++ b/hw-ui/src/views/wms/common/applyRawOutstock.vue @@ -98,6 +98,7 @@
申请投料 + 关闭
@@ -115,6 +116,7 @@ export default { } }, dicts: ['mes_safe_flag'], + inject: ['closeRawOutstockDialog'], data() { return { // 遮罩层 @@ -177,7 +179,8 @@ export default { planId: this.defineData.planId, planCode: this.defineData.planCode, dispatchAmount : this.defineData.dispatchAmount, - saleOrderId:this.defineData.saleOrderId + saleOrderId:this.defineData.saleOrderId, + materialBomId:this.defineData.materialBomId } } }, @@ -201,6 +204,7 @@ export default { this.queryParams.warehouseId = this.form.warehouseId; this.queryParams.saleOrderId = this.form.saleOrderId; this.queryParams.planCode = this.form.planCode; + this.queryParams.materialBomId = this.form.materialBomId; this.queryParams.planDetailCode = "0"; getStockTotal(this.queryParams).then(e => { this.total = e.total; @@ -276,13 +280,13 @@ export default { this.form.taskType = "1";//生产领料 this.form.planDetailCode = "0"; applyRawOutstock(this.form).then(e => { - this.dialogVisible = false this.$modal.msgSuccess("申请投料成功"); + this.closeParentDialog() }) }, - closeDialog(){ - + closeParentDialog() { + this.closeRawOutstockDialog() } }