From 23d7909b52e22eb42900a506c7d8b72f58f28944 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 03 七月 2023 17:36:21 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/pda/locNormalIn.html |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/src/main/webapp/views/pda/locNormalIn.html b/src/main/webapp/views/pda/locNormalIn.html
index f82101e..ae9a929 100644
--- a/src/main/webapp/views/pda/locNormalIn.html
+++ b/src/main/webapp/views/pda/locNormalIn.html
@@ -96,17 +96,20 @@
         </div>
     </div>
 
-    <div style="margin: 5px 5px">
-        <button id="mat-btn" type="button" class="layui-btn layui-btn-normal" onclick="getMat()"><i
-                class="layui-icon">+</i>鎻愬彇
-        </button>
-    </div>
+    <!--<div style="margin: 5px 5px">-->
+        <!--<button id="mat-btn" type="button" class="layui-btn layui-btn-normal" onclick="getMat()"><i-->
+        <!--        class="layui-icon">+</i>鎻愬彇-->
+        <!--</button>-->
+    <!--</div>-->
 </header>
-
 <!-- 涓讳綋 -->
 <main>
+    <div class="layui-btn-group demoTable">
+        <button class="layui-btn" data-type="getCheckData">鎻愬彇</button>
+    </div>
     <table class="layui-table" id="chooseData" lay-filter="chooseData"></table>
 </main>
+
 <!-- 灏鹃儴 -->
 <footer>
     <div class="layui-btn-container">
@@ -183,6 +186,18 @@
         var layer = layui.layer;
         var form = layui.form;
 
+        var $$ = layui.$, active = {
+            getCheckData: function(){ //鑾峰彇閫変腑鏁版嵁
+                var checkStatus = table.checkStatus('chooseData')
+                    ,data = checkStatus.data;
+                matData = data
+                tableIns.reload({data: matData});
+            }
+        };
+        $$('.demoTable .layui-btn').on('click', function(){
+            var type = $(this).data('type');
+            active[type] ? active[type].call(this) : '';
+        });
         document.getElementById("billNo").focus();
 
         tableIns = table.render({
@@ -192,6 +207,7 @@
             limit: 500,
             cellMinWidth: 50,
             cols: [[
+                {type: 'checkbox'},
                 {field: 'matNo', align: 'center', title: '鐗╂枡缂栫爜', event: 'modify'},
                 {field: 'mnemonic', align: 'center', title: '鐢熶骇鍗曞彿', event: 'modify'},
                 {field: 'count', align: 'center', title: '鏁伴噺', style: 'color: blue', width: 50, event: 'modify'},
@@ -225,6 +241,7 @@
             }
         });
 
+
         var areaType = getQueryVariable('areaType');
         // 鑾峰彇浠撳簱涓嬫媺
         $.ajax({
@@ -250,6 +267,7 @@
         });
     });
 
+
     /*************************************  鏁伴噺  ****************************************/
     var countDom = $('#count');
     var minCount = 1;
@@ -272,6 +290,14 @@
     function confirm() {
         var matNo = $('#matNo').val();
         var count = $('#count').val();
+        if (count > maxCount) {
+            alert("鏁伴噺涓嶈兘瓒呰繃" + maxCount);
+            return;
+        }
+        if (count < minCount) {
+            alert("鏁伴噺涓嶈兘浣庝簬" + minCount);
+            return;
+        }
         var mnemonic = $("#mnemonic").val() === '' ? null : $("#mnemonic").val();
         for (var j = 0; j < matData.length; j++) {
             if (mnemonic) {

--
Gitblit v1.9.1