自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-19 0976fe8b38980ae61957b76dccac40e0f9674bd6
#
4个文件已修改
66 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/LocMastController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/entity/Parameter.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locMast/locMast.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocMastController.java
@@ -13,6 +13,7 @@
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.entity.param.LocMastInitParam;
import com.zy.asrs.service.LocMastService;
import com.zy.common.entity.Parameter;
import com.zy.common.model.Shelves;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
@@ -26,6 +27,14 @@
    @Autowired
    private LocMastService locMastService;
    @RequestMapping(value = "/locMast/init/pwd")
    public R locMastInitPwd(@RequestParam(required = false) String pwd) {
        if (Cools.isEmpty(pwd)) {
            return R.error("请输入口令");
        }
        return R.ok().add(Parameter.get().getLocMastInitPwd().equals(pwd));
    }
    @RequestMapping(value = "/locMast/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") String id) {
src/main/java/com/zy/common/entity/Parameter.java
@@ -59,4 +59,15 @@
    public void setCodeSwitch(String codeSwitch) {
        this.codeSwitch = codeSwitch;
    }
    // 库位初始化口令
    private String locMastInitPwd;
    public String getLocMastInitPwd() {
        return locMastInitPwd;
    }
    public void setLocMastInitPwd(String locMastInitPwd) {
        this.locMastInitPwd = locMastInitPwd;
    }
}
src/main/webapp/static/js/common.js
@@ -104,11 +104,17 @@
                url: url,
                data: data,
                dataType: 'json',
                header: {'Content-Type': 'application/json'},
                header: {'token': localStorage.getItem('token')},
                timeout: 10000,
                cache: false,
                success: function (result) {
                    callback(result);
                success: function (res) {
                    if (res.code === 200){
                        callback(res);
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    }  else {
                        layer.msg(res.msg);
                    }
                },
                error: function (res, type) {
src/main/webapp/static/js/locMast/locMast.js
@@ -204,22 +204,25 @@
                break;
            case "init":
                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) {
                    http.get(baseUrl+"/locMast/init/pwd", {pwd: pass}, function (res) {
                        if (res.data) {
                            layer.open({
                                type: 1,
                                title: '初始化库位',
                                area: ["400px"],
                                maxmin: true,
                                shadeClose: true,
                                content: $("#resetLocDiv"),
                                success: function (layero, index) {
                            }
                        })
                    } else {
                        layer.msg("口令错误");
                    }
                    layer.close(idx);
                                }
                            })
                        } else {
                            layer.msg("口令错误");
                        }
                        layer.close(idx);
                    })
                });
                break;
        }
@@ -430,6 +433,7 @@
                if (res.code === 200){
                    layer.msg(res.msg);
                    layer.closeAll();
                    tableReload(false);
                } else if (res.code === 403){
                    parent.location.href = "/";
                }else {