From d0fa6b5d514110de8bcc672a08813151efa94fb6 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期二, 05 九月 2023 15:28:37 +0800
Subject: [PATCH] #拣货单

---
 src/main/webapp/static/js/picking/picking.js |   44 ++++++++++++++++++++++++++++++++++++++------
 1 files changed, 38 insertions(+), 6 deletions(-)

diff --git a/src/main/webapp/static/js/picking/picking.js b/src/main/webapp/static/js/picking/picking.js
index 553fb28..9d3afee 100644
--- a/src/main/webapp/static/js/picking/picking.js
+++ b/src/main/webapp/static/js/picking/picking.js
@@ -1,6 +1,7 @@
 var pageCurr;
 var printMatCodeNos = [];
 var ordernoo = "123";
+var insTbCount = 0;
 layui.config({
     base: baseUrl + "/static/layui/lay/modules/"
 }).use(['table','laydate', 'form', 'admin', 'layer'], function(){
@@ -30,8 +31,6 @@
             ,{align: 'center', title: '浜岀淮鐮�', toolbar: '#operate', width: 200 , hide:true}
             ,{align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 160, width: 160}
             ,{field: 'status$', align: 'center',title: '鐘舵��'}
-            ,{field: 'owner$', align: 'center',title: '璐т富'}
-            ,{field: 'payment$', align: 'center',title: '璐х墿褰㈡��'}
             // ,{field: 'custName', align: 'center',title: '瀹㈡埛鍚嶇О', width: 160}
             ,{field: 'createTime$', align: 'center',title: '鎿嶄綔鏃堕棿'}
             ,{align: 'center', title: '鎿嶄綔', toolbar: '#operate'}
@@ -96,6 +95,9 @@
             case "btnPrint2":
                 btnPrint2(data.wrkNo, data.docNum, 4);
                 break;
+            case "del":
+                doDel(data.docNum);
+                break;
             case "look":
                 var $a = $(obj.tr).find('a[lay-event="look"]');
                 var offset = $a.offset();
@@ -131,10 +133,6 @@
                                 ,{field: 'matnr', align: 'center',title: '鐗╂枡鍙�'}
                                 ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О'}
                                 ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
-                                ,{field: 'owner$', align: 'center',title: '璐т富'}
-                                ,{field: 'payment$', align: 'center',title: '璐х墿褰㈡��'}
-                                ,{field: 'owner', align: 'center',title: '璐т富', hide:true}
-                                ,{field: 'payment', align: 'center',title: '璐х墿褰㈡��', hide:true}
                                 ,{field: 'createTime$', align: 'center',title: '鎿嶄綔鏃堕棿'}
                                 ,{field: 'count', align: 'center',title: '瀹屾垚鏁�'}
                                 ,{field: 'status$', align: 'center',title: '鐘舵��'}
@@ -319,6 +317,40 @@
             })
         }
 
+    function doDel(docNum) {
+        console.log(docNum)
+        layer.confirm('纭畾瑕佸垹闄ゅ悧锛�', {
+            shade: .1,
+            skin: 'layui-layer-admin'
+        }, function (i) {
+            layer.close(i);
+            layer.load(2);
+            $.ajax({
+                url: baseUrl+"/pakout/delete/auth",
+                headers: {'token': localStorage.getItem('token')},
+                data:{
+                    docNum:docNum
+                },
+                method: 'GET',
+                success: function (res) {
+                    layer.closeAll('loading');
+                    if (res.code === 200){
+                        if (insTbCount === 0) {
+                            insTb.reload({page: {curr: 1}});
+                        } else {
+                            $(".layui-laypage-btn")[0].click();
+                        }
+                        layer.msg(res.msg, {icon: 1});
+                    } else if (res.code === 403){
+                        top.location.href = baseUrl+"/";
+                    }else {
+                        layer.msg(res.msg, {icon: 2});
+                    }
+                }
+            })
+        });
+    }
+
 
 
 

--
Gitblit v1.9.1