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 },