From 37286cd9b177e9a1b8f28bfbc054c8cfedec6a5e Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期四, 26 八月 2021 08:50:57 +0800
Subject: [PATCH] Merge branch 'xgmasrs' of https://gitee.com/luxiaotao1123/zy-asrs into xgmasrs

---
 src/main/webapp/static/js/matOut/matOut.js |   39 +++++++++++----------------------------
 1 files changed, 11 insertions(+), 28 deletions(-)

diff --git a/src/main/webapp/static/js/matOut/matOut.js b/src/main/webapp/static/js/matOut/matOut.js
index c5be543..4680b8f 100644
--- a/src/main/webapp/static/js/matOut/matOut.js
+++ b/src/main/webapp/static/js/matOut/matOut.js
@@ -2,15 +2,19 @@
 var locDetlData = [];
 function getCol() {
     var cols = [
-         {fixed: 'left', field: 'count', title: '鏁伴噺(蹇呭~)', align: 'center', edit:'text', width: 120,  style:'color: blue;font-weight: bold'}
-        ,{field: 'billNo', title:'鍗曟嵁缂栧彿', align: 'center'}
+         // {fixed: 'left', field: 'count', title: '鏁伴噺(蹇呭~)', align: 'center', edit:'text', width: 120,  style:'color: blue;font-weight: bold'}
+         // ,
+         {field: 'billNo', title:'鍗曟嵁缂栧彿', align: 'center'}
         ,{field: 'seqNo', title:'搴忓彿', align: 'center', width:80}
         ,{field: 'qty', title:'閫氱煡鍑哄簱閲�', align: 'center'}
         ,{field: 'outQty', title:'宸插嚭搴撻噺', align: 'center'}
     ];
     arrRemove(detlCols,  'field', 'qty');
     cols.push.apply(cols, detlCols);
-    // cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:80})
+    cols.push(
+        {field: 'memo', title:'澶囨敞', align: 'center'},
+        {fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:120}
+    )
     return cols;
 }
 
@@ -36,7 +40,7 @@
 
     // 椤甸潰淇敼
     table.on('edit(chooseData)', function (obj) {
-        updateLocDetlData(obj.data.billNo, obj.data.seqNo, obj.data.matNo, Number(obj.value));
+        updateLocDetlData( obj.data.billNo, obj.data.seqNo, obj.data.matNo, obj.data.qty);
     });
 
     // 鐩戝惉澶村伐鍏锋爮浜嬩欢
@@ -52,10 +56,10 @@
                         layer.msg("璇烽�夋嫨鍑哄簱鍙�");
                         return;
                     }
-                    debugger
+
                     var locDetls = [];
                     data.forEach(function(elem) {
-                        locDetls.push({billNo:elem.billNo, seqNo:elem.seqNo, matNo: elem.matNo, count: elem.count});
+                        locDetls.push({billNo:elem.billNo,seqNo:elem.seqNo, matNo: elem.matNo, count: elem.count});
                     });
                     let param = {
                         outSite: staNo,
@@ -90,7 +94,7 @@
         switch (obj.event) {
             case 'remove':
                 for (var i = locDetlData.length - 1; i >= 0; i--) {
-                    if (locDetlData[i].billNo === data.billNo && locDetlData[i].seqNo === data.seqNo) {
+                    if (locDetlData[i].seqNo === data.seqNo && locDetlData[i].matNo === data.matNo) {
                         locDetlData.splice(i, 1);
                     }
                 }
@@ -99,27 +103,6 @@
         }
     });
 
-    function updateLocDetlData(billNo, seqNo, matNo, count) {
-        if (isNaN(count)) {
-            layer.msg("璇疯緭鍏ユ暟瀛�");
-        } else {
-            if (count > 0) {
-                for (var i=0;i<locDetlData.length;i++){
-                    if (locDetlData[i]["billNo"] === billNo && locDetlData[i]["seqNo"] === seqNo){
-                        if (count > locDetlData[i]["qty"]) {
-                            layer.msg("涓嶈兘瓒呰繃鍘熸暟閲�");
-                        } else {
-                            locDetlData[i]["count"] = count;
-                        }
-                        break;
-                    }
-                }
-            } else {
-                layer.msg("鏁伴噺蹇呴』澶т簬闆�");
-            }
-        }
-        tableIns.reload({data: locDetlData,done:function (res) {limit(); getOutBound();}});
-    }
 
     // 鑾峰彇鍑哄簱鍙�
     function getOutBound(){

--
Gitblit v1.9.1