1.修复禅道bug

fencang
x_z 3 years ago
parent a4c9a80ed5
commit 689604a29b

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

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

Loading…
Cancel
Save