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; + }); + } + } };