From 6dfe5d14a87c23c0afe924b17c45f7feb41a59cd Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 13 六月 2020 13:26:16 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/pakStore/emptyOut.js |  114 ++++++++++++++++++++++++++++++++++++++
 src/main/webapp/views/pakStore/emptyOut.html   |   45 +++++++++++++++
 2 files changed, 159 insertions(+), 0 deletions(-)

diff --git a/src/main/webapp/static/js/pakStore/emptyOut.js b/src/main/webapp/static/js/pakStore/emptyOut.js
new file mode 100644
index 0000000..6422704
--- /dev/null
+++ b/src/main/webapp/static/js/pakStore/emptyOut.js
@@ -0,0 +1,114 @@
+var pageCurr;
+layui.use(['table','laydate', 'form'], function() {
+    var table = layui.table;
+    var $ = layui.jquery;
+    var layer = layui.layer;
+    var layDate = layui.laydate;
+    var form = layui.form;
+
+    // 鏁版嵁娓叉煋
+    tableIns = table.render({
+        elem: '#locMast',
+        headers: {token: localStorage.getItem('token')},
+        url: baseUrl+'/locMast/list/auth',
+        page: true,
+        limit: 16,
+        even: true,
+        toolbar: '#toolbar',
+        cellMinWidth: 50,
+        cols: [[
+            {type: 'checkbox', fixed: 'left'}
+            ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�',sort:true}
+            ,{field: 'locType$', align: 'center',title: '搴撲綅鐘舵��',width:200}
+            // ,{field: 'whsType$', align: 'center',title: '搴撲綅绫诲瀷'}
+            ,{field: 'crnNo', align: 'center',title: '鍫嗗灈鏈哄彿'}
+            ,{field: 'row1', align: 'center',title: '鎺�'}
+            ,{field: 'bay1', align: 'center',title: '鍒�'}
+            ,{field: 'lev1', align: 'center',title: '灞�', sort:true}
+            ,{field: 'fullPlt', align: 'center',title: '婊℃澘', templet:function(row){
+                    var html = "<input value='fullPlt' type='checkbox' disabled=鈥榙isabled鈥� lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'";
+                    if(row.fullPlt === 'Y'){html += " checked ";}
+                    html += ">";
+                    return html;
+                },width:80}
+            ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',event: 'modiUser'}
+            ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
+
+        ]],
+        request: {
+            pageName: 'curr',
+            pageSize: 'limit'
+        },
+        parseData: function (res) {
+            return {
+                'code': res.code,
+                'msg': res.msg,
+                'count': res.data.total,
+                'data': res.data.records
+            }
+        },
+        response: {
+            statusCode: 200
+        },
+        done: function(res, curr, count) {
+            if (res.code === 403) {
+                top.location.href = baseUrl+"/";
+            }
+            pageCurr=curr;
+            limit();
+            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';
+                }
+            });
+        }
+    });
+
+    // 鎼滅储鏍忔悳绱簨浠�
+    form.on('submit(search)', function (data) {
+        pageCurr = 1;
+        $('#detlTable').css("display", 'none');
+        tableReload(false);
+    });
+
+    // 鎼滅储鏍忛噸缃簨浠�
+    form.on('submit(reset)', function (data) {
+        pageCurr = 1;
+        clearFormVal($('#search-box'));
+        $('#detlTable').css("display", 'none');
+        tableReload(false);
+    });
+
+})
+
+function tableReload(child) {
+    var searchData = {};
+    $.each($('#search-box [name]').serializeArray(), function() {
+        searchData[this.name] = this.value;
+    });
+    (child ? parent.tableIns : tableIns).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) {
+                tableIns.reload({
+                    where: searchData,
+                    page: {
+                        curr: pageCurr-1
+                    }
+                });
+                pageCurr -= 1;
+            }
+            limit(child);
+        }
+    });
+}
\ No newline at end of file
diff --git a/src/main/webapp/views/pakStore/emptyOut.html b/src/main/webapp/views/pakStore/emptyOut.html
index 8c609ab..4ea57ff 100644
--- a/src/main/webapp/views/pakStore/emptyOut.html
+++ b/src/main/webapp/views/pakStore/emptyOut.html
@@ -14,11 +14,56 @@
 </head>
 <body>
 
+<!-- 鎼滅储鏍� -->
+<div id="search-box" class="layui-form layui-card-header">
+    <div class="layui-inline">
+        <div class="layui-input-inline">
+            <input class="layui-input" type="text" name="loc_no" placeholder="搴撲綅鍙�" autocomplete="off">
+        </div>
+    </div>
+    <div class="layui-inline">
+        <div class="layui-input-inline">
+            <input class="layui-input" type="text" name="row1" placeholder="鎺�" autocomplete="off">
+        </div>
+    </div>
+    <div class="layui-inline">
+        <div class="layui-input-inline">
+            <input class="layui-input" type="text" name="bay1" placeholder="鍒�" autocomplete="off">
+        </div>
+    </div>
+    <div class="layui-inline">
+        <div class="layui-input-inline">
+            <input class="layui-input" type="text" name="lev1" placeholder="灞�" autocomplete="off">
+        </div>
+    </div>
+    <div class="layui-inline">
+        <div class="layui-input-inline cool-auto-complete">
+            <input id="locType" class="layui-input" name="loc_type" type="text" placeholder="璇疯緭鍏�" autocomplete="off" style="display: none">
+            <input id="locType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="搴撲綅鐘舵��" onfocus=this.blur()>
+            <div class="cool-auto-complete-window">
+                <input class="cool-auto-complete-window-input" data-key="basLocTypeQueryBylocType" onkeyup="autoLoad(this.getAttribute('data-key'))">
+                <select class="cool-auto-complete-window-select" data-key="basLocTypeQueryBylocTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
+                </select>
+            </div>
+        </div>
+    </div>
+
+    <!-- 寰呮坊鍔� -->
+    <div id="data-search-btn" class="layui-btn-container layui-form-item">
+        <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button>
+        <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button>
+    </div>
+</div>
+
+<!-- 绌烘澘搴撲綅琛� -->
+<table class="layui-hide" id="locMast" lay-filter="locMast"></table>
+
 <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
 <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
 <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
 <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
 <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
+<script type="text/javascript" src="../../static/js/pakStore/emptyOut.js" charset="utf-8"></script>
 </body>
 </html>
 

--
Gitblit v1.9.1