From 08d48e15eb1a33bef4125b99abc802d1aa7e1c54 Mon Sep 17 00:00:00 2001
From: lsh <1>
Date: 星期日, 28 一月 2024 13:22:00 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/wrkMastLog/wrkMastLog.js |  418 +++++++----------------------------------------------------
 1 files changed, 49 insertions(+), 369 deletions(-)

diff --git a/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js b/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js
index b408f9d..2169f18 100644
--- a/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js
+++ b/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js
@@ -1,4 +1,6 @@
 var pageCurr;
+var wrkNo;
+var ioTime;
 layui.use(['table','laydate', 'form'], function(){
     var table = layui.table;
     var $ = layui.jquery;
@@ -10,26 +12,27 @@
     tableIns = table.render({
         elem: '#wrkMastLog',
         headers: {token: localStorage.getItem('token')},
-        url: '/wrkMastLog/list/auth',
+        url: baseUrl+'/wrkMastLog/list/auth',
         page: true,
-        limit: 10,
+        limit: 16,
+        limits: [16, 30, 50, 100, 200, 500],
         even: true,
         toolbar: '#toolbar',
         cellMinWidth: 50,
         cols: [[
-            {type: 'checkbox'}
+            // {type: 'checkbox'}
 //            ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
 //             ,{field: 'id', align: 'center',title: '缂栧彿'}
-            ,{field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�',event: 'wrkNo', sort: true}
+            {field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�',event: 'wrkNo', sort: true}
             ,{field: 'ioTime$', align: 'center',title: '宸ヤ綔鏃堕棿', width:160, sort: true}
             ,{field: 'wrkSts$', align: 'center',title: '宸ヤ綔鐘舵��', width:160}
             ,{field: 'ioType$', align: 'center',title: '鍏ュ嚭搴撶被鍨�', width:160}
             ,{field: 'ioPri', align: 'center',title: '浼樺厛绾�'}
             ,{field: 'crnNo$', align: 'center',title: '鍫嗗灈鏈哄彿'}
-            ,{field: 'sourceStaNo$', align: 'center',title: '婧愮珯',event: 'sourceStaNo', style: 'cursor:pointer'}
-            ,{field: 'staNo$', align: 'center',title: '鐩爣绔�',event: 'staNo', style: 'cursor:pointer'}
-            ,{field: 'sourceLocNo$', align: 'center',title: '婧愬簱浣�',event: 'sourceLocNo', style: 'cursor:pointer'}
-            ,{field: 'locNo$', align: 'center',title: '鐩爣搴撲綅',event: 'locNo', style: 'cursor:pointer'}
+            ,{field: 'sourceStaNo$', align: 'center',title: '婧愮珯'}
+            ,{field: 'staNo$', align: 'center',title: '鐩爣绔�'}
+            ,{field: 'sourceLocNo$', align: 'center',title: '婧愬簱浣�'}
+            ,{field: 'locNo$', align: 'center',title: '鐩爣搴撲綅'}
             // ,{field: 'picking', align: 'center',title: '鎷f枡', templet:function(row){
             //         var html = "<input value='picking' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'";
             //         if(row.picking === 'Y'){html += " checked ";}
@@ -52,8 +55,10 @@
             // ,{field: 'crnStrTime$', align: 'center',title: '鍫嗗灈鏈哄惎鍔ㄦ椂闂�'}
             // ,{field: 'crnEndTime$', align: 'center',title: '鍫嗗灈鏈哄仠姝㈡椂闂�'}
             // ,{field: 'plcStrTime$', align: 'center',title: '鎷f枡鏃堕棿'}
-            // ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',event: 'modiUser', style: 'cursor:pointer'}
-            // ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
+            ,{field: 'sheetNo$', align: 'center',title: '鏈烘鑷�', hide: false}
+
+            ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide:true}
+            ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide:true}
             // ,{field: 'appeUser$', align: 'center',title: '鍒涘缓鑰�',event: 'appeUser', style: 'cursor:pointer'}
             // ,{field: 'appeTime$', align: 'center',title: '娣诲姞鏃堕棿'}
             ,{field: 'barcode', align: 'center',title: '鏉$爜'}
@@ -64,7 +69,7 @@
             //         return html;
             //     }}
 
-            // ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:130}
+            ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 80}
         ]],
         request: {
             pageName: 'curr',
@@ -83,7 +88,7 @@
         },
         done: function(res, curr, count) {
             if (res.code === 403) {
-                top.location.href = "/";
+                top.location.href = baseUrl+"/";
             }
             pageCurr=curr;
             limit();
@@ -113,7 +118,7 @@
             },
             done: function (res, curr, count) {
                 if (res.code === 403) {
-                    top.location.href = "/";
+                    top.location.href = baseUrl+"/";
                 }
                 pageCurr=curr;
                 limit();
@@ -155,7 +160,7 @@
                 } else {
                     layer.confirm('纭畾鍒犻櫎'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){
                         $.ajax({
-                            url: "/wrkMastLog/delete/auth",
+                            url: baseUrl+"/wrkMastLog/delete/auth",
                             headers: {'token': localStorage.getItem('token')},
                             data: {param: JSON.stringify(data)},
                             method: 'POST',
@@ -165,7 +170,7 @@
                                     layer.closeAll();
                                     tableReload(false);
                                 } else if (res.code === 403){
-                                    top.location.href = "/";
+                                    top.location.href = baseUrl+"/";
                                 } else {
                                     layer.msg(res.msg)
                                 }
@@ -175,7 +180,7 @@
                 }
                 break;
             case 'exportData':
-                layer.confirm('纭畾瀵煎嚭Excel鍚�', function(){
+                layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
                     var titles=[];
                     var fields=[];
                     obj.config.cols[0].map(function (col) {
@@ -193,7 +198,7 @@
                         'fields': fields
                     };
                     $.ajax({
-                        url: "/wrkMastLog/export/auth",
+                        url: baseUrl+"/wrkMastLog/export/auth",
                         headers: {'token': localStorage.getItem('token')},
                         data: JSON.stringify(param),
                         dataType:'json',
@@ -204,7 +209,7 @@
                             if (res.code === 200) {
                                 table.exportFile(titles,res.data,'xls');
                             } else if (res.code === 403) {
-                                top.location.href = "/";
+                                top.location.href = baseUrl+"/";
                             } else {
                                 layer.msg(res.msg)
                             }
@@ -219,6 +224,24 @@
     table.on('tool(wrkMastLog)', function(obj){
         var data = obj.data;
         switch (obj.event) {
+            // 鏄庣粏灞曠ず
+            case 'detlShow':
+                wrkNo = data.wrkNo;
+                ioTime =  data.ioTime;
+                // 琛ㄦ牸涓嬫柟鏄剧ず
+                // locDetl(data.wrkNo);
+                // 寮瑰眰鏄剧ず
+                layer.open({
+                    type: 2,
+                    title: '宸ヤ綔鏄庣粏鍘嗗彶妗�',
+                    maxmin: true,
+                    area: [top.detailWidth, top.detailHeight],
+                    shadeClose: true,
+                    content: 'wrkDetlLog.html',
+                    success: function(layero, index){
+                    }
+                });
+                break;
             // 璇︽儏
             case 'detail':
                 layer.open({
@@ -240,353 +263,6 @@
                     }
                 });
                 break;
-            // 缂栬緫
-            case 'edit':
-                layer.open({
-                    type: 2,
-                    title: '淇敼',
-                    maxmin: true,
-                    area: [top.detailWidth, top.detailHeight],
-                    shadeClose: false,
-                    content: 'wrkMastLog_detail.html',
-                    success: function(layero, index){
-                        layer.getChildFrame('#data-detail-submit-save', index).hide();
-                        setFormVal(layer.getChildFrame('#detail', index), data, false);
-                        top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false);
-                        top.convertDisabled(layer.getChildFrame('#id', index), true);
-                        layero.find('iframe')[0].contentWindow.layui.form.render('select');
-                        layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
-                        layer.getChildFrame('##dealDownLine', index).hide();
-                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
-
-                    }
-                });
-                break;
-            case 'wrkSts':
-                var param = top.reObject(data).wrkSts;
-                if (param === undefined) {
-                    layer.msg("鏃犳暟鎹�");
-                } else {
-                   layer.open({
-                       type: 2,
-                       title: '宸ヤ綔鐘舵�佽鎯�',
-                       maxmin: true,
-                       area: [top.detailWidth, top.detailHeight],
-                       shadeClose: false,
-                       content: '../basWrkStatus/basWrkStatus_detail.html',
-                       success: function(layero, index){
-                           $.ajax({
-                               url: "/basWrkStatus/"+ param +"/auth",
-                               headers: {'token': localStorage.getItem('token')},
-                               method: 'GET',
-                               success: function (res) {
-                                   if (res.code === 200){
-                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
-                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
-                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
-                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
-                                   } else if (res.code === 403){
-                                       parent.location.href = "/";
-                                   }else {
-                                       layer.msg(res.msg)
-                                   }
-                               }
-                           })
-                       }
-                   });
-                }
-                break;
-            case 'ioType':
-                var param = top.reObject(data).ioType;
-                if (param === undefined) {
-                    layer.msg("鏃犳暟鎹�");
-                } else {
-                   layer.open({
-                       type: 2,
-                       title: '鍏ュ嚭搴撶被鍨嬭鎯�',
-                       maxmin: true,
-                       area: [top.detailWidth, top.detailHeight],
-                       shadeClose: false,
-                       content: '../basWrkIotype/basWrkIotype_detail.html',
-                       success: function(layero, index){
-                           $.ajax({
-                               url: "/basWrkIotype/"+ param +"/auth",
-                               headers: {'token': localStorage.getItem('token')},
-                               method: 'GET',
-                               success: function (res) {
-                                   if (res.code === 200){
-                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
-                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
-                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
-                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
-                                   } else if (res.code === 403){
-                                       parent.location.href = "/";
-                                   }else {
-                                       layer.msg(res.msg)
-                                   }
-                               }
-                           })
-                       }
-                   });
-                }
-                break;
-            case 'crnNo':
-                var param = top.reObject(data).crnNo;
-                if (param === undefined) {
-                    layer.msg("鏃犳暟鎹�");
-                } else {
-                   layer.open({
-                       type: 2,
-                       title: '鍫嗗灈鏈哄彿璇︽儏',
-                       maxmin: true,
-                       area: [top.detailWidth, top.detailHeight],
-                       shadeClose: false,
-                       content: '../basCrnp/basCrnp_detail.html',
-                       success: function(layero, index){
-                           $.ajax({
-                               url: "/basCrnp/"+ param +"/auth",
-                               headers: {'token': localStorage.getItem('token')},
-                               method: 'GET',
-                               success: function (res) {
-                                   if (res.code === 200){
-                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
-                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
-                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
-                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
-                                   } else if (res.code === 403){
-                                       parent.location.href = "/";
-                                   }else {
-                                       layer.msg(res.msg)
-                                   }
-                               }
-                           })
-                       }
-                   });
-                }
-                break;
-            case 'locNo':
-                var param = top.reObject(data).locNo;
-                if (param === undefined) {
-                    layer.msg("鏃犳暟鎹�");
-                } else {
-                   layer.open({
-                       type: 2,
-                       title: '鐩爣搴撲綅璇︽儏',
-                       maxmin: true,
-                       area: [top.detailWidth, top.detailHeight],
-                       shadeClose: false,
-                       content: '../locMast/locMast_detail.html',
-                       success: function(layero, index){
-                           $.ajax({
-                               url: "/locMast/"+ param +"/auth",
-                               headers: {'token': localStorage.getItem('token')},
-                               method: 'GET',
-                               success: function (res) {
-                                   if (res.code === 200){
-                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
-                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
-                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
-                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
-                                   } else if (res.code === 403){
-                                       parent.location.href = "/";
-                                   }else {
-                                       layer.msg(res.msg)
-                                   }
-                               }
-                           })
-                       }
-                   });
-                }
-                break;
-            case 'staNo':
-                var param = top.reObject(data).staNo;
-                if (param === undefined) {
-                    layer.msg("鏃犳暟鎹�");
-                } else {
-                   layer.open({
-                       type: 2,
-                       title: '鐩爣绔欒鎯�',
-                       maxmin: true,
-                       area: [top.detailWidth, top.detailHeight],
-                       shadeClose: false,
-                       content: '../basDevp/basDevp_detail.html',
-                       success: function(layero, index){
-                           $.ajax({
-                               url: "/basDevp/"+ param +"/auth",
-                               headers: {'token': localStorage.getItem('token')},
-                               method: 'GET',
-                               success: function (res) {
-                                   if (res.code === 200){
-                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
-                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
-                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
-                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
-                                   } else if (res.code === 403){
-                                       parent.location.href = "/";
-                                   }else {
-                                       layer.msg(res.msg)
-                                   }
-                               }
-                           })
-                       }
-                   });
-                }
-                break;
-            case 'sourceStaNo':
-                var param = top.reObject(data).sourceStaNo;
-                if (param === undefined) {
-                    layer.msg("鏃犳暟鎹�");
-                } else {
-                   layer.open({
-                       type: 2,
-                       title: '婧愮珯璇︽儏',
-                       maxmin: true,
-                       area: [top.detailWidth, top.detailHeight],
-                       shadeClose: false,
-                       content: '../basDevp/basDevp_detail.html',
-                       success: function(layero, index){
-                           $.ajax({
-                               url: "/basDevp/"+ param +"/auth",
-                               headers: {'token': localStorage.getItem('token')},
-                               method: 'GET',
-                               success: function (res) {
-                                   if (res.code === 200){
-                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
-                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
-                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
-                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
-                                   } else if (res.code === 403){
-                                       parent.location.href = "/";
-                                   }else {
-                                       layer.msg(res.msg)
-                                   }
-                               }
-                           })
-                       }
-                   });
-                }
-                break;
-            case 'sourceLocNo':
-                var param = top.reObject(data).sourceLocNo;
-                if (param === undefined) {
-                    layer.msg("鏃犳暟鎹�");
-                } else {
-                   layer.open({
-                       type: 2,
-                       title: '婧愬簱浣嶈鎯�',
-                       maxmin: true,
-                       area: [top.detailWidth, top.detailHeight],
-                       shadeClose: false,
-                       content: '../locMast/locMast_detail.html',
-                       success: function(layero, index){
-                           $.ajax({
-                               url: "/locMast/"+ param +"/auth",
-                               headers: {'token': localStorage.getItem('token')},
-                               method: 'GET',
-                               success: function (res) {
-                                   if (res.code === 200){
-                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
-                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
-                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
-                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
-                                   } else if (res.code === 403){
-                                       parent.location.href = "/";
-                                   }else {
-                                       layer.msg(res.msg)
-                                   }
-                               }
-                           })
-                       }
-                   });
-                }
-                break;
-            case 'modiUser':
-                var param = top.reObject(data).modiUser;
-                if (param === undefined) {
-                    layer.msg("鏃犳暟鎹�");
-                } else {
-                   layer.open({
-                       type: 2,
-                       title: '淇敼浜哄憳璇︽儏',
-                       maxmin: true,
-                       area: [top.detailWidth, top.detailHeight],
-                       shadeClose: false,
-                       content: '../user/user_detail.html',
-                       success: function(layero, index){
-                           $.ajax({
-                               url: "/user/"+ param +"/auth",
-                               headers: {'token': localStorage.getItem('token')},
-                               method: 'GET',
-                               success: function (res) {
-                                   if (res.code === 200){
-                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
-                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
-                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
-                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
-                                   } else if (res.code === 403){
-                                       parent.location.href = "/";
-                                   }else {
-                                       layer.msg(res.msg)
-                                   }
-                               }
-                           })
-                       }
-                   });
-                }
-                break;
-            case 'appeUser':
-                var param = top.reObject(data).appeUser;
-                if (param === undefined) {
-                    layer.msg("鏃犳暟鎹�");
-                } else {
-                   layer.open({
-                       type: 2,
-                       title: '鍒涘缓鑰呰鎯�',
-                       maxmin: true,
-                       area: [top.detailWidth, top.detailHeight],
-                       shadeClose: false,
-                       content: '../user/user_detail.html',
-                       success: function(layero, index){
-                           $.ajax({
-                               url: "/user/"+ param +"/auth",
-                               headers: {'token': localStorage.getItem('token')},
-                               method: 'GET',
-                               success: function (res) {
-                                   if (res.code === 200){
-                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
-                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
-                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
-                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
-                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
-                                   } else if (res.code === 403){
-                                       parent.location.href = "/";
-                                   }else {
-                                       layer.msg(res.msg)
-                                   }
-                               }
-                           })
-                       }
-                   });
-                }
-                break;
-
         }
     });
 
@@ -669,7 +345,7 @@
 
         };
         $.ajax({
-            url: "/wrkMastLog/"+name+"/auth",
+            url: baseUrl+"/wrkMastLog/"+name+"/auth",
             headers: {'token': localStorage.getItem('token')},
             data: top.reObject(data),
             method: 'POST',
@@ -681,7 +357,7 @@
                         $(this).val("");
                     });
                 } else if (res.code === 403){
-                    top.location.href = "/";
+                    top.location.href = baseUrl+"/";
                 }else {
                     layer.msg(res.msg)
                 }
@@ -762,7 +438,11 @@
         elem: '#logErrTime\\$',
         type: 'datetime'
     });
-
+    layDate.render({
+        elem: '.layui-laydate-range'
+        ,type: 'datetime'
+        ,range: true
+    });
 
 });
 
@@ -783,7 +463,7 @@
         },
         done: function (res, curr, count) {
             if (res.code === 403) {
-                top.location.href = "/";
+                top.location.href = baseUrl+"/";
             }
             pageCurr=curr;
             if (res.data.length === 0 && count !== 0) {

--
Gitblit v1.9.1