From dd9ee595ea6ceec372bd5df6cfbbcdc75c241a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?yinjinlu-pc=5C=E5=B0=B9=E9=87=91=E8=B7=AF?= <411641505@qq.com> Date: Sun, 25 Jun 2023 19:33:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E7=8F=AD=E8=AE=A1=E5=88=92=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/cal/plan/index.vue | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/views/mes/cal/plan/index.vue b/src/views/mes/cal/plan/index.vue index 83eff09..8c60345 100644 --- a/src/views/mes/cal/plan/index.vue +++ b/src/views/mes/cal/plan/index.vue @@ -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; + }); + } + } + }); }); }, /** 导出按钮操作 */