自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-06-27 699427dd62027a8a1b1e7326a53700fa92230179
#
2个文件已修改
85 ■■■■■ 已修改文件
src/main/webapp/static/js/order/out.js 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/order/out.html 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/out.js
@@ -4,7 +4,7 @@
    base: baseUrl + "/static/layui/lay/modules/"
}).extend({
    notice: 'notice/notice',
}).use(['table','laydate', 'form', 'util', 'admin', 'notice', 'treeTable', 'xmSelect', 'tableMerge'], function(){
}).use(['table','laydate', 'form', 'util', 'admin', 'notice', 'treeTable', 'xmSelect', 'tableMerge', 'tableX'], function(){
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
@@ -16,6 +16,7 @@
    var treeTable = layui.treeTable;
    var xmSelect = layui.xmSelect;
    var tableMerge = layui.tableMerge;
    var tableX = layui.tableX;
    insTb2 = table.render({
        elem: '#orderDetlTable',
@@ -26,6 +27,7 @@
        limits: [15, 30, 50, 100, 200, 500],
        toolbar: '#orderDetToolbar',
        height: 'full-120',
        where: {order_id: 9999999999},
        cols: [[
            {type: 'checkbox'}
            ,{type: 'numbers', title: '#'}
@@ -77,6 +79,7 @@
            limit();
        }
    });
    /* 表格2搜索 */
    form.on('submit(sensorTbSearch)', function (data) {
        insTb2.reload({where: data.field, page: {curr: 1}});
@@ -85,6 +88,7 @@
    /* 表格2头工具栏点击事件 */
    table.on('toolbar(orderDetlTable)', function (obj) {
        var checkStatus = table.checkStatus(obj.config.id).data;
        if (obj.event === 'pakoutPreview') { // 添加
            if (checkStatus.length === 0) {
@@ -158,7 +162,7 @@
                                    {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'},
                                    {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'},
                                    {type: 'checkbox', merge: ['locNo']},
                                    // {type: 'checkbox', merge: ['locNo']},
                                ]],
                                done: function (res) {
                                    tableMerge.render(this);
@@ -180,19 +184,14 @@
                            });
                            // 批量修改出库站
                            form.on('submit(batchModifySta)', function () {
                                let stoPreTabData = layui.table.checkStatus('stoPreTab').data;
                                if (stoPreTabData.length < 1) {
                                    layer.msg("请至少选择一条以上合并数据", {icon: 7});
                                    return false;
                                }
                                modifySta(stoPreTabData);
                                modifySta();
                            });
                            // 批量修改出库站 - 站点选择
                            function modifySta(stoPreTabData) {
                            function modifySta() {
                                // 出库站取交集
                                let staBatchSelectVal = [];
                                for(let i = 0; i<stoPreTabData.length; i++) {
                                    let staNos = stoPreTabData[i].staNos;
                                for(let i = 0; i<tableCache.length; i++) {
                                    let staNos = tableCache[i].staNos;
                                    if (staNos !== null) {
                                        if (staBatchSelectVal.length === 0) {
                                            staBatchSelectVal = staNos;
@@ -224,15 +223,9 @@
                                            let loadIdx = layer.load(2);
                                            let batchSta = Number(obj.field.batchSta);
                                            let arr = [];
                                            for (let j = 0; j<stoPreTabData.length; j++) {
                                                for (let i = 0; i<tableCache.length; i++) {
                                                    if (tableCache[i].orderNo === stoPreTabData[j].orderNo
                                                        && tableCache[i].matnr === stoPreTabData[j].matnr
                                                        && tableCache[i].locNo === stoPreTabData[j].locNo) {
                                                        tableCache[i]['staNo'] = batchSta;
                                                        arr.push(i);
                                                    }
                                                }
                                            for (let i = 0; i<tableCache.length; i++) {
                                                tableCache[i]['staNo'] = batchSta;
                                                arr.push(i);
                                            }
                                            stoPreTabIdx.reload({data: tableCache});
                                            arr.forEach(item => {
@@ -338,6 +331,8 @@
        })
    })
    window.pakoutPreview = pakoutPreview;
});
function tableReload(child) {
@@ -353,3 +348,25 @@
    });
}
/**
 * 一键出库
 */
function autoOut(orderId) {
    let loadIndex = layer.msg('请求中...', {icon: 16, shade: 0.01, time: false});
    $.ajax({
        url: baseUrl + "/out/pakout/orderDetlIds/auth",
        headers: {'token': localStorage.getItem('token')},
        data: { orderId : orderId },
        method: 'POST',
        success: function (res) {
            layer.close(loadIndex);
            if (res.code === 200){
                pakoutPreview(res.data);
            } else if (res.code === 403){
                top.location.href = baseUrl+"/";
            } else {
                layer.msg(res.msg, {icon: 2});
            }
        }
    })
}
src/main/webapp/views/order/out.html
@@ -112,16 +112,16 @@
                                    <input name="batch" class="layui-input" placeholder="序列码"/>
                                </div>
                            </div>
<!--                            <div class="layui-inline">-->
<!--                                <label class="layui-form-label">状态:</label>-->
<!--                                <div class="layui-input-inline">-->
<!--                                    <select name="isOnline">-->
<!--                                        <option value="1">充电中</option>-->
<!--                                        <option value="1">充电中</option>-->
<!--                                        <option value="0">不在充电</option>-->
<!--                                    </select>-->
<!--                                </div>-->
<!--                            </div>-->
                            <!--                            <div class="layui-inline">-->
                            <!--                                <label class="layui-form-label">状态:</label>-->
                            <!--                                <div class="layui-input-inline">-->
                            <!--                                    <select name="isOnline">-->
                            <!--                                        <option value="1">充电中</option>-->
                            <!--                                        <option value="1">充电中</option>-->
                            <!--                                        <option value="0">不在充电</option>-->
                            <!--                                    </select>-->
                            <!--                                </div>-->
                            <!--                            </div>-->
                            <div class="layui-inline">&emsp;
                                <button class="layui-btn icon-btn" lay-filter="sensorTbSearch" lay-submit>
                                    <i class="layui-icon">&#xe615;</i>搜索
@@ -187,10 +187,10 @@
<script type="text/html" id="locNoTpl">
    <span name="locNo"
    {{# if( d.lack === false){ }}
    class="layui-badge layui-badge-green" >{{d.locNo}}</span>
        {{# } else { }}
        class="layui-badge layui-badge-red" >库存不足</span>
          {{# if( d.lack === false){ }}
          class="layui-badge layui-badge-green" >{{d.locNo}}</span>
    {{# } else { }}
    class="layui-badge layui-badge-red" >库存不足</span>
    {{# } }}
</script>