1.修复禅道bug

fencang
x_z 3 years ago
parent a4c9a80ed5
commit 689604a29b

@ -1,11 +1,10 @@
//封装字符串相关的方法
export function isBlank(value) {
if (value === "" || value === null) {
if (value === "" || value === null || value === undefined) {
return true;
}
value = value.trim();
if (value === "string" || value === "undefined") {
if ("" === value || value === "string" || value === "undefined") {
return true;
}
}

@ -719,7 +719,7 @@ export default {
configParms: {},
subData: {},
subFromName: "add",
currentCode: null
};
},
methods: {
@ -763,6 +763,7 @@ export default {
//
this.formVisible = false;
this.subFormVisible = false;
this.loadSubData(this.currentCode);
return true;
},
//
@ -828,10 +829,14 @@ export default {
this.$refs["dataForm"].validate((valid) => {
if (valid) {
if (this.formData.pcode == null && this.formData.level != 1) {
if (isBlank(this.formData.pcode) && this.formData.level != 1) {
this.$message.warning("上级仓库不能为空");
return;
}
if (isBlank(this.formData.name)) {
this.$message.warning("仓库名称不能为空");
return;
}
this.formLoading = true;
let data = Object.assign({}, this.formData);
saveWarehouse(data, this.formName)
@ -1061,6 +1066,7 @@ export default {
this.subList = [];
this.userList = null;
this.bussinessTypeList = null;
this.currentCode = row.code;
this.loadSubData(row.code);
},

Loading…
Cancel
Save