From c76332c59f267664095cf7382fb9f1097770b78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com> Date: Mon, 28 Apr 2025 15:48:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E5=A2=9E=E5=8A=A0=E5=BF=85?= =?UTF-8?q?=E5=A1=AB=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/order/repair-action.vue | 38 +++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/src/views/order/repair-action.vue b/src/views/order/repair-action.vue index cfc3b79..af4175d 100644 --- a/src/views/order/repair-action.vue +++ b/src/views/order/repair-action.vue @@ -82,7 +82,7 @@ - 不良现象 + 不良现象
@@ -98,7 +98,7 @@
- 现场步骤分析 + 现场步骤分析
@@ -124,11 +124,6 @@ - - -
@@ -164,7 +159,6 @@ m_ascription:1, // 1 旧部件 2 新部件 part_mpn: "", part_sn: "", - sla: "", sla_non_compliance_reason: "", confirmed_defects: "", analysis_steps: "", @@ -174,7 +168,6 @@ m_ascription:2, part_mpn: "", part_sn: "", - sla: "", sla_non_compliance_reason: "", confirmed_defects: "", analysis_steps: "", @@ -228,7 +221,6 @@ m_ascription:2, part_mpn: "", part_sn: "", - sla: "", sla_non_compliance_reason: "", confirmed_defects: "", analysis_steps: "", @@ -258,15 +250,26 @@ if (item.repair_action === 3) { delete item.part_mpn delete item.part_sn - delete item.sla delete item.confirmed_defects delete item.sla_non_compliance_reason delete item.analysis_steps } }); + const row = data.repair_info.find(em=>em.m_ascription === 1); + if(row && row.repair_action===1){ + if(row.confirmed_defects == ''){ + this.$message.warning('不良现象不能为空'); + return + } + if(row.analysis_steps == ''){ + this.$message.warning('现场步骤分析不能为空'); + return + } + } const res = await this.$API.orders.order.repair.submit.post(data); if (res.code === 200) { - this.$message.success('操作成功') + this.$message.success('操作成功'); + await this.getInfo(); } }, @@ -312,6 +315,17 @@ display: inline-block; margin-bottom: 6px; } + .required{ + position: relative; + padding-left: 10px; + } + .required:after{ + content: "*"; + position: absolute; + left: 0; + top: 0; + color: var(--el-color-danger); + } } .btnBox {