From 9721d699748de08338042060e602100936a1fd91 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Fri, 6 Jun 2025 11:29:55 +0800 Subject: [PATCH] =?UTF-8?q?2025-06-05=201=E3=80=81=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=80=BC=E6=B2=A1=E5=A1=AB=E5=86=99=E6=97=B6=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E8=AE=A9=E4=BF=9D=E5=AD=98=202=E3=80=81=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E4=B8=BA=E4=BB=80=E4=B9=88=E4=BC=9A=E6=9C=89=E9=BB=98=E8=AE=A4?= =?UTF-8?q?0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectInfo/com_project_info_part.vue | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/views/modules/project/projectInfo/com_project_info_part.vue b/src/views/modules/project/projectInfo/com_project_info_part.vue index b91cd26..89bbfc8 100644 --- a/src/views/modules/project/projectInfo/com_project_info_part.vue +++ b/src/views/modules/project/projectInfo/com_project_info_part.vue @@ -449,7 +449,11 @@ border @selection-change="itemSelectionChange" style="width: 100%"> - + + 0 + && this.partItemList.some(item => { + const emptyText = [null, undefined, ''].includes(item.textValue) + const emptyNum = [null, undefined, ''].includes(item.numValue) + return emptyText && emptyNum + })) { + this.$message.warning('属性值不能为空值!') + return + } if (this.modalData.flag === '2' && this.modalData.oldPartType === 'Manufactured' && this.modalData.partType === 'Manufactured Recipe') { this.$confirm("该操作会删除物料BOM,请确认!", "提示", { confirmButtonText: "确定", @@ -2881,7 +2895,10 @@ import { } getPartCharacteristicList(tempData).then(({data}) => { if (data && data.code === 0) { - this.partItemList = data.rows + this.partItemList = data.rows.map(item => ({ + ...item, + numValue: item.numValue === null ? undefined : item.numValue + })) } else { this.partItemList = [] } @@ -2897,7 +2914,10 @@ import { } getItemListByCodeNo(tempData).then(({data}) => { if (data && data.code === 0) { - this.partItemList = data.rows + this.partItemList = data.rows.map(item => ({ + ...item, + numValue: item.numValue === null ? undefined : item.numValue + })) } else { this.partItemList = [] } @@ -2958,7 +2978,10 @@ import { this.$message.warning('请选择属性!') return } - this.partItemList = [...this.partItemList,...this.characteristicSelections] + this.partItemList = [...this.partItemList,...this.characteristicSelections.map(item => ({ + ...item, + numValue: item.numValue === null ? undefined : item.numValue + }))] this.saveItemModelFlag = false },