From e004099a45b0981e1802b27b59053bf284fefdff Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 24 八月 2021 13:45:10 +0800
Subject: [PATCH] Merge branch 'xgmasrs' of https://gitee.com/luxiaotao1123/zy-asrs into xgmasrs

---
 src/main/webapp/views/matOut/waitMatoutQuery.html |  250 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 250 insertions(+), 0 deletions(-)

diff --git a/src/main/webapp/views/matOut/waitMatoutQuery.html b/src/main/webapp/views/matOut/waitMatoutQuery.html
new file mode 100644
index 0000000..8756b0f
--- /dev/null
+++ b/src/main/webapp/views/matOut/waitMatoutQuery.html
@@ -0,0 +1,250 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title></title>
+    <meta name="renderer" content="webkit">
+    <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/cool.css" media="all">
+    <link rel="stylesheet" href="../../static/css/common.css" media="all">
+    <style>
+        body {
+            padding: 0 20px;
+        }
+        .layui-table-box {
+            border-right: 1px solid #9F9F9F;
+            border-left: 1px solid #9F9F9F;
+        }
+
+        #search-box {
+            padding: 30px 0 20px 0;
+        }
+        #search-box .layui-inline:first-child {
+            margin-left: 30px;
+        }
+        #search-box .layui-inline {
+            margin-right: 5px;
+        }
+
+        #data-search-btn {
+            margin-left: 10px;
+            display: inline-block;
+        }
+        #data-search-btn.layui-btn-container .layui-btn {
+            margin-right: 20px;
+        }
+    </style>
+</head>
+<body>
+
+<!-- 鎼滅储鏍� -->
+<fieldset class="layui-elem-field site-demo-button" style="margin: 20px;">
+    <legend>鎼滅储鏍�</legend>
+    <!-- 鎼滅储鏍� -->
+    <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="bill_no" placeholder="鍗曟嵁缂栧彿" autocomplete="off">
+            </div>
+        </div>
+        <div class="layui-inline">
+            <div class="layui-input-inline">
+                <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="mat_name" placeholder="浜у搧鍚嶇О" autocomplete="off">
+            </div>
+        </div>
+        <!-- 鏃ユ湡鑼冨洿 -->
+        <div class="layui-inline" style="width: 300px">
+            <div class="layui-input-inline">
+                <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px">
+            </div>
+        </div>
+        <!-- 寰呮坊鍔� -->
+        <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block">
+            <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>
+</fieldset>
+
+<script type="text/html" id="toolbar">
+    <div class="layui-btn-container">
+        <button class="layui-btn" id="btn-confirm" lay-event="confirm" style="">鎻愬彇</button>
+    </div>
+</script>
+
+<div class="layui-form">
+    <table class="layui-hide" id="stockOut" lay-filter="stockOut"></table>
+</div>
+
+<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>
+
+</body>
+<script>
+
+    var pageCurr;
+    function getCol() {
+        var cols = [
+            {type: 'checkbox', fixed: 'left'}
+            ,{field: 'qty', title: '閫氱煡鍑哄簱閲�', fixed: 'left', width:100}
+            ,{field: 'outQty', title: '宸插嚭搴撻噺', fixed: 'left', width:90}
+        ];
+        cols.push.apply(cols, matCols);
+        cols.push({field: 'billNo', title:'鍗曟嵁缂栧彿', align: 'center'}
+            ,{field: 'seqNo', title:'搴忓彿', align: 'center', width:80}
+            ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
+            ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'})
+        return cols;
+    }
+
+    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;
+        // 鏁版嵁娓叉煋
+        locDetlTableIns = table.render({
+            elem: '#stockOut',
+            headers: {token: localStorage.getItem('token')},
+            url: baseUrl+'/waitMatout/list/auth',
+            page: true,
+            limit: 10,
+            even: true,
+            toolbar: '#toolbar',
+            cellMinWidth: 50,
+            cols: [getCol()],
+            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;
+                // $('.layui-form-checkbox').css("pointer-events", "none");
+                // $('td[data-field="0').css("cursor", "pointer")
+            }
+        });
+
+        // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+        table.on('toolbar(stockOut)', function (obj) {
+            var checkStatus = table.checkStatus(obj.config.id);
+            var data = checkStatus.data;
+            switch(obj.event) {
+                case 'confirm':
+                    if (data.length === 0){
+                        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;
+            }
+        });
+
+        // 鎼滅储鏍忔悳绱簨浠�
+        form.on('submit(search)', function (data) {
+            pageCurr = 1;
+            tableReload();
+        });
+
+        // 鎼滅储鏍忛噸缃簨浠�
+        form.on('submit(reset)', function (data) {
+            pageCurr = 1;
+            clearFormVal($('#search-box'));
+            tableReload();
+        });
+
+        layDate.render({
+            elem: '.layui-laydate-range'
+            ,type: 'datetime'
+            ,range: true
+        });
+    })
+
+    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() {
+            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;
+                $('.layui-form-checkbox').css("pointer-events", "none");
+                $('td[data-field="0').css("cursor", "pointer")
+            }
+        });
+    }
+
+    function clearFormVal(el) {
+        $(':input', el)
+            .val('')
+            .removeAttr('checked')
+            .removeAttr('selected');
+    }
+</script>
+</html>
+

--
Gitblit v1.9.1