From 2ae615304625d58c4bdb29a752a5b47fceb02c4e Mon Sep 17 00:00:00 2001 From: "JinLu.Yin" <411641505@qq.com> Date: Thu, 1 Sep 2022 23:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=82=B9=E6=A3=80=E4=BF=9D?= =?UTF-8?q?=E5=85=BB=E8=AE=A1=E5=88=92=E6=96=B0=E5=A2=9E=EF=BC=8C=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=94=9F=E6=88=90=E6=8C=89=E9=92=AE=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/dv/checkplan/index.vue | 15 ++++++++++----- src/views/mes/dv/checkplan/machinery.vue | 1 - 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/views/mes/dv/checkplan/index.vue b/src/views/mes/dv/checkplan/index.vue index 08573ee..a0fb0d3 100644 --- a/src/views/mes/dv/checkplan/index.vue +++ b/src/views/mes/dv/checkplan/index.vue @@ -386,6 +386,7 @@ export default { updateBy: null, updateTime: null }; + this.autoGenFlag = false; this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -408,7 +409,7 @@ export default { handleAdd() { this.reset(); this.open = true; - this.title = "添加设备点检计划头"; + this.title = "添加计划"; this.optType = "add"; }, // 查询明细按钮操作 @@ -429,7 +430,7 @@ export default { getCheckplan(planId).then(response => { this.form = response.data; this.open = true; - this.title = "修改设备点检计划头"; + this.title = "修改计划"; this.optType = "edit"; }); }, @@ -456,27 +457,31 @@ export default { handleFinish(){ if(this.form.planId != null && this.form.status =='PREPARE'){ this.form.status='FINISHED'; - updateCheckplan(this.form).then(response => { + updateCheckplan(this.form).then(response => { this.$modal.msgSuccess("已启用"); this.open = false; this.getList(); + },err =>{ + this.form.status='PREPARE'; }); } }, handleDeFinish(){ if(this.form.planId != null && this.form.status =='FINISHED'){ this.form.status='PREPARE'; - updateCheckplan(this.form).then(response => { + updateCheckplan(this.form).then(response => { this.$modal.msgSuccess("已停用"); this.open = false; this.getList(); + },err =>{ + this.form.status='FINISHED'; }); } }, /** 删除按钮操作 */ handleDelete(row) { const planIds = row.planId || this.ids; - this.$modal.confirm('是否确认删除设备点检计划头编号为"' + planIds + '"的数据项?').then(function() { + this.$modal.confirm('是否确认删除计划编号为"' + planIds + '"的数据项?').then(function() { return delCheckplan(planIds); }).then(() => { this.getList(); diff --git a/src/views/mes/dv/checkplan/machinery.vue b/src/views/mes/dv/checkplan/machinery.vue index 8407d40..4dde239 100644 --- a/src/views/mes/dv/checkplan/machinery.vue +++ b/src/views/mes/dv/checkplan/machinery.vue @@ -129,7 +129,6 @@ export default { }, //设备资源选择回调 onMachineryAdd(rows){ - debugger; if(rows !=null && rows.length >0){ rows.forEach(row => { row.planId = this.planId;