自动化立体仓库 - WMS系统
mrzhssss
2022-05-27 7e45c420dd19a3ffe224e9cd42bf7ea31277d7be
Merge remote-tracking branch 'origin/jkasrs' into jkasrs
2个文件已修改
70 ■■■■ 已修改文件
src/main/webapp/static/js/order/out.js 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/order/out.html 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/out.js
@@ -137,13 +137,13 @@
                        ,offset: '100px'
                        ,area: ['1200px', '700px']
                        ,shade: 0.5
                        ,shadeClose: true
                        ,shadeClose: false
                        ,btn: ['立即出库', '稍后处理']
                        ,btnAlign: 'c'
                        ,moveType: 1 //拖拽模式,0或者1
                        ,content: $('#pakoutPreviewBox').html()
                        ,success: function(layero, index){
                            table.render({
                            stoPreTabIdx = table.render({
                                elem: '#stoPreTab',
                                data: res.data,
                                height: 520,
@@ -182,18 +182,54 @@
                            // 批量修改出库站
                            form.on('submit(batchModifySta)', function () {
                                let stoPreTabData = layui.table.checkStatus('stoPreTab').data;
                                console.log(stoPreTabData)
                                if (stoPreTabData.length < 1) {
                                    layer.msg("请至少选择一条以上合并数据", {icon: 7});
                                    return false;
                                }
                                modifySta(stoPreTabData.map(function (d) {
                                    return d.id;
                                }));
                                modifySta(stoPreTabData);
                            });
                            // 批量修改出库站 - 站点选择
                            function modifySta(data) {
                            function modifySta(stoPreTabData) {
                                // 出库站取交集
                                let staBatchSelectVal = [];
                                for(let i = 0; i<stoPreTabData.length; i++) {
                                    if (i === 0) {
                                        staBatchSelectVal = stoPreTabData[i].staNos;
                                    } else {
                                        let staNos = stoPreTabData[i].staNos;
                                        staBatchSelectVal = staBatchSelectVal.filter( val => {
                                                return new Set(staNos).has(val)
                                            }
                                        )
                                    }
                                }
                                admin.open({
                                    type: 1,
                                    area: '300px',
                                    offset: 'auto',
                                    title: '请选择站点',
                                    content: $('#staBatchSelectDialog').html(),
                                    success: function (layero, dIndex) {
                                        // 渲染下拉框
                                        let template = Handlebars.compile($('#batchStaSelectTpl').html());
                                        $('#batchSelectStaBox').html(template({list: staBatchSelectVal}));
                                        // 确认
                                        form.on('submit(staBatchSelectConfirm)', function (obj) {
                                            obj.field;
                                            for (let i = 0; i<tableCache.length; i++) {
                                                // if (tableCache[i].locNo === data.locNo) {
                                                tableCache[i]['staNo'] = Number(181);
                                                // }
                                            }
                                            $('.order-sta-select').val(181);
                                            stoPreTabIdx.reload({data: tableCache})
                                            return false;
                                        });
                                        // 弹窗不出现滚动条
                                        $(layero).children('.layui-layer-content').css('overflow', 'visible');
                                        layui.form.render('select');
                                    },
                                })
                            }
                        }
src/main/webapp/views/order/out.html
@@ -167,7 +167,7 @@
<script type="text/html" id="tbBasicTbStaNos">
    <div class="ew-select-fixed">
        <select lay-filter="tbBasicTbStaNos">
        <select class="order-sta-select" lay-filter="tbBasicTbStaNos">
            {{#if (d.staNos!=null) {}}
                {{# for(let i=0; i<d.staNos.length; i++) { }}
                    <option value="{{d.staNos[i]}}">{{d.staNos[i]}}</option>
@@ -175,6 +175,14 @@
            {{# } }}
        </select>
    </div>
</script>
<script type="text/html" id="staBatchSelectDialog">
    <form class="layui-form" style="padding: 25px 50px 30px 50px;text-align: center">
        <select id="batchSelectStaBox" name="batchSta" lay-vertype="tips" lay-verify="required" required="">
        </select>
        <button style="margin-top: 30px" class="layui-btn" lay-filter="staBatchSelectConfirm" lay-submit="">确定</button>
    </form>
</script>
<script type="text/html" id="locNoTpl">
@@ -283,5 +291,13 @@
</script>
</body>
<script type="text/template" id="batchStaSelectTpl">
    <option value="">选择出库站</option>
    {{#each list}}
    <option value="{{this}}">{{this}}</option>
    {{/each}}
</script>
</html>