自动化立体仓库 - WMS系统
zjj
2023-09-05 d0fa6b5d514110de8bcc672a08813151efa94fb6
src/main/webapp/static/js/picking/picking.js
@@ -1,6 +1,7 @@
var pageCurr;
var printMatCodeNos = [];
var ordernoo = "123";
var insTbCount = 0;
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"
}).use(['table','laydate', 'form', 'admin', 'layer'], function(){
@@ -30,8 +31,6 @@
            ,{align: 'center', title: '二维码', toolbar: '#operate', width: 200 , hide:true}
            ,{align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}
            ,{field: 'status$', align: 'center',title: '状态'}
            ,{field: 'owner$', align: 'center',title: '货主'}
            ,{field: 'payment$', align: 'center',title: '货物形态'}
            // ,{field: 'custName', align: 'center',title: '客户名称', width: 160}
            ,{field: 'createTime$', align: 'center',title: '操作时间'}
            ,{align: 'center', title: '操作', toolbar: '#operate'}
@@ -96,6 +95,9 @@
            case "btnPrint2":
                btnPrint2(data.wrkNo, data.docNum, 4);
                break;
            case "del":
                doDel(data.docNum);
                break;
            case "look":
                var $a = $(obj.tr).find('a[lay-event="look"]');
                var offset = $a.offset();
@@ -131,10 +133,6 @@
                                ,{field: 'matnr', align: 'center',title: '物料号'}
                                ,{field: 'maktx', align: 'center',title: '商品名称'}
                                ,{field: 'anfme', align: 'center',title: '数量'}
                                ,{field: 'owner$', align: 'center',title: '货主'}
                                ,{field: 'payment$', align: 'center',title: '货物形态'}
                                ,{field: 'owner', align: 'center',title: '货主', hide:true}
                                ,{field: 'payment', align: 'center',title: '货物形态', hide:true}
                                ,{field: 'createTime$', align: 'center',title: '操作时间'}
                                ,{field: 'count', align: 'center',title: '完成数'}
                                ,{field: 'status$', align: 'center',title: '状态'}
@@ -319,6 +317,40 @@
            })
        }
    function doDel(docNum) {
        console.log(docNum)
        layer.confirm('确定要删除吗?', {
            shade: .1,
            skin: 'layui-layer-admin'
        }, function (i) {
            layer.close(i);
            layer.load(2);
            $.ajax({
                url: baseUrl+"/pakout/delete/auth",
                headers: {'token': localStorage.getItem('token')},
                data:{
                    docNum:docNum
                },
                method: 'GET',
                success: function (res) {
                    layer.closeAll('loading');
                    if (res.code === 200){
                        if (insTbCount === 0) {
                            insTb.reload({page: {curr: 1}});
                        } else {
                            $(".layui-laypage-btn")[0].click();
                        }
                        layer.msg(res.msg, {icon: 1});
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    }else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }