自动化立体仓库 - WMS系统
dubin
昨天 be554d9e52799a0ee14c98b0959d07ab3847c8e6
src/main/webapp/static/js/barcodeMatnr/barcodeMatnr.js
@@ -37,7 +37,7 @@
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/barcodeMatnr/list/auth',
        page: true,
        limit: 16,
        limit: 30,
        limits: [16, 30, 50, 100, 200, 500],
        even: true,
        toolbar: '#toolbar',
@@ -144,31 +144,60 @@
                    }
                });
                break;
            // case 'deleteData':
            //     layer.open({
            //         type: 2,
            //         title: '组托',
            //         maxmin: true,
            //         area: [top.detailWidth, top.detailHeight],
            //         content: 'barcodeMatnr_comb.html',
            //         success: function(layero, index){
            //             layer.getChildFrame('#data-detail-submit-edit', index).hide();
            //             clearFormVal(layer.getChildFrame('#detail', index));
            //             layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
            //         }
            //     });
            //     break;
            case 'deleteData':
                var data = checkStatus.data;
                if (data.length === 0){
                    layer.msg('请选择数据');
                if (checkStatus.data.length === 0){
                    layer.msg('请至少选择一条数据', {icon: 2});
                } else {
                    layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){
                    layer.confirm('确定组托吗', function(){
                        $.ajax({
                            url: baseUrl+"/waitPakin/delete/auth",
                            url: baseUrl+"/barcodeMatnr/matnrAndBarcode",
                            headers: {'token': localStorage.getItem('token')},
                            data: {param: JSON.stringify(data)},
                            data: JSON.stringify(checkStatus.data),
                            contentType:'application/json;charset=UTF-8',
                            method: 'POST',
                            traditional:true,
                            success: function (res) {
                                if (res.code === 200){
                                    layer.closeAll();
                                    tableReload(false);
                                    layer.msg(res.msg, {icon: 1})
                                } else if (res.code === 403){
                                    top.location.href = baseUrl+"/";
                                } else {
                                    layer.msg(res.msg)
                                    layer.msg(res.msg, {icon: 2})
                                }
                            }
                        })
                    });
                }
                break;
            case 'clampData':
                layer.open({
                    type: 2,
                    title: '并板',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    content: 'barcodeMatnr_clamp.html',
                    success: function(layero, index){
                        layer.getChildFrame('#data-detail-submit-edit', index).hide();
                        clearFormVal(layer.getChildFrame('#detail', index));
                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                    }
                });
                break;
            case 'exportData':
                layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){
@@ -338,6 +367,22 @@
        method("add");
    });
    form.on('submit(save1)', function () {
        if (banMsg != null){
            layer.msg(banMsg);
            return;
        }
        method("add1");
    });
    form.on('submit(save2)', function () {
        if (banMsg != null){
            layer.msg(banMsg);
            return;
        }
        method("add2");
    });
    // 数据修改动作
    form.on('submit(edit)', function () {
        method("update")
@@ -364,7 +409,7 @@
        };
        $.ajax({
            url: baseUrl+"/waitPakin/"+name+"/auth",
            url: baseUrl+"/barcodeMatnr/"+name+"/auth",
            headers: {'token': localStorage.getItem('token')},
            data: top.reObject(data),
            method: 'POST',