From 6d75b9bda39c710153183844ba1e8effbb730de1 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期二, 16 四月 2024 09:53:43 +0800
Subject: [PATCH] 单据、拣货单权限问题

---
 src/main/webapp/static/js/picking/picking.js |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 50 insertions(+), 7 deletions(-)

diff --git a/src/main/webapp/static/js/picking/picking.js b/src/main/webapp/static/js/picking/picking.js
index 2f1f451..f0f0b3c 100644
--- a/src/main/webapp/static/js/picking/picking.js
+++ b/src/main/webapp/static/js/picking/picking.js
@@ -12,6 +12,12 @@
     var form = layui.form;
     var admin = layui.admin;
 
+    layDate.render({
+        elem: '.layui-laydate-range'
+        ,type: 'datetime'
+        ,range: true
+    });
+
     // 鏁版嵁娓叉煋
     tableIns = table.render({
         elem: '#saasLog',
@@ -31,7 +37,7 @@
             ,{align: 'center', title: '浜岀淮鐮�', toolbar: '#operate', width: 200 , hide:true}
             ,{align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 160, width: 160}
             ,{field: 'status$', align: 'center',title: '鐘舵��'}
-            // ,{field: 'custName', align: 'center',title: '瀹㈡埛鍚嶇О', width: 160}
+            ,{field: 'custName', align: 'center',title: '瀹㈡埛鍚嶇О', width: 160}
             ,{field: 'createTime$', align: 'center',title: '鎿嶄綔鏃堕棿'}
             ,{align: 'center', title: '鎿嶄綔', toolbar: '#operate'}
 
@@ -106,8 +112,8 @@
                 var left = offset.left;
                 layer.open({
                     type: 1,
-                    title: false,
-                    area: '1200px',
+                    title: '鍗曟嵁鏄庣粏',
+                    area: '1500px',
                     offset: [top + 'px', (left - 450 + $a.outerWidth()) + 'px'],
                     shade: .01,
                     shadeClose: true,
@@ -127,20 +133,22 @@
                             cellMinWidth: 100,
                             cols: [[
                                 {type: 'numbers'}
-                                ,{field: 'id', align: 'center',title: 'id', hide:true}
+                                ,{field: 'wrkNo', align: 'center',title: 'id', hide:true}
                                 ,{field: 'docNum', align: 'center',title: '鎷h揣鍗曞彿'}
                                 ,{field: 'uuid', align: 'center',title: 'uuid'}
                                 ,{field: 'locNo', align: 'center',title: '搴撲綅'}
                                 ,{field: 'batch', align: 'center',title: '鎵瑰彿'}
                                 ,{field: 'barcode', align: 'center',title: '鍖呭彿'}
                                 // ,{field: 'matnr', align: 'center',title: '鐗╂枡鍙�'}
-                                // ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О'}
+                                ,{field: 'maktx', align: 'center',title: '鐗屽彿'}
                                 ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
                                 ,{field: 'createTime$', align: 'center',title: '鎿嶄綔鏃堕棿'}
                                 ,{field: 'count', align: 'center',title: '瀹屾垚鏁�'}
                                 ,{field: 'status$', align: 'center',title: '鐘舵��'}
                                 ,{field: 'memo', align: 'center',title: '澶囨敞'}
+                                ,{field: 'specs', align: 'center',title: '鍙戣揣鏃堕棿'}
                                 ,{field: 'createBy', align: 'center',title: '', hide:true}
+                                ,{align: 'center', title: '鎿嶄綔', toolbar: '#operateDetl'}
                             ]],
                             request: {
                                 pageName: 'curr',
@@ -176,6 +184,41 @@
                 });
         }
     });
+
+    table.on('tool(lookSSXMTable)', function(obj) {
+        var data = obj.data;
+        console.log(data);
+        switch (obj.event) {
+            case "delDetl":
+                layer.confirm('纭畾瑕佸垹闄ゅ悧锛�', {
+                    shade: .1,
+                    skin: 'layui-layer-admin'
+                }, function (i) {
+                    layer.close(i);
+                    layer.load(2);
+                    $.ajax({
+                        url: baseUrl+"/pakout/deleteDetl/auth",
+                        headers: {'token': localStorage.getItem('token')},
+                        data:{
+                            wrkNo:data.wrkNo
+                        },
+                        method: 'GET',
+                        success: function (res) {
+                            layer.closeAll('loading');
+                            if (res.code === 200){
+                                tableIns.reload({page: {curr: 1}});
+                                layer.msg(res.msg, {icon: 1});
+                            } else if (res.code === 403){
+                                top.location.href = baseUrl+"/";
+                            }else {
+                                layer.msg(res.msg, {icon: 2});
+                            }
+                        }
+                    })
+                })
+                break;
+        }
+    })
 
     // 鎼滅储
     form.on('submit(search)', function (data) {
@@ -298,9 +341,9 @@
                             var className = templateDom.attr("class");
 
                             if (className === 'template-barcode') {
-                                json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2&param=" + (json.data[i].docNum+";"+json.data[i].matnr+";"+json.data[i].batch+";"+json.data[i].anfme+";"+json.data[i].locNo+";"+json.data[i].barcode+";"+json.data[i].nodeId+";"+json.data[i].wrkNo+";");
+                                json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2&param=" + (json.data[i].docNum+";"+json.data[i].matnr+";"+json.data[i].batch+";"+json.data[i].anfme+";"+json.data[i].locNo+";"+json.data[i].barcode+";"+json.data[i].nodeId+";"+json.data[i].wrkNo+";"+json.data[i].maktx);
                             } else {
-                                json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2&param=" + (json.data[i].docNum+";"+json.data[i].matnr+";"+json.data[i].batch+";"+json.data[i].anfme+";"+json.data[i].locNo+";"+json.data[i].barcode+";"+json.data[i].nodeId+";"+json.data[i].wrkNo+";");
+                                json.data[i]["barcodeUrl"] = baseUrl + "/ManPakOut/code/auth?type=2&param=" + (json.data[i].docNum+";"+json.data[i].matnr+";"+json.data[i].batch+";"+json.data[i].anfme+";"+json.data[i].locNo+";"+json.data[i].barcode+";"+json.data[i].nodeId+";"+json.data[i].wrkNo+";"+json.data[i].maktx);
                             }
                         }
                         var tpl = templateDom.html();

--
Gitblit v1.9.1