自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-17 46a47d147ca58b48b83a2df50926f5fd2bab3f0c
src/main/webapp/static/js/locMast/locMast.js
@@ -53,7 +53,7 @@
            // ,{field: 'PdcType', align: 'center',title: ''}
            // ,{field: 'ctnNo', align: 'center',title: ''}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:100}
        ]],
        request: {
            pageName: 'curr',
@@ -164,7 +164,7 @@
                }
                break;
            case 'exportData':
                layer.confirm('确定导出Excel吗', function(){
                layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){
                    var titles=[];
                    var fields=[];
                    obj.config.cols[0].map(function (col) {
@@ -202,35 +202,24 @@
                });
                break;
            case "init":
                layer.open({
                    type: 1,
                    title: '初始化库位',
                    maxmin: true,
                    area: ["400px"],
                    shadeClose: true,
                    content: $("#resetLocDiv"),
                    success: function (layero, index) {
                layer.prompt({title: '请输入口令,并重置库位', formType: 1,   shadeClose: true}, function(pass, idx){
                    if (pass === "123456") {
                        layer.open({
                            type: 1,
                            title: '初始化库位',
                            area: ["400px"],
                            maxmin: true,
                            shadeClose: true,
                            content: $("#resetLocDiv"),
                            success: function (layero, index) {
                            }
                        })
                    } else {
                        layer.msg("口令错误");
                    }
                })
                // layer.prompt({title: '请输入口令,并重置库位', formType: 1,   shadeClose: true}, function(pass, idx){
                //     if (pass === "123456") {
                //         layer.open({
                //             type: 1,
                //             title: '初始化库位',
                //             maxmin: true,
                //             shadeClose: true,
                //             content: $("#resetLocDiv"),
                //             success: function (layero, index) {
                //
                //             }
                //         })
                //     } else {
                //         layer.msg("口令错误");
                //     }
                //     layer.close(idx);
                //     doSwitch(0, pass); // 停止wcs系统
                // });
                    layer.close(idx);
                });
                break;
        }
    });
@@ -428,6 +417,27 @@
        }
    });
    // 初始化保存
    form.on('submit(initDo)', function (data) {
        $.ajax({
            url: baseUrl+"/locMast/init/auth",
            headers: {'token': localStorage.getItem('token')},
            data: data.field,
            method: 'POST',
            async: false,
            success: function (res) {
                if (res.code === 200){
                    layer.msg(res.msg);
                    layer.closeAll();
                } else if (res.code === 403){
                    parent.location.href = "/";
                }else {
                    layer.msg(res.msg)
                }
            }
        })
    });
    // 数据保存动作
    form.on('submit(save)', function () {
        if (banMsg != null){