自动化立体仓库 - WMS系统
pang.jiabao
2025-10-23 0916bb4ea987c0599b6af6bb8dd251a071770e05
src/main/webapp/views/pla/locDetlQuery.html
@@ -57,9 +57,10 @@
    <!-- 搜索栏 -->
    <div id="search-box">
        <div class="layui-form layui-card-header">
            <div class="layui-inline">
            <div class="layui-inline" style="width: 270px">
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="batch" placeholder="批号" autocomplete="off">
                    <div id="mat" name="mat">
                    </div>
                </div>
            </div>
            <div class="layui-inline">
@@ -94,6 +95,15 @@
                        <option value="待出库">待出库</option>
                        <option value="部分出库">部分出库</option>
                        <option value="全部出库">全部出库</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <select name="stock_freeze">
                        <option value="">是否冻结</option>
                        <option value="0">是</option>
                        <option value="1">否</option>
                    </select>
                </div>
            </div>
@@ -228,7 +238,12 @@
<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/html" id="stockFreezeTpl">
    {{# if(d.stockFreeze == 0) { }}
    <span style="color:#34a8de;">冻结</span>
    {{# } else { }}
    <span style="color:#0c0c0c;">未冻结</span>
    {{# } }}</script>
</body>
<script>
@@ -238,7 +253,7 @@
    layui.config({
        base: baseUrl + "/static/layui/lay/modules/"
    }).use(['table','laydate', 'form', 'admin', 'tableMerge'], function() {
    }).use(['table','laydate', 'form', 'admin', 'tableMerge', 'xmSelect'], function() {
        var table = layui.table;
        var $ = layui.jquery;
        var layer = layui.layer;
@@ -260,12 +275,12 @@
            url: baseUrl+'/pla/list/auth?step=2',
            page: true,
            totalRow: true, // 开启合计行
            height: function(){
                var otherHeight = $('.function-area').outerHeight() + $('#search-box').outerHeight(); // 自定义其他区域的高度
                console.log($(window).height() - otherHeight);
                return $(window).height() - otherHeight - 100; // 返回 number 类型
            },
            //height: 'full',
            // height: function(){
            //     var otherHeight = $('.function-area').outerHeight() + $('#search-box').outerHeight(); // 自定义其他区域的高度
            //     console.log($(window).height() - otherHeight);
            //     return $(window).height() - otherHeight - 100; // 返回 number 类型
            // },
            height: '500',
            limit: 500,
            limits: [500,1000],
            even: true,
@@ -339,6 +354,36 @@
            }
        });
        // 渲染物料选择
        var matXmSelect = xmSelect.render({
            el: '#mat',
            style: {
                width: '270px',
            },
            autoRow: true,
            toolbar: { show: true },
            filterable: true,
            remoteSearch: true,
            remoteMethod: function(val, cb, show){
                $.ajax({
                    url: baseUrl+"/pla/batch/all/get/kv",
                    headers: {'token': localStorage.getItem('token')},
                    data: {
                        condition: val
                    },
                    method: 'POST',
                    success: function (res) {
                        if (res.code === 200){
                            cb(res.data)
                        } else {
                            cb([]);
                            layer.msg(res.msg, {icon: 2});
                        }
                    }
                });
            }
        })
        // 监听头工具栏事件
        table.on('toolbar(stockOut)', function (obj) {
            var checkStatus = table.checkStatus(obj.config.id);
@@ -371,6 +416,10 @@
        $.each($('#search-box [name]').serializeArray(), function() {
            searchData[this.name] = this.value;
        });
        if(searchData.select){
            searchData.batch = searchData.select;
            searchData.select = null;
        }
        locDetlTableIns.reload({
            where: searchData,
        });