From 1c6659a0f946b15bea84bccb206fe11111ac211e Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 10 三月 2021 16:18:48 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/ioWorks/stockOut.js |   49 +++++++++++++++++++++++++++----------------------
 1 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/src/main/webapp/static/js/ioWorks/stockOut.js b/src/main/webapp/static/js/ioWorks/stockOut.js
index 5946e13..c75102a 100644
--- a/src/main/webapp/static/js/ioWorks/stockOut.js
+++ b/src/main/webapp/static/js/ioWorks/stockOut.js
@@ -2,13 +2,13 @@
 var locDetlData = [];
 function getCol() {
     var cols = [
-        // {field: 'count', align: 'center',title: '鍑哄簱鏁伴噺', edit:'text', width: 130,  style:'color: blue;font-weight: bold'}
-        {field: 'anfme', align: 'center',title: '鏁伴噺'}
-        ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
+        {field: 'count', align: 'center',title: '鍑哄簱鏁伴噺', edit:'text', width: 130,  style:'color: blue;font-weight: bold'}
+        ,{field: 'anfme', align: 'center',title: '鍘熸暟閲�'}
+        ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�'}
     ];
     arrRemove(detlCols,  'field', 'anfme');
     cols.push.apply(cols, detlCols);
-    // cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:80})
+    cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:80})
     return cols;
 }
 
@@ -28,7 +28,7 @@
         cols: [getCol()],
         done: function(res, curr, count) {
             limit();
-            getOutBound();
+            // getOutBound();
         }
     });
 
@@ -45,30 +45,29 @@
                 if (data.length === 0){
                     layer.msg('璇峰厛娣诲姞搴撲綅鐗╂枡');
                 } else {
-                    var staNo = $("#staNoSelect").val();
-                    if (staNo === "" || staNo === null){
-                        layer.msg("璇烽�夋嫨鍑哄簱鍙�");
-                        return;
-                    }
+                    // var staNo = $("#staNoSelect").val();
+                    // if (staNo === "" || staNo === null){
+                    //     layer.msg("璇烽�夋嫨鍑哄簱鍙�");
+                    //     return;
+                    // }
                     var locDetls = [];
                     data.forEach(function(elem) {
-                        locDetls.push({locNo: elem.locNo, matnr: elem.matnr, count: elem.count});
+                        locDetls.push({nodeId: elem.nodeId, matnr: elem.matnr, count: elem.count});
                     });
-                    let param = {
-                        outSite: staNo,
-                        locDetls: locDetls
-                    }
                     $.ajax({
-                        url: baseUrl+"/plate/out/start",
+                        url: baseUrl+"/work/pakout/init",
                         headers: {'token': localStorage.getItem('token')},
-                        data: JSON.stringify(param),
+                        data: JSON.stringify(locDetls),
                         contentType:'application/json;charset=UTF-8',
                         method: 'POST',
                         success: function (res) {
                             if (res.code === 200){
                                 locDetlData = [];
-                                tableIns.reload({data: locDetlData,done:function (res) {limit();getOutBound();}});
-                                layer.msg(res.msg);
+                                tableIns.reload({data: locDetlData,done:function (res) {
+                                    limit();
+                                    // getOutBound();
+                                }});
+                                layer.msg(res.msg, {icon: 1});
                             } else if (res.code === 403){
                                 top.location.href = baseUrl+"/";
                             } else {
@@ -91,7 +90,10 @@
                         locDetlData.splice(i, 1);
                     }
                 }
-                tableIns.reload({data: locDetlData,done:function (res) {limit();getOutBound();}});
+                tableIns.reload({data: locDetlData,done:function (res) {
+                    limit();
+                    // getOutBound();
+                }});
                 break;
         }
     });
@@ -115,7 +117,10 @@
                 layer.msg("鏁伴噺蹇呴』澶т簬闆�");
             }
         }
-        tableIns.reload({data: locDetlData,done:function (res) {limit(); getOutBound();}});
+        tableIns.reload({data: locDetlData,done:function (res) {
+            limit();
+            // getOutBound();
+        }});
     }
 
     // 鑾峰彇鍑哄簱鍙�
@@ -162,7 +167,7 @@
     for (var i=0;i<data.length;i++){
         let pass = false;
         for (var j=0;j<locDetlData.length;j++){
-            if (data[i].matnr === locDetlData[j].matnr && data[i].locNo$ === locDetlData[j].locNo$) {
+            if (data[i].matnr === locDetlData[j].matnr && data[i].locNo === locDetlData[j].locNo) {
                 pass = true;
                 break;
             }

--
Gitblit v1.9.1