自动化立体仓库 - WMS系统
zhangc
2025-02-08 0379bbe120f509f8c330713958b59687d25b80b3
src/main/webapp/static/js/order/out.js
@@ -33,14 +33,16 @@
            ,{type: 'numbers', title: '#'}
            ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl', width: 160}
            ,{field: 'matnr', align: 'center',title: '物料号', width: 160}
            ,{field: 'maktx', align: 'center',title: '物料号', width: 200}
            ,{field: 'maktx', align: 'center',title: '物料名称', width: 200}
            ,{field: 'batch', align: 'center',title: '序列码'}
            ,{field: 'specs', align: 'center',title: '规格'}
            // ,{field: 'anfme', align: 'center',title: '数量'}
            // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'}
            ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'}
            ,{field: 'threeCode', align: 'center',title: '销售订单号'}
            ,{field: 'deadTime', align: 'center',title: '销售订单行号'}
            // ,{field: 'name', align: 'center',title: '名称'}
            // ,{field: 'model', align: 'center',title: '批次'}
            // ,{field: 'model', align: 'center',title: '通用型号'}
            ,{field: 'unit', align: 'center',title: '单位', hide: true}
            ,{field: 'barcode', align: 'center',title: '商品条码', hide: true}
            // ,{field: 'supplier', align: 'center',title: '供应商'}
@@ -143,6 +145,12 @@
    }
    function pakoutPreviewDialog(data) {
        for(var i=0; i<data.length; i++){
            if(!data[i].staNos){
                data[i].staNos = data[i].agvStaNos;
                data[i].staNo = data[i].agvStaNo;
            }
        }
        var tableCache;
        layer.open({
            type: 1
@@ -169,11 +177,12 @@
                        {field: 'orderNo', title: '单据编号', merge: true, align: 'center'},
                        {field: 'title', title: '商品', merge: true, align: 'center', width: 350},
                        {field: 'batch', title: '序列码', align: 'center'},
                        {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'},
                        {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'},
                        {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold', edit:true},
                        {field: 'locNo', title: '货位', align: 'center', templet: '#locNoTpl'},
                        {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'},
                        // {type: 'checkbox', merge: ['locNo']},
                    ]],
                    //cols: getCol(data),
                    done: function (res) {
                        tableMerge.render(this);
                        $('.layui-table-body.layui-table-main').css("overflow", "auto");
@@ -186,7 +195,8 @@
                    let data = tableCache[index];
                    for (let i = 0; i<tableCache.length; i++) {
                        if (tableCache[i].locNo === data.locNo) {
                            tableCache[i]['staNo'] = Number(obj.elem.value);
                            //tableCache[i]['staNo'] = Number(obj.elem.value);
                            tableCache[i]['staNo'] = obj.elem.value;
                        }
                    }
                    obj.othis.children().find("input").css("color", "blue");
@@ -231,7 +241,8 @@
                            // 确认
                            form.on('submit(staBatchSelectConfirm)', function (obj) {
                                let loadIdx = layer.load(2);
                                let batchSta = Number(obj.field.batchSta);
                                //let batchSta = Number(obj.field.batchSta);
                                let batchSta = obj.field.batchSta;
                                let arr = [];
                                for (let i = 0; i<tableCache.length; i++) {
                                    tableCache[i]['staNo'] = batchSta;
@@ -270,6 +281,13 @@
    function pakout(tableCache, layerIndex) {
        // let loadIndex = layer.load(2);
        for(var i=0; i<tableCache.length; i++){
            if(tableCache[i].agvStaNos){
                tableCache[i].agvStaNo = tableCache[i].staNo;
                tableCache[i].staNos = null;
                tableCache[i].staNo = null;
            }
        }
        notice.msg('正在生成出库任务......', {icon: 4});
        $.ajax({
            url: baseUrl + "/out/pakout/auth",
@@ -386,7 +404,7 @@
                                cols: [[
                                    {type: 'checkbox'},
                                    {field: 'matnr', title: '物料号', align: 'center', width: 350},
                                    {field: 'maktx', title: '物料号', align: 'center'},
                                    {field: 'maktx', title: '物料名称', align: 'center'},
                                    {field: 'specs', title: '规格', align: 'center'},
                                    {field: 'batch', title: '批号', align: 'center'},
                                    {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'},
@@ -439,6 +457,12 @@
    }
    function pakoutPreviewMergeDialog(data) {
        for(var i=0; i<data.length; i++){
            if(!data[i].staNos){
                data[i].staNos = data[i].agvStaNos;
                data[i].staNo = data[i].agvStaNo;
            }
        }
        var mergeTabCache;
        layer.open({
            type: 1
@@ -466,7 +490,7 @@
                        {field: 'specs', title: '规格', align: 'center'},
                        {field: 'batch', title: '序列码', align: 'center'},
                        {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'},
                        {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'},
                        {field: 'locNo', title: '货位', align: 'center', templet: '#locNoTpl'},
                        {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'},
                        // {type: 'checkbox', merge: ['locNo']},
                    ]],
@@ -482,7 +506,8 @@
                    let data = mergeTabCache[index];
                    for (let i = 0; i<mergeTabCache.length; i++) {
                        if (mergeTabCache[i].locNo === data.locNo) {
                            mergeTabCache[i]['staNo'] = Number(obj.elem.value);
                            //mergeTabCache[i]['staNo'] = Number(obj.elem.value);
                            mergeTabCache[i]['staNo'] = obj.elem.value;
                        }
                    }
                    obj.othis.children().find("input").css("color", "blue");
@@ -527,7 +552,8 @@
                            // 确认
                            form.on('submit(staBatchSelectConfirm)', function (obj) {
                                let loadIdx = layer.load(2);
                                let batchSta = Number(obj.field.batchSta);
                                //let batchSta = Number(obj.field.batchSta);
                                let batchSta = obj.field.batchSta;
                                let arr = [];
                                for (let i = 0; i<mergeTabCache.length; i++) {
                                    mergeTabCache[i]['staNo'] = batchSta;