自动化立体仓库 - WMS系统
lty
2025-05-05 ce0fcdaf2629e5b6ebef0f206b16ecad103e5c1e
src/main/webapp/static/js/staDesc/staDesc.js
@@ -208,9 +208,53 @@
                    });
                });
                break;
            case 'init':
                layer.prompt({title: '请输入口令,并初始化站点', formType: 1,   shadeClose: true}, function(pass, idx){
                    http.get(baseUrl+"/locMast/init/pwd", {pwd: pass}, function (res) {
                        if (res.data) {
                            layer.open({
                                type: 1,
                                title: '初始化站点',
                                area: ["500px"],
                                maxmin: true,
                                shadeClose: true,
                                content: $("#resetLocDiv"),
                                success: function (layero, index) {
                                }
                            })
                        } else {
                            layer.msg("口令错误");
                        }
                        layer.close(idx);
                    })
                });
                break;
        }
    });
    // 初始化保存
    form.on('submit(initDo)', function (data) {
        $.ajax({
            url: baseUrl+"/staDesc/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();
                    tableReload(false);
                } else if (res.code === 403){
                    parent.location.href = "/";
                }else {
                    layer.msg(res.msg)
                }
            }
        })
    });
    // 监听行工具事件
    table.on('tool(staDesc)', function(obj){
        var data = obj.data;