From f5e6ac77d320bd5f9a69008f1563a568d384c4e9 Mon Sep 17 00:00:00 2001 From: zhangdi <15053473693@163.com> Date: Thu, 5 Feb 2026 14:48:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=B6=E4=BB=B6=E4=BF=A1=E6=81=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processMainte/dsPartBasicInfo.vue | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/views/processManagement/components/processMainte/dsPartBasicInfo.vue b/src/views/processManagement/components/processMainte/dsPartBasicInfo.vue index c7bc3ed..97d0bf1 100644 --- a/src/views/processManagement/components/processMainte/dsPartBasicInfo.vue +++ b/src/views/processManagement/components/processMainte/dsPartBasicInfo.vue @@ -176,7 +176,7 @@ - + {{ formData.craftWay }} @@ -698,7 +698,26 @@ export default { } } } - + // 🔴 新增:子件面积校验 + for (const item of this.data) { + // 1. 面积不能为空 + if (item.area === null || item.area === undefined || item.area === '') { + this.$message.warning(`子件【${item.partName}】的面积不能为空`); + this.submitLoading = false; + return; + } + + // 2. 非壳体子件,面积不能大于 1 + if (item.sinTerType !== 2) { + const areaValue = parseFloat(item.area); + if (isNaN(areaValue) || areaValue > 1) { + this.$message.warning(`子件【${item.partName}】非壳体类型,面积不能大于1`); + this.submitLoading = false; + return; + } + } + } + this.formData.childPage = this.childPage; this.formData.psId = this.psId;