Commit 4e333334 by hulei

保存按钮增加校验信息回显

parent 87956aa6
......@@ -12,12 +12,15 @@ export default {
type: "success",
});
this.$router.history.push("/business/trnrel");
} else {
} else{
this.$notify({
title: "失败",
message: "保存失败",
type: "error",
});
if(Object.keys(result.fieldErrors).length > 0 ){
this.$notify.error({ title: "错误", message: result.respMsg });
}
}
},
// 表单暂存
......@@ -41,9 +44,7 @@ export default {
// 表单校验
async handleCheck() {
let result = await this.checkAll();
if (result.respCode != SUCCESS && Object.keys(result.fieldErrors).length == 0) {
this.$notify.error({ title: "错误", message: result.respMsg });
} else {
if (result.respCode == SUCCESS && Object.keys(result.fieldErrors).length == 0) {
// 清除之前的校验状态
this.$refs.modelForm.clearValidate();
const fields = this.$refs.modelForm.fields;
......@@ -55,6 +56,8 @@ export default {
// tab切换之后,需出发tab-click的事件
this.tabClick(tab);
}
} else {
this.$notify.error({ title: "错误", message: result.respMsg });
}
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment