From b7e08df5a07b3fa832a46ecc31983e16f2bccc8c Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 24 七月 2023 14:56:01 +0800
Subject: [PATCH] # 出库作业,和库存明细管理 排序

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

diff --git a/src/main/webapp/views/pakStore/locDetlCheckQuery.html b/src/main/webapp/views/pakStore/locDetlCheckQuery.html
index 04c577a..0d2410b 100644
--- a/src/main/webapp/views/pakStore/locDetlCheckQuery.html
+++ b/src/main/webapp/views/pakStore/locDetlCheckQuery.html
@@ -10,6 +10,9 @@
     <link rel="stylesheet" href="../../static/css/cool.css" media="all">
     <link rel="stylesheet" href="../../static/css/common.css" media="all">
     <style>
+        .layui-table-body.layui-table-main {
+            overflow: scroll;
+        }
         body {
             padding: 0 20px;
         }
@@ -35,7 +38,6 @@
         #data-search-btn.layui-btn-container .layui-btn {
             margin-right: 20px;
         }
-
     </style>
 </head>
 <body>
@@ -45,6 +47,13 @@
     <legend>鎼滅储鏍�</legend>
     <!-- 鎼滅储鏍� -->
     <div id="search-box" class="layui-form layui-card-header">
+        <div class="layui-input-inline" style="margin-top: -10px">
+            <select id="crnNo" name="crnNo">
+                <option value="" style="display: none">璇烽�夋嫨宸烽亾</option>
+                <option value="1">1鍙�</option>
+                <option value="2">2鍙�</option>
+            </select>
+        </div>
         <div class="layui-inline">
             <div class="layui-input-inline">
                 <input class="layui-input" type="text" name="loc_no" placeholder="搴撲綅鍙�" autocomplete="off">
@@ -52,12 +61,17 @@
         </div>
         <div class="layui-inline">
             <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="matnr" placeholder="鐗╂枡鍙�"  autocomplete="off">
+                <input class="layui-input" type="text" name="mat_no" placeholder="鐗╂枡鍙�"  autocomplete="off">
             </div>
         </div>
         <div class="layui-inline">
             <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="maktx" placeholder="鐗╂枡鎻忚堪" autocomplete="off">
+                <input class="layui-input" type="text" name="mat_name" placeholder="鐗╂枡鎻忚堪" autocomplete="off">
+            </div>
+        </div>
+        <div class="layui-inline">
+            <div class="layui-input-inline">
+                <input class="layui-input" type="text" name="memo" placeholder="璇疯緭鍏�" autocomplete="off">
             </div>
         </div>
         <!-- 鏃ユ湡鑼冨洿 -->
@@ -80,7 +94,7 @@
     </div>
 </script>
 
-<div class="layui-form">
+<div class="layui-form" style="width: 100%">
     <table class="layui-hide" id="stockOut" lay-filter="stockOut"></table>
 </div>
 
@@ -98,10 +112,35 @@
         var cols = [
             {type: 'checkbox'}
             ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
+            ,{field: 'matNo', align: 'center',title: '浜у搧缂栫爜'}
+            ,{field: 'matName', align: 'center',title: '浜у搧鍚嶇О', width: 180}
+            ,{field: 'specs', align: 'center',title: '瑙勬牸'}
+            ,{field: 'qty', align: 'center',title: '鏁伴噺'}
+            ,{field: 'source', title: '鏉ユ簮', align: 'center'}
+            ,{field: 'vendor', title: '渚涘簲鍟�', align: 'center'}
+            ,{field: 'qtyBox', align: 'center', title: '姣忕鏁伴噺(PCS)', width: 130}
+            ,{field: 'allQty', title: '鎬绘暟閲�(PCS)', align: 'center', width: 120}
+            ,{field: 'weight', align: 'center', title: '姣忕閲嶉噺(KG)', width: 130}
+            ,{field: 'allWeight', title: '鎬婚噸閲�(KG)', align: 'center', width: 120}
+            ,{field: 'unit', align: 'center',title: '鍗曚綅', width:80, hide: true}
+            ,{field: 'supplier', align: 'center',title: '鎵瑰彿'}
+            ,{field: 'color', align: 'center',title: '棰滆壊'}
+            ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
+            // ,{field: 'bname', align: 'center',title: '搴撲綅鍚嶇О'}
+            ,{field: 'memo', align: 'center',title: '鐢熶骇鏃ユ湡'}
+            ,{field: 'str3', align: 'center',title: '瀹㈡埛鍚嶇О'}
+            ,{field: 'str4', align: 'center',title: '椤圭洰淇℃伅'}
+            ,{field: 'str5$', align: 'center',title: '绫诲埆'}
+            // {type: 'checkbox'}
+            // ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
         ];
