From d38b0a254088fbd36d5758d6e888aec9ca9058fa Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 10 Jun 2026 11:24:25 +0800 Subject: [PATCH] =?UTF-8?q?2026-06-10=20RoHs=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/rohs/rohsRecord.vue | 381 ++++++++++++++++++-------- 1 file changed, 268 insertions(+), 113 deletions(-) diff --git a/src/views/modules/rohs/rohsRecord.vue b/src/views/modules/rohs/rohsRecord.vue index dee7961..b8614b7 100644 --- a/src/views/modules/rohs/rohsRecord.vue +++ b/src/views/modules/rohs/rohsRecord.vue @@ -324,12 +324,61 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
- + @@ -351,16 +400,18 @@ - + - - - - - + + 材料属性是否是AH/Is AH Grade @@ -372,7 +423,7 @@ - + @@ -383,7 +434,7 @@ v-model="modalData.hsfApprover" readonly :disabled="isRohsFieldDisabled('hsfApprover')" - style="width: 420px" + style="width: 396px" placeholder="请选择人员" @focus="openHsfApproverChooseModal"> @@ -391,77 +442,25 @@ - - - - + Inform Related people + Inform Related people + - - - + style="width: 396px" + placeholder="请从HSF审批人中选择" + @focus="openRelatedPeopleChooseModal"> + + + + - - - -
-
- - - -
- - - - - - - - - - - - - - - - - - - - - - +
@@ -658,6 +657,37 @@ + + + + + + + + + + 查询 + + + + + + + + 确定 + 关闭 + + + @@ -833,42 +863,6 @@
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
@@ -902,6 +896,40 @@
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
String(item || '').trim()) + .filter(item => !!item) + const selectedSet = new Set(normalizedNames) + let optionList = (this.hsfApproverOptionList || []) + .filter(item => selectedSet.has(String(item.operatorName || '').trim())) + .map(item => ({ + operatorId: item.operatorId, + operatorName: item.operatorName + })) + const existingNameSet = new Set(optionList.map(item => String(item.operatorName || '').trim())) + normalizedNames.forEach(name => { + if (existingNameSet.has(name)) { + return + } + optionList.push({ + operatorId: name, + operatorName: name + }) + existingNameSet.add(name) + }) + this.relatedPeopleOptionList = optionList + this.filterRelatedPeopleOptions() + const selectedRelatedPeople = String(this.modalData.relatedPeople || '').trim() + if (selectedRelatedPeople && !optionList.some(item => String(item.operatorName || '').trim() === selectedRelatedPeople)) { this.$set(this.modalData, 'relatedPeople', '') } }, @@ -1601,6 +1671,17 @@ export default { return matchOperatorId && matchOperatorName }) }, + filterRelatedPeopleOptions () { + const operatorIdKeyword = String(this.relatedPeopleSearchData.operatorId || '').trim().toUpperCase() + const operatorNameKeyword = String(this.relatedPeopleSearchData.operatorName || '').trim().toUpperCase() + this.relatedPeopleDisplayList = (this.relatedPeopleOptionList || []).filter(item => { + const operatorId = String(item.operatorId || '').toUpperCase() + const operatorName = String(item.operatorName || '').toUpperCase() + const matchOperatorId = !operatorIdKeyword || operatorId.includes(operatorIdKeyword) + const matchOperatorName = !operatorNameKeyword || operatorName.includes(operatorNameKeyword) + return matchOperatorId && matchOperatorName + }) + }, openHsfApproverChooseModal () { if (this.isRohsFieldDisabled('hsfApprover')) { return @@ -1663,6 +1744,61 @@ export default { this.$set(this.modalData, 'hsfApproverList', []) this.syncHsfApproverFields() }, + openRelatedPeopleChooseModal () { + if (this.isRohsFieldDisabled('relatedPeople')) { + return + } + if (!this.modalData || !Array.isArray(this.modalData.hsfApproverList) || this.modalData.hsfApproverList.length === 0) { + this.$message.warning('请先选择HSF审批人') + return + } + this.buildRelatedPeopleOptions(this.modalData.hsfApproverList) + if (!this.relatedPeopleOptionList || this.relatedPeopleOptionList.length === 0) { + this.$message.warning('未查询到可选Inform Related people') + return + } + this.relatedPeopleFlag = true + }, + openRelatedPeopleDialog () { + this.relatedPeopleSearchData = { + operatorId: '', + operatorName: '' + } + this.filterRelatedPeopleOptions() + const relatedPeople = String(this.modalData.relatedPeople || '').trim() + const selectedRow = (this.relatedPeopleOptionList || []).find(item => String(item.operatorName || '').trim() === relatedPeople) || null + this.relatedPeopleSelection = selectedRow + this.$nextTick(() => { + if (!this.$refs.relatedPeopleTable) { + return + } + this.$refs.relatedPeopleTable.setCurrentRow(selectedRow || null) + }) + }, + closeRelatedPeopleDialog () { + this.relatedPeopleSelection = null + }, + handleRelatedPeopleCurrentChange (row) { + this.relatedPeopleSelection = row || null + }, + handleRelatedPeopleTableClick (row) { + this.relatedPeopleSelection = row || null + if (this.$refs.relatedPeopleTable) { + this.$refs.relatedPeopleTable.setCurrentRow(row) + } + }, + saveRelatedPeopleChooseModal () { + const selectedName = this.relatedPeopleSelection ? String(this.relatedPeopleSelection.operatorName || '').trim() : '' + this.$set(this.modalData, 'relatedPeople', selectedName) + this.relatedPeopleFlag = false + }, + clearRelatedPeopleSelection () { + this.$set(this.modalData, 'relatedPeople', '') + this.relatedPeopleSelection = null + if (this.$refs.relatedPeopleTable) { + this.$refs.relatedPeopleTable.setCurrentRow(null) + } + }, clearHsfApproverFields (clearBuNo = false) { if (clearBuNo) { this.$set(this.modalData, 'buNo', '') @@ -1670,10 +1806,18 @@ export default { this.hsfApproverOptionList = [] this.hsfApproverDisplayList = [] this.hsfApproverSelectionCache = [] + this.relatedPeopleOptionList = [] + this.relatedPeopleDisplayList = [] + this.relatedPeopleSelection = null + this.relatedPeopleFlag = false this.hsfApproverSearchData = { operatorId: '', operatorName: '' } + this.relatedPeopleSearchData = { + operatorId: '', + operatorName: '' + } this.$set(this.modalData, 'hsfApproverList', []) this.$set(this.modalData, 'hsfApprover', '') this.$set(this.modalData, 'relatedPeople', '') @@ -2183,6 +2327,14 @@ export default { operatorName: '' } this.hsfApproverFlag = false + this.relatedPeopleOptionList = [] + this.relatedPeopleDisplayList = [] + this.relatedPeopleSelection = null + this.relatedPeopleSearchData = { + operatorId: '', + operatorName: '' + } + this.relatedPeopleFlag = false this.plmRohsAuthorityArr = [] this.nodeAuthorityLoaded = !row this.isEditMode = !!row @@ -2207,6 +2359,7 @@ export default { this.$set(this.modalData, 'materialList', Array.isArray(this.modalData.materialList) ? this.modalData.materialList : []) this.$set(this.modalData, 'hsfApproverList', this.modalData.hsfApprover ? this.modalData.hsfApprover.split(';').filter(item => item) : []) this.$set(this.modalData, 'buNo', this.modalData.process || '') + this.$set(this.modalData, 'isAhGrade', this.normalizeCheckboxFlag(this.modalData.isAhGrade)) this.$set(this.modalData, 'validUntilValue', this.normalizeValidUntilValue(this.modalData.validUntilValue)) this.syncHsfApproverFields() this.fillDisplayFields(this.modalData, row || {}) @@ -2288,7 +2441,7 @@ export default { validUntilValue: 0, validUntil: '', isMeetRohsRequirement: '', - isAhGrade: '', + isAhGrade: 'N', hsfSupplierClassification: '', materialDesc: '', npdRemark: '', @@ -2312,6 +2465,7 @@ export default { this.$message.warning('当前状态不允许保存') return } + this.$set(this.modalData, 'isAhGrade', this.normalizeCheckboxFlag(this.modalData.isAhGrade)) this.normalizeHsfStandardByCustomer(this.modalData) this.syncHsfApproverFields() if (!this.validateValidUntilPair()) { @@ -2382,6 +2536,7 @@ export default { this.$message.warning('单据主键信息缺失,无法提交审批') return } + this.$set(this.modalData, 'isAhGrade', this.normalizeCheckboxFlag(this.modalData.isAhGrade)) this.normalizeHsfStandardByCustomer(this.modalData) this.syncHsfApproverFields() if (!this.validateValidUntilPair()) {