From 075269b1db52c92c3ed610d6db6ce19a6a30ca32 Mon Sep 17 00:00:00 2001 From: qiankanghui <11284155+qian-kanghui@user.noreply.gitee.com> Date: Wed, 28 Jan 2026 17:18:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(eam):=20=E5=AE=8C=E5=96=84=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=8F=8D=E9=A6=88=E8=A1=A8=E5=8D=95=E7=9A=84=E7=BB=B4?= =?UTF-8?q?=E4=BF=AE=E7=B1=BB=E5=9E=8B=E6=8E=A7=E5=88=B6=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在设备故障反馈中增加RFID业务单元的维修类型自动判断逻辑 - 根据设备ID是否以B开头动态设置维修类型为换线专家组或设备维修组 - 添加objectID变更监听器来实时调整维修类型和编辑权限 - 优化buChangedMethod方法中的条件判断逻辑 - 在选择设备后根据BU类型自动设置相应的维修类型和禁用状态 - 修复维修类型下拉框的禁用条件判断 - 临时注释掉维修结果验证中的处置措施必填检查 - 增加repairTypeChange事件处理器来处理用户手动修改维修类型的场景 --- src/views/modules/eam/eamFeedBack.vue | 75 ++++++++++++++++--- .../reportWorkOrder/reportDefectOrder.vue | 9 ++- 2 files changed, 70 insertions(+), 14 deletions(-) diff --git a/src/views/modules/eam/eamFeedBack.vue b/src/views/modules/eam/eamFeedBack.vue index 69164ee..a9202a2 100644 --- a/src/views/modules/eam/eamFeedBack.vue +++ b/src/views/modules/eam/eamFeedBack.vue @@ -292,7 +292,10 @@ - + @@ -510,11 +513,31 @@ watch: { "saveModalData.bu"(newV, oldV) { if (newV.includes('RFID') && this.saveModalData.repairReportingType !== 'TPM红牌') { - this.saveModalData.repairType = '换线专家组' + if (this.saveModalData.objectID && this.saveModalData.objectID.startsWith('B')) { + this.saveModalData.repairType = '换线专家组' + this.repairReportingTypeFlag = false // 允许编辑 + } else { + this.saveModalData.repairType = '设备维修组' + this.repairReportingTypeFlag = true // 不允许编辑 + } } else { this.saveModalData.repairType = '设备维修组' + this.repairReportingTypeFlag = false // 允许编辑 } }, + "saveModalData.objectID"(newV, oldV) { + // 当BU是RFID时,根据设备ID是否以B开头设置维修类型 + if (this.saveModalData.bu && this.saveModalData.bu.includes('RFID') && + this.saveModalData.repairReportingType !== 'TPM红牌') { + if (newV && newV.startsWith('B')) { + this.saveModalData.repairType = '换线专家组' + this.repairReportingTypeFlag = false // 允许编辑 + } else { + this.saveModalData.repairType = '设备维修组' + this.repairReportingTypeFlag = true // 不允许编辑 + } + } + } }, data () { return { @@ -1245,10 +1268,29 @@ }) }, buChangedMethod(){ - if (this.saveModalData.bu=='2_01-Label'){ - this.repairReportingTypeFlag=true - }else { - this.repairReportingTypeFlag=false + if (this.saveModalData.bu == '2_01-Label'){ + this.repairReportingTypeFlag = true + } else if (this.saveModalData.bu.includes('RFID') && + this.saveModalData.repairReportingType !== 'TPM红牌') { + // 当BU是RFID时,根据设备ID是否以B开头设置 + if (this.saveModalData.objectID && this.saveModalData.objectID.startsWith('B')) { + this.saveModalData.repairType = '换线专家组' + this.repairReportingTypeFlag = false // 允许编辑 + } else { + this.saveModalData.repairType = '设备维修组' + this.repairReportingTypeFlag = true // 不允许编辑 + } + } else { + this.repairReportingTypeFlag = false // 允许编辑 + } + }, + // 维修类型变化事件 + repairTypeChange() { + // 当用户手动更改维修类型时的处理逻辑 + if (this.saveModalData.bu && this.saveModalData.bu.includes('RFID') && + this.saveModalData.objectID && !this.saveModalData.objectID.startsWith('B')) { + // 如果是RFID BU且设备ID非B开头,强制设为设备维修组 + this.saveModalData.repairType = '设备维修组' } }, @@ -1708,18 +1750,30 @@ if (this.tagNo === 200) { this.saveModalData.objectID = val.ObjectID this.saveModalData.objectDesc = val.ObjectDesc - if (val.deviceManager!=''&&val.deviceManager!=null){ + if (val.deviceManager != '' && val.deviceManager != null) { let peopleList = val.deviceManager.split(';') await this.getOperatorList(1) - peopleList.forEach((username)=>{ - this.operatorList.forEach((item)=>{ - if (item.adminID === username){ + peopleList.forEach((username) => { + this.operatorList.forEach((item) => { + if (item.adminID === username) { this.saveModalData.planOperator = item.adminID this.saveModalData.planOperatorName = item.adminName } }) }) } + + // 根据BU和设备ID设置维修类型 + if (this.saveModalData.bu && this.saveModalData.bu.includes('RFID') && + this.saveModalData.repairReportingType !== 'TPM红牌') { + if (val.ObjectID && val.ObjectID.startsWith('B')) { + this.saveModalData.repairType = '换线专家组' + this.repairReportingTypeFlag = false // 允许编辑 + } else { + this.saveModalData.repairType = '设备维修组' + this.repairReportingTypeFlag = true // 不允许编辑 + } + } } if (this.tagNo === 1055) { this.saveModalData.defectID = val.DefectID @@ -1831,6 +1885,7 @@ }) }, + // 获取 tableDefault 列 async getColumnList(tableId, columnId) { let queryTable= { diff --git a/src/views/modules/reportWorkOrder/reportDefectOrder.vue b/src/views/modules/reportWorkOrder/reportDefectOrder.vue index ba91373..9918e63 100644 --- a/src/views/modules/reportWorkOrder/reportDefectOrder.vue +++ b/src/views/modules/reportWorkOrder/reportDefectOrder.vue @@ -2456,10 +2456,10 @@ this.$message.warning('请选择维修结果!') return } - if (this.saveData.result === '维修失败' && (this.saveData.disposalMeasures == null || this.saveData.disposalMeasures === '')) { - this.$message.warning('请选择处置措施!') - return - } + // if (this.saveData.result === '维修失败' && (this.saveData.disposalMeasures == null || this.saveData.disposalMeasures === '')) { + // this.$message.warning('请选择处置措施!') + // return + // } if (this.saveData.operator == null || this.saveData.operator === '') { this.$message.warning('请选择维修人员!') return @@ -2975,6 +2975,7 @@ this.$message.warning('请选择要转单的工单!') return } + this.dataListSelections[0].repairType = '设备维修组' updateRepairTypes(this.dataListSelections).then(({data}) => { if (data && data.code === 0) {