From 7ebe16b9abbee8e884db27d2ec360f17455b14f2 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 24 八月 2021 09:03:07 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/pakStore/locDetlQuery.html |   63 +++++++++++++++++++++----------
 1 files changed, 43 insertions(+), 20 deletions(-)

diff --git a/src/main/webapp/views/pakStore/locDetlQuery.html b/src/main/webapp/views/pakStore/locDetlQuery.html
index 798b065..fed937d 100644
--- a/src/main/webapp/views/pakStore/locDetlQuery.html
+++ b/src/main/webapp/views/pakStore/locDetlQuery.html
@@ -51,12 +51,12 @@
         </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="matnr" 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="maktx" placeholder="浜у搧鎻忚堪" autocomplete="off">
             </div>
         </div>
         <!-- 鏃ユ湡鑼冨洿 -->
@@ -99,7 +99,9 @@
             ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
         ];
         cols.push.apply(cols, detlCols);
-        cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
+        cols.push(
+            {field: 'memo', align: 'center',title: '澶囨敞'}
+            ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
             ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'})
         return cols;
     }
@@ -141,14 +143,8 @@
                     top.location.href = baseUrl+"/";
                 }
                 pageCurr=curr;
-                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';
-                    }
-                });
+                $('.layui-form-checkbox').css("pointer-events", "none");
+                $('td[data-field="0').css("cursor", "pointer")
             }
         });
 
@@ -162,6 +158,26 @@
                         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;
             }
@@ -187,6 +203,20 @@
         });
     })
 
+    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() {
@@ -202,15 +232,8 @@
                     top.location.href = baseUrl+"/";
                 }
                 pageCurr=curr;
-                if (res.data.length === 0 && count !== 0) {
-                    locDetlTableIns.reload({
-                        where: searchData,
-                        page: {
-                            curr: pageCurr-1
-                        }
-                    });
-                    pageCurr -= 1;
-                }
+                $('.layui-form-checkbox').css("pointer-events", "none");
+                $('td[data-field="0').css("cursor", "pointer")
             }
         });
     }

--
Gitblit v1.9.1