diff --git a/src/main/resources/static/js/pda/transferWarehousingScanLabel.js b/src/main/resources/static/js/pda/transferWarehousingScanLabel.js index 4980463..0ef0328 100644 --- a/src/main/resources/static/js/pda/transferWarehousingScanLabel.js +++ b/src/main/resources/static/js/pda/transferWarehousingScanLabel.js @@ -156,8 +156,6 @@ function onloadTable(){ layer.msg("入库数量超出通知单数量") labelList.splice(i,1) continue - }else if (totalQty + currentData.finishedQty + row.qty < currentData.lotSize){ - layer.msg("入库数量少于通知单数量") } totalQty += row.qty domStr += ` @@ -210,6 +208,19 @@ function pageJump(){ layer.msg("扫描数量为0") return } + //睡眠标记 + let sleepFlag = false; + //校验数量 + let totalQty = 0; + for (let i = 0; i < labelList.length; i++) { + let row = labelList[i]; + totalQty += row.qty + } + if (totalQty + currentData.finishedQty < currentData.lotSize) { + layer.msg("入库数量少于通知单数量") + sleepFlag = true; + + } // currentData.scanList = [...labelList] currentData = JSON.stringify(currentData); localStorage.removeItem("scanList"); @@ -221,5 +232,12 @@ function pageJump(){ }*/ var menuId = $("#menuId").val(); var superiorName = $("#current_titleName").val(); - window.location.href = "/pda/transferWarehousing2?menuId=" + menuId + "&titleName=" + superiorName; + if (sleepFlag){ + setTimeout(function() { + window.location.href = "/pda/transferWarehousing2?menuId=" + menuId + "&titleName=" + superiorName; + }, 1200); // 1000毫秒=1秒 + }else{ + window.location.href = "/pda/transferWarehousing2?menuId=" + menuId + "&titleName=" + superiorName; + + } } \ No newline at end of file