From 5fb1097b14073ce7966ce3629c835ca8b7440f6a Mon Sep 17 00:00:00 2001 From: xins Date: Fri, 12 Apr 2024 17:10:56 +0800 Subject: [PATCH] =?UTF-8?q?2.1.0=20=E8=BD=A6=E9=97=B4=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=EF=BC=9A=E4=BA=94=E6=A5=BC=E8=A3=85=E9=85=8D=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=A2=86=E8=BE=85=E6=96=99=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WmsRawOutstockServiceImpl.java | 18 ++-- hw-ui/src/views/board/fifthFloor/index.vue | 94 +++++++++++-------- 2 files changed, 69 insertions(+), 43 deletions(-) diff --git a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java index cd306f60..4db49e48 100644 --- a/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java +++ b/hw-modules/hw-wms/src/main/java/com/hw/wms/service/impl/WmsRawOutstockServiceImpl.java @@ -471,6 +471,13 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { @Transactional(rollbackFor = Exception.class) @Override public int applyRawOutstock(WmsRawOutstock wmsRawOutstock) { + String planCode = wmsRawOutstock.getPlanCode(); + String planDetailCode = wmsRawOutstock.getPlanDetailCode(); + + if (StringUtils.isEmpty(planCode)) { + throw new ServiceException("请选择生产详细信息再领料"); + } + Long warehouseId = wmsRawOutstock.getWarehouseId(); List rawOutstockDetails = wmsRawOutstock.getWmsRawOutstockDetailList(); //根据物料ID分组获取总申请数量 @@ -484,8 +491,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { String warehouseType = baseWarehouse.getWarehouseType(); String queryQualityStatus = WmsConstants.WMS_QUALITY_STATUS_PASS; - String planCode = wmsRawOutstock.getPlanCode(); - String planDetailCode = wmsRawOutstock.getPlanDetailCode(); + List toInsertedRawOutstocks = new ArrayList<>(); Date currentDate = new Date(); @@ -526,7 +532,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { wmsRawStockMapper.updateWmsRawStock(wmsRawStock); //原材料出库记录(有break,以下方法需要写在此处) - WmsRawOutstock toInsertedRawOutstock = getWmsRawOutstock(wmsRawStock, baseWarehouse, planCode, planDetailCode, materialId, taskCode,taskType, + WmsRawOutstock toInsertedRawOutstock = getWmsRawOutstock(wmsRawStock, baseWarehouse, planCode, planDetailCode, materialId, taskCode, taskType, planAmount, currentDate, userName); toInsertedRawOutstocks.add(toInsertedRawOutstock); @@ -540,7 +546,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { wmsRawStockMapper.updateWmsRawStock(wmsRawStock); //原材料出库记录(有break,以下方法需要写在此处) - WmsRawOutstock toInsertedRawOutstock = getWmsRawOutstock(wmsRawStock, baseWarehouse, planCode, planDetailCode, materialId, taskCode,taskType, + WmsRawOutstock toInsertedRawOutstock = getWmsRawOutstock(wmsRawStock, baseWarehouse, planCode, planDetailCode, materialId, taskCode, taskType, planAmount, currentDate, userName); toInsertedRawOutstocks.add(toInsertedRawOutstock); @@ -555,7 +561,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { wmsRawStockMapper.updateWmsRawStock(wmsRawStock); //原材料出库记录(有break,以下方法需要写在此处) - WmsRawOutstock toInsertedRawOutstock = getWmsRawOutstock(wmsRawStock, baseWarehouse, planCode, planDetailCode, materialId, taskCode,taskType, + WmsRawOutstock toInsertedRawOutstock = getWmsRawOutstock(wmsRawStock, baseWarehouse, planCode, planDetailCode, materialId, taskCode, taskType, planAmount, currentDate, userName); toInsertedRawOutstocks.add(toInsertedRawOutstock); @@ -594,7 +600,7 @@ public class WmsRawOutstockServiceImpl implements IWmsRawOutstockService { * @return */ private WmsRawOutstock getWmsRawOutstock(WmsRawStock wmsRawStock, WmsBaseWarehouse baseWarehouse, - String planCode, String planDetailCode, Long materialId, String taskCode,String taskType, + String planCode, String planDetailCode, Long materialId, String taskCode, String taskType, BigDecimal planAmount, Date currentDate, String userName) { //出库要求 (0申请出库,1申请审核出库,2直接出库) String outRequirement = baseWarehouse.getOutRequirement(); diff --git a/hw-ui/src/views/board/fifthFloor/index.vue b/hw-ui/src/views/board/fifthFloor/index.vue index 873a0b46..f4212b0c 100644 --- a/hw-ui/src/views/board/fifthFloor/index.vue +++ b/hw-ui/src/views/board/fifthFloor/index.vue @@ -25,10 +25,16 @@
- 领柜体 - 绑定 - 返库 - 完成 + 领料 + + + 领柜体 + + 绑定 + + 返库 + + 完成 - {{i.stationName}} + + {{ i.stationName }} + @@ -203,7 +211,7 @@ @@ -212,13 +220,13 @@ - - + + - + @@ -258,7 +266,7 @@ @@ -293,8 +301,6 @@ - - { @@ -751,7 +760,6 @@ export default { }, - getInfo(e) { this.$refs.chart1_1.setData({ series: [ @@ -1109,7 +1117,19 @@ export default { }, // 领柜体页面 - getMaterials() { + getMaterials(returnFlag) { + if (returnFlag == '1') { + this.applyMaterialTitle = "领柜体"; + this.planAmount = 1; + this.planAmountDisabled = true; + this.taskType = '2';//拆分出库 + } else { + this.applyMaterialTitle = "领料"; + this.planAmount = null; + this.planAmountDisabled = false; + this.taskType='1';//生产领料 + } + this.searchMaterialValue = '' this.dialogVisible = true this.form1 = { @@ -1122,18 +1142,18 @@ export default { wmsRawOutstockDetailList: [] } // 获取仓库信息 - getWarehouses({"warehouseFloor": 5,"returnFlag":1}).then(e => { + getWarehouses({"warehouseFloor": 5, "returnFlag": returnFlag}).then(e => { this.warehouseList = e.data this.form1.warehouseId = e.data[0]?.warehouseId - this.searchMaterial(""); + this.searchMaterial(); }) }, // 物料搜索 searchMaterial(val) { - if(this.form1.warehouseId==null || this.form1.warehouseId == undefined - || this.form1.warehouseId==""){ + if (this.form1.warehouseId == null || this.form1.warehouseId == undefined + || this.form1.warehouseId == "") { return; } getStockTotal({ @@ -1147,7 +1167,7 @@ export default { materialName: r.materialName, availableAmount: r.totalAmount - r.occupyAmount - r.frozenAmount, unavailableAmount: r.occupyAmount + r.frozenAmount, - planAmount: 1 + planAmount: this.planAmount } }) }) @@ -1161,7 +1181,7 @@ export default { }, receiveMaterial() { - this.form1.taskType = '2';//拆分出库 + this.form1.taskType = this.taskType; applyRawOutstock(this.form1).then(e => { if (e.code === 200) { this.dialogVisible = false @@ -1199,7 +1219,7 @@ export default { this.bindBarcodeVisible = true; }, - submitBindBarcode(){ + submitBindBarcode() { this.$refs["bindBarcodeForm"].validate(valid => { if (valid) { bindBarcode(this.bindBarcodeForm).then(response => { @@ -1210,7 +1230,7 @@ export default { }); }, - cancelBindBarcode(){ + cancelBindBarcode() { this.bindBarcodeVisible = false; this.resetBindBarcode(); }, @@ -1220,7 +1240,7 @@ export default { resetRawBack() { this.rawBackForm = { materialBarcode: null, - warehouseId:null + warehouseId: null }; this.resetForm("rawBackForm"); }, @@ -1229,12 +1249,12 @@ export default { handleRawBack(scope) { this.resetRawBack(); // 获取仓库信息 - if(this.warehouseList==null || this.warehouseList.length==0){ - getWarehouses({"warehouseFloor": 5,"returnFlag":1}).then(e => { + if (this.warehouseList == null || this.warehouseList.length == 0) { + getWarehouses({"warehouseFloor": 5, "returnFlag": 1}).then(e => { this.warehouseList = e.data this.rawBackForm.warehouseId = this.warehouseList[0]?.warehouseId }) - }else{ + } else { this.rawBackForm.warehouseId = this.warehouseList[0]?.warehouseId } @@ -1242,7 +1262,7 @@ export default { }, - submitRawBack(){ + submitRawBack() { this.$refs["rawBackForm"].validate(valid => { if (valid) { applyRawBack(this.rawBackForm).then(response => { @@ -1253,7 +1273,7 @@ export default { }); }, - cancelRawBack(){ + cancelRawBack() { this.rawBackVisible = false; this.resetRawBack(); }