From 6f7a815b2d6e4f30e7ccf901b24d5103aaa72078 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期一, 25 十二月 2023 10:23:08 +0800
Subject: [PATCH] Merge branch 'tzskasrs-1' of http://47.97.1.152:5880/r/zy-asrs into tzskasrs-1

---
 src/main/webapp/views/pakStore/locDetlCheckQuery.html |  101 ++++++++++++++------------------------------------
 1 files changed, 29 insertions(+), 72 deletions(-)

diff --git a/src/main/webapp/views/pakStore/locDetlCheckQuery.html b/src/main/webapp/views/pakStore/locDetlCheckQuery.html
index 34d6710..bf518ea 100644
--- a/src/main/webapp/views/pakStore/locDetlCheckQuery.html
+++ b/src/main/webapp/views/pakStore/locDetlCheckQuery.html
@@ -7,6 +7,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
     <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all">
     <link rel="stylesheet" href="../../static/css/cool.css" media="all">
     <link rel="stylesheet" href="../../static/css/common.css" media="all">
     <style>
@@ -35,6 +36,7 @@
         #data-search-btn.layui-btn-container .layui-btn {
             margin-right: 20px;
         }
+
     </style>
 </head>
 <body>
@@ -92,42 +94,40 @@
 </body>
 <script>
 
-    var pageCurr;
-    layui.use(['table','laydate', 'form'], function() {
+    function getCol() {
+        let cols = [
+            {type: 'checkbox', merge: ['locNo']}
+            ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�', merge: true, style: 'font-weight: bold'}
+        ];
+        cols.push.apply(cols, detlCols);
+        cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
+            ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'})
+        return cols;
+    }
+
+    layui.config({
+        base: baseUrl + "/static/layui/lay/modules/"
+    }).use(['table','laydate', 'form', 'admin', 'tableMerge'], function() {
         var table = layui.table;
         var $ = layui.jquery;
         var layer = layui.layer;
         var layDate = layui.laydate;
         var form = layui.form;
+        var admin = layui.admin;
+        var tableMerge = layui.tableMerge;
+
         // 鏁版嵁娓叉煋
         locDetlTableIns = table.render({
             elem: '#stockOut',
             headers: {token: localStorage.getItem('token')},
             url: baseUrl+'/stock/out/list/auth',
             page: true,
-            limit: 10,
+            limit: 20,
+            limits: [20, 50, 100, 200, 500],
             even: true,
             toolbar: '#toolbar',
             cellMinWidth: 50,
-            cols: [[
-                {type: 'checkbox', event: 'checkbox'}
-                ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
-                ,{field: 'matnr', align: 'center',title: '鐗╂枡'}
-                // ,{field: 'lgnum', align: 'center',title: '浠撳簱鍙�', width:80}
-                // ,{field: 'tbnum', align: 'center',title: '杞偍璇锋眰缂栧彿'}
-                // ,{field: 'tbpos', align: 'center',title: '琛岄」鐩�'}
-                // ,{field: 'zmatid', align: 'center',title: '鐗╂枡鏍囩ID', width:200}
-                ,{field: 'maktx', align: 'center',title: '鐗╂枡鎻忚堪'}
-                // ,{field: 'werks', align: 'center',title: '宸ュ巶'}
-                ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
-                ,{field: 'altme', align: 'center',title: '鍗曚綅'}
-                ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
-                // ,{field: 'bname', align: 'center',title: '鐢ㄦ埛ID'}
-                // ,{field: 'memo', align: 'center',title: '澶囨敞'}
-                ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
-                ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
-
-            ]],
+            cols: [getCol()],
             request: {
                 pageName: 'curr',
                 pageSize: 'limit'
@@ -144,10 +144,10 @@
                 statusCode: 200
             },
             done: function(res, curr, count) {
+                tableMerge.render(this);
                 if (res.code === 403) {
                     top.location.href = baseUrl+"/";
                 }
-                pageCurr=curr;
             }
         });
 
@@ -158,10 +158,10 @@
             switch(obj.event) {
                 case 'confirm':
                     if (data.length === 0){
-                        layer.msg("璇烽�夋嫨鏁版嵁");
+                        layer.msg("璇烽�夋嫨鏁版嵁", {icon: 2});
                         return;
                     }
-                    var locNos = [];
+                    let locNos = [];
                     data.forEach(function(elem) {
                         locNos.push(elem.locNo);
                     });
@@ -186,35 +186,16 @@
             }
         });
 
-        var pause = true;
-
-        // 鐩戝惉琛屽伐鍏蜂簨浠�
-        table.on('tool(stockOut)', function(obj) {
-            var data = obj.data;
-            switch (obj.event) {
-                case 'checkbox':
-                    if (pause) {
-                        pause = false;
-                        $("tr td[data-field=locNo\\$] div:contains("+ data.locNo +")").parent().prev().children().children("div").click();
-                        setTimeout(function () {
-                            pause = true;
-                        }, 200)
-                    }
-                    break;
-            }
-        })
-
         // 鎼滅储鏍忔悳绱簨浠�
         form.on('submit(search)', function (data) {
-            pageCurr = 1;
             tableReload();
         });
-
         // 鎼滅储鏍忛噸缃簨浠�
         form.on('submit(reset)', function (data) {
             pageCurr = 1;
             clearFormVal($('#search-box'));
-            tableReload();
+            $('#detlTable').css("display", 'none');
+            tableReload(false);
         });
 
         layDate.render({
@@ -224,40 +205,16 @@
         });
     })
 
-    function tableReload(child) {
+    function tableReload() {
         var searchData = {};
         $.each($('#search-box [name]').serializeArray(), function() {
             searchData[this.name] = this.value;
         });
         locDetlTableIns.reload({
-            where: searchData,
-            page: {
-                curr: pageCurr
-            },
-            done: function (res, curr, count) {
-                if (res.code === 403) {
-                    top.location.href = baseUrl+"/";
-                }
-                pageCurr=curr;
-                if (res.data.length === 0 && count !== 0) {
-                    locDetlTableIns.reload({
-                        where: searchData,
-                        page: {
-                            curr: pageCurr-1
-                        }
-                    });
-                    pageCurr -= 1;
-                }
-            }
+            where: searchData
         });
     }
 
-    function clearFormVal(el) {
-        $(':input', el)
-            .val('')
-            .removeAttr('checked')
-            .removeAttr('selected');
-    }
 </script>
 </html>
 

--
Gitblit v1.9.1