From 408078a5d62330484a86567078ae49034752ebfc Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Thu, 14 May 2026 17:10:49 +0800 Subject: [PATCH] =?UTF-8?q?2026-05-14=20RoHs=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/rohs/rohsRecord.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/views/modules/rohs/rohsRecord.vue b/src/views/modules/rohs/rohsRecord.vue index 31caa19..9f919de 100644 --- a/src/views/modules/rohs/rohsRecord.vue +++ b/src/views/modules/rohs/rohsRecord.vue @@ -970,6 +970,7 @@ export default { approvalList: [], plmRohsAuthorityArr: [], nodeAuthorityLoaded: false, + isEditMode: false, modalTitle: 'RoHs 新增', activeName: 'basicInfo', showModalFlag: false, @@ -1087,7 +1088,13 @@ export default { return target ? target.updateFlag : 'N' }, isRohsFieldDisabled (fieldId) { - return this.showModalFlag || this.rohsFieldFlag(fieldId) === 'N' + if (this.showModalFlag) { + return true + } + if (!this.isEditMode) { + return false + } + return this.rohsFieldFlag(fieldId) === 'N' }, canEditRohsMaterial () { return !this.showModalFlag @@ -1398,7 +1405,8 @@ export default { this.projectMaterialSelections = [] this.materialSelections = [] this.plmRohsAuthorityArr = [] - this.nodeAuthorityLoaded = false + this.nodeAuthorityLoaded = !row + this.isEditMode = !!row this.projectMaterialPageIndex = 1 this.projectMaterialTotal = 0 this.projectMaterialList = [] @@ -1507,7 +1515,7 @@ export default { tpProcessControl: 'N', csProcessControl: 'N' } - this.loadNodeAuthority(this.modalData.site, this.modalData.stepId) + this.nodeAuthorityLoaded = true } }, // 表单提交 @@ -1526,7 +1534,6 @@ export default { projectId: this.modalData.projectId } }) - this.modalData.ifsPartNo = this.modalData.materialList.length > 0 ? this.modalData.materialList[0].testPartNo : '' const submitMethod = this.modalTitle === 'RoHs 新增' ? api.saveRohs : api.updateRohs submitMethod(this.modalData).then(({data}) => { @@ -1599,7 +1606,6 @@ export default { qualificationDocumentsNeeded: (this.modalData.qualificationDocumentsNeededList || []).join(';'), testReportIncludingItems: (this.modalData.testReportIncludingItemsList || []).join(';'), materialList: submitMaterialList, - ifsPartNo: submitMaterialList.length > 0 ? submitMaterialList[0].testPartNo : '', nodeConclusion: nodeConclusion, rejectOpinion: nodeConclusion === 'N' ? this.rejectOpinion : '', menuId: this.menuId, @@ -1803,7 +1809,6 @@ export default { api.updateRohsMaterials(payload).then(({data}) => { if (data && data.code === 0) { this.$set(this.modalData, 'materialList', normalizedList) - this.modalData.ifsPartNo = normalizedList.length > 0 ? normalizedList[0].testPartNo : '' this.materialSelections = [] if (this.currentRow && this.currentRow.referenceNo === this.modalData.referenceNo) { this.$set(this.currentRow, 'materialList', normalizedList)