-        cols.push.apply(cols, detlCols);
-        cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
-            ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'})
+        // cols.push.apply(cols, detlCols);
+        cols.push(
+            // {field: 'str3', align: 'center',title: '瀹㈡埛鍚嶇О'}
+            // ,{field: 'str4', align: 'center',title: '椤圭洰淇℃伅'}
+            // ,{field: 'str5$', align: 'center',title: '绫诲埆'}
+            {field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
+            ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', width: 180})
         return cols;
     }
 
@@ -117,11 +156,11 @@
             headers: {token: localStorage.getItem('token')},
             url: baseUrl+'/stock/out/list/auth',
             page: true,
-            limit: 20,
-            limits: [20, 50, 100, 200, 500],
+            limit: 10,
+            limits: [10, 30, 50, 100, 200, 500],
             even: true,
             toolbar: '#toolbar',
-            cellMinWidth: 50,
+            cellMinWidth: 100,
             cols: [getCol()],
             request: {
                 pageName: 'curr',
@@ -143,8 +182,14 @@
                     top.location.href = baseUrl+"/";
                 }
                 pageCurr=curr;
-                $('.layui-form-checkbox').css("pointer-events", "none");
-                $('td[data-field="0').css("cursor", "pointer")
+                form.on('checkbox(tableCheckbox)', function (data) {
+                    var _index = $(data.elem).attr('table-index')||0;
+                    if(data.elem.checked){
+                        res.data[_index][data.value] = 'Y';
+                    }else{
+                        res.data[_index][data.value] = 'N';
+                    }
+                });
             }
         });
 
@@ -158,26 +203,6 @@
                         layer.msg("璇烽�夋嫨鏁版嵁");
                         return;
                     }
-                    var locNos = [];
-                    data.forEach(function(elem) {
-                        locNos.push(elem.locNo);
-                    });
-                    $.ajax({
-                        url: baseUrl+"/locDetl/auth",
-                        headers: {'token': localStorage.getItem('token')},
-                        data: {locNos:locNos},
-                        method: 'POST',
-                        async: false,
-                        success: function (res) {
-                            if (res.code === 200) {
-                                data = res.data;
-                            } else if (res.code === 403) {
-                                top.location.href = baseUrl + "/";
-                            } else {
-                                layer.msg(res.msg)
-                            }
-                        }
-                    })
                     parent.addTableData(data);
                     break;
             }
@@ -203,20 +228,6 @@
         });
     })
 
-    var b = true;
-    $(function(){
-        $(document.body).on('click','td[data-field="0"]',function(){
-            var locNo = $(this).next().children("div").html();
-            if (b) {
-                b = false;
-                $("tr td[data-field=locNo\\$] div:contains("+ locNo +")").parent().prev().children().children("div").click();
-                setTimeout(function () {
-                    b = true;
-                }, 200)
-            }
-        });
-    })
-
     function tableReload(child) {
         var searchData = {};
         $.each($('#search-box [name]').serializeArray(), function() {
@@ -232,12 +243,25 @@
                     top.location.href = baseUrl+"/";
                 }
                 pageCurr=curr;
-                $('.layui-form-checkbox').css("pointer-events", "none");
-                $('td[data-field="0').css("cursor", "pointer")
+                if (res.data.length === 0 && count !== 0) {
+                    locDetlTableIns.reload({
+                        where: searchData,
+                        page: {
+                            curr: pageCurr-1
+                        }
+                    });
+                    pageCurr -= 1;
+                }
             }
         });
     }
 
+    function clearFormVal(el) {
+        $(':input', el)
+            .val('')
+            .removeAttr('checked')
+            .removeAttr('selected');
+    }
 </script>
 </html>
 

--
Gitblit v1.9.1