From 7ec625f960e125c3975d84bf113788fe97b9ff6b Mon Sep 17 00:00:00 2001
From: 王佳豪 <g675230687@126.com>
Date: 星期二, 22 六月 2021 14:11:20 +0800
Subject: [PATCH] 1.原材料出库扫单子默认显示平仓数量 2.平仓入库允许移除物料 3.平仓入库组托物料数量必须大于0

---
 src/main/webapp/views/pda/locNormalIn.html |   33 ++++++++++++++++++++++++++++-----
 1 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/src/main/webapp/views/pda/locNormalIn.html b/src/main/webapp/views/pda/locNormalIn.html
index e554323..f82101e 100644
--- a/src/main/webapp/views/pda/locNormalIn.html
+++ b/src/main/webapp/views/pda/locNormalIn.html
@@ -170,6 +170,7 @@
             <button onclick="add()">+</button>
         </div>
     </div>
+    <button id="remove" onclick="remove()">绉婚櫎</button>
     <button id="confirm" onclick="confirm()">淇濆瓨</button>
 </div>
 
@@ -273,12 +274,14 @@
         var count = $('#count').val();
         var mnemonic = $("#mnemonic").val() === '' ? null : $("#mnemonic").val();
         for (var j = 0; j < matData.length; j++) {
-            if (matNo === matData[j].matNo && mnemonic === matData[j].mnemonic) {
-                if (count > maxCount || count < minCount) {
-                    tips("鏁伴噺涓嶈兘瓒呰繃鑼冨洿", true);
-                    return;
+            if (mnemonic) {
+                if (matNo === matData[j].matNo && mnemonic === matData[j].mnemonic) {
+                    matData[j].count = Number(count);
                 }
-                matData[j].count = Number(count);
+            } else {
+                if (matNo === matData[j].matNo) {
+                    matData[j].count = Number(count);
+                }
             }
         }
         tableIns.reload({data: matData});
@@ -286,6 +289,26 @@
         tips("淇敼鎴愬姛");
     }
 
+    function remove() {
+        var matnr = $('#matNo').val();
+        var index = $('#index').val();
+        var mnemonic = $("#mnemonic").val() === '' ? null : $("#mnemonic").val();
+        for (var j = 0; j < matData.length; j++) {
+            if (mnemonic) {
+                if (matnr === matData[j].matNo && mnemonic === matData[j].mnemonic) {
+                    matData.splice(j, 1);
+                }
+            } else {
+                if (matnr === matData[j].matNo) {
+                    matData.splice(j, 1);
+                }
+            }
+        }
+        tableIns.reload({data: matData});
+        layer.close(countLayer);
+        tips("绉婚櫎鎴愬姛");
+    }
+
     window.onload = function () {
         document.getElementById("uuid").focus();
     }

--
Gitblit v1.9.1