From a249a7f2074100d58cc5b9afc73b4da680d87fcd Mon Sep 17 00:00:00 2001 From: xs Date: Fri, 18 Oct 2024 17:32:07 +0800 Subject: [PATCH] =?UTF-8?q?3.2.5=20=E6=88=90=E5=93=81=E5=BA=93=E5=AD=98?= =?UTF-8?q?=EF=BC=9A=E8=99=9A=E6=8B=9F=E7=89=A9=E6=96=99=E5=8F=AF=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E7=89=A9=E6=96=99=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=9B=E8=BD=AC=E5=BA=93=E5=AD=98=E5=A2=9E=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E7=89=A9=E6=96=99=E6=98=AF=E5=90=A6=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MesBaseMaterialInfoController.java | 13 ++++++ .../mapper/mes/MesBaseMaterialInfoMapper.xml | 1 + .../controller/WmsStockTotalController.java | 2 +- hw-ui/src/api/wms/stocktotal.js | 10 ++++ hw-ui/src/views/mes/barcode/index.vue | 2 +- .../views/mes/saleOrder/selectSaleOrder.vue | 7 ++- hw-ui/src/views/wms/info/stocktotal/index.vue | 46 ++++++++++++++++++- 7 files changed, 76 insertions(+), 5 deletions(-) diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseMaterialInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseMaterialInfoController.java index 5893156..d61b226 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseMaterialInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseMaterialInfoController.java @@ -144,4 +144,17 @@ public class MesBaseMaterialInfoController extends BaseController return success(mesBaseMaterialInfoService.selectMesBaseMaterialInfoByMaterialId(materialId)); } + + + /** + * 查询物料信息列表 + */ + @RequiresPermissions("wms:stocktotal:list") + @GetMapping("/selectMaterialInfosByVirtualMaterialId") + public TableDataInfo selectMaterialInfosByVirtualMaterialId(MesBaseMaterialInfo mesBaseMaterialInfo) + { + List list = mesBaseMaterialInfoService.selectMesBaseMaterialInfoList(mesBaseMaterialInfo); + return getDataTable(list); + } + } diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml index 6ec9687..2e897d1 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseMaterialInfoMapper.xml @@ -94,6 +94,7 @@ resultMap="MesBaseMaterialInfoResult"> + and exists (select 1 from mes_sale_order_relate msor where msor.virtual_material_id=#{materialId} and msor.material_id=bmi.material_id) and bmi.erp_id = #{erpId} and bmi.material_code like concat('%', #{materialCode},'%') and bmi.old_material_code = #{oldMaterialCode} diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsStockTotalController.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsStockTotalController.java index 3a2b358..992c2d8 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsStockTotalController.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/controller/WmsStockTotalController.java @@ -161,7 +161,7 @@ public class WmsStockTotalController extends BaseController * 成品总库存转销售订单(或将有销售订单的转安全库存) */ @RequiresPermissions("wms:stocktotal:transferProduct") - @Log(title = "原材料库存", businessType = BusinessType.TRANSFER) + @Log(title = "成品库存", businessType = BusinessType.TRANSFER) @PostMapping("/transferProductStockTotal") public AjaxResult transferProductStockTotal(@RequestBody WmsStockTotalTransferVo wmsStockTotalTransferVo) { diff --git a/hw-ui/src/api/wms/stocktotal.js b/hw-ui/src/api/wms/stocktotal.js index bdc35eb..f8b7687 100644 --- a/hw-ui/src/api/wms/stocktotal.js +++ b/hw-ui/src/api/wms/stocktotal.js @@ -89,3 +89,13 @@ export function transferProductStockTotal(data) { data: data }) } + + +// 根据合并的虚拟物料ID获取实际物料信息列表 +export function selectMaterialInfosByVirtualMaterialId(params) { + return request({ + url: '/mes/materialinfo/selectMaterialInfosByVirtualMaterialId', + method: 'get', + params: params + }) +} diff --git a/hw-ui/src/views/mes/barcode/index.vue b/hw-ui/src/views/mes/barcode/index.vue index ac408af..a248d29 100644 --- a/hw-ui/src/views/mes/barcode/index.vue +++ b/hw-ui/src/views/mes/barcode/index.vue @@ -10,7 +10,7 @@ /> - 转库存 + + 物料明细 + + @@ -286,6 +297,20 @@ + + + + + + + + + + + + + + @@ -297,9 +322,10 @@ import { listProductstock, transferRaw, transferRawStockTotal, - transferProductStockTotal + transferProductStockTotal, + selectMaterialInfosByVirtualMaterialId } from "@/api/wms/stocktotal"; -import {addWmslocation, getWarehouses, updateWmslocation} from "@//api/wms/wmslocation"; +import {getWarehouses,} from "@//api/wms/wmslocation"; import selectSaleOrder from '@//views/mes/saleOrder/selectSaleOrder.vue'; export default { @@ -416,6 +442,9 @@ export default { }, selectSaleOrderVisible: false, + + materialListOpen : false, + materialList:[] }; }, watch: { @@ -608,6 +637,7 @@ export default { // 库位库存明细信息多选框选中数据 handleRawStockSelectionChange(selection) { + return; let index = 0; selection.forEach(row => { index = this.rawstockList.indexOf(row); @@ -633,6 +663,10 @@ export default { /** 提交选择销售订单按钮 */ submitSelectSaleOrderForm() { let selectedRow = this.$refs.selectSaleOrderRef.selectedRow; + if(selectedRow.materialId!==this.form.materialId){ + this.$modal.msgWarning("请选择相同物料的销售订单"); + return; + } this.$set(this.form, "saleorderCode", selectedRow.saleorderCode); this.$set(this.form, "saleOrderId", selectedRow.saleOrderId); this.selectSaleOrderVisible = false; @@ -693,11 +727,19 @@ export default { this.transferType = "1"; this.form.index = (this.stocktotalList.findIndex(item => item.stockTotalId === row.stockTotalId)) + 1; this.form.stockTotalId = row.stockTotalId; + this.form.materialId = row.materialId; this.rawStockInfosStr = "序号:" + this.form.index + " 物料编码:" + row.materialCode + " 物料名称:" + row.materialName + " 物料规格:" + row.materialSpec + " 可转数量:" + (row.totalAmount - (row.occupyAmount ? row.occupyAmount : 0)) + " 销售订单:" + (row.saleorderCode ? row.saleorderCode : "无"); this.open = true; }, + handleViewMaterialInfos(row){ + this.materialListOpen = true; + selectMaterialInfosByVirtualMaterialId({materialId:row.materialId}).then(response => { + this.materialList = response.rows; + }); + } + } };