自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-13 f517c3f941d7c7e40b8d6dadc02fea97fa440fd1
src/main/webapp/static/js/locMast/locMast.js
@@ -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){