自动化立体仓库 - WMS系统
#
Junjie
2025-08-12 fff32dc747a54cfa796c3ebde3334d54c7a827a3
src/main/webapp/static/js/orderPakout/out.js
@@ -117,7 +117,6 @@
    /* 表格2头工具栏点击事件 */
    table.on('toolbar(orderDetlTable)', function (obj) {
        var checkStatus = table.checkStatus(obj.config.id).data;
        if (obj.event === 'pakoutPreview') { // 添加
            if (checkStatus.length === 0) {
@@ -137,8 +136,41 @@
                return d.id;
            });
            doDelSensor({ids: ids});
        } else if (obj.event === 'restartSync') {
            restartSyncOrder(checkStatus.map(function (d) {
                return d.id;
            }))
        }
    });
    function restartSyncOrder(ids) {
        layer.confirm('确定要重新同步该订单数据吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {
            layer.close(i);
            var loadIndex = layer.load(2);
            $.ajax({
                url: baseUrl+"/order/restartSyncOrder",
                headers: {'token': localStorage.getItem('token')},
                contentType: 'application/json;charset=UTF-8',
                data: JSON.stringify(ids),
                method: 'POST',
                success: function (res) {
                    layer.close(loadIndex);
                    if (res.code === 200){
                        layer.msg(res.msg, {icon: 1});
                        $(".layui-laypage-btn")[0].click();
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    }else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
    /* 表格2工具条点击事件 */
    table.on('tool(orderDetlTable)', function (obj) {
@@ -158,7 +190,10 @@
            url: baseUrl + "/out/pakout/preview/auth",
            headers: {'token': localStorage.getItem('token')},
            contentType: 'application/json;charset=UTF-8',
            data: JSON.stringify(ids),
            data: JSON.stringify({
                ids: ids,
                cstateid: $("#defaultCstateid").val()
            }),
            method: 'POST',
            success: function (res) {
                layer.close(loadIndex);
@@ -189,6 +224,8 @@
                                    {field: 'orderNo', title: '单据编号', merge: true, align: 'center'},
                                    {field: 'title', title: '商品', merge: true, align: 'center', width: 350},
                                    {field: 'batch', title: '批次', align: 'center'},
                                    {field: 'initialWeight', title: '原托盘辅数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    {field: 'initialAnfme', title: '原托盘数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    {field: 'anfme', title: '主数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    {field: 'weight', title: '辅数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                    {field: 'unit', align: 'center',title: '单位'},
@@ -391,8 +428,6 @@
            $("#defaultOutSta").html(res.data)
        } else if (res.code === 403){
            top.location.href = baseUrl+"/";
        } else {
            layer.msg(res.msg, {icon: 2})
        }
    }
})