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) {