排班计划添加校验

This commit is contained in:
yinjinlu-pc\尹金路 2023-06-25 19:33:34 +08:00
parent f7f68988f5
commit dd9ee595ea

View File

@ -437,6 +437,8 @@ export default {
this.open = false;
this.getList();
this.formLoading = false;
},err =>{
this.formLoading = false;
});
} else {
addCalplan(this.form).then(response => {
@ -462,7 +464,21 @@ export default {
let that = this;
this.$modal.confirm('是否完成计划编制?【完成后将不能更改】').then(function(){
that.form.status = 'CONFIRMED';
that.submitForm();
that.$refs["form"].validate(valid => {
if (valid) {
if (that.form.planId != null) {
updateCalplan(that.form).then(response => {
that.$modal.msgSuccess("已完成");
that.open = false;
that.getList();
that.formLoading = false;
},err =>{
that.form.status = 'PREPARE';
that.formLoading = false;
});
}
}
});
});
},
/** 导出按钮操作 */