Browse Source

feat(eam): 完善设备反馈表单的维修类型控制逻辑

- 在设备故障反馈中增加RFID业务单元的维修类型自动判断逻辑
- 根据设备ID是否以B开头动态设置维修类型为换线专家组或设备维修组
- 添加objectID变更监听器来实时调整维修类型和编辑权限
- 优化buChangedMethod方法中的条件判断逻辑
- 在选择设备后根据BU类型自动设置相应的维修类型和禁用状态
- 修复维修类型下拉框的禁用条件判断
- 临时注释掉维修结果验证中的处置措施必填检查
- 增加repairTypeChange事件处理器来处理用户手动修改维修类型的场景
master
qiankanghui 4 weeks ago
parent
commit
075269b1db
  1. 75
      src/views/modules/eam/eamFeedBack.vue
  2. 9
      src/views/modules/reportWorkOrder/reportDefectOrder.vue

75
src/views/modules/eam/eamFeedBack.vue

@ -292,7 +292,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="saveModalData.repairReportingType === '设备故障'" label="维修类型" prop="repairType"> <el-form-item v-if="saveModalData.repairReportingType === '设备故障'" label="维修类型" prop="repairType">
<el-select v-model="saveModalData.repairType" style="width: 104px" :disabled="this.repairReportingTypeFlag?'disabled':false">
<el-select v-model="saveModalData.repairType" style="width: 104px"
:disabled="repairReportingTypeFlag || (saveModalData.bu && saveModalData.bu.includes('RFID') &&
saveModalData.objectID && !saveModalData.objectID.startsWith('B'))"
@change="repairTypeChange">
<el-option label="换线专家组" value="换线专家组"></el-option> <el-option label="换线专家组" value="换线专家组"></el-option>
<el-option label="设备维修组" value="设备维修组"></el-option> <el-option label="设备维修组" value="设备维修组"></el-option>
</el-select> </el-select>
@ -510,11 +513,31 @@
watch: { watch: {
"saveModalData.bu"(newV, oldV) { "saveModalData.bu"(newV, oldV) {
if (newV.includes('RFID') && this.saveModalData.repairReportingType !== 'TPM红牌') { 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 { } else {
this.saveModalData.repairType = '设备维修组' this.saveModalData.repairType = '设备维修组'
this.repairReportingTypeFlag = false //
} }
}, },
"saveModalData.objectID"(newV, oldV) {
// BURFIDIDB
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 () { data () {
return { return {
@ -1245,10 +1268,29 @@
}) })
}, },
buChangedMethod(){ 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红牌') {
// BURFIDIDB
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 BUIDB
this.saveModalData.repairType = '设备维修组'
} }
}, },
@ -1708,18 +1750,30 @@
if (this.tagNo === 200) { if (this.tagNo === 200) {
this.saveModalData.objectID = val.ObjectID this.saveModalData.objectID = val.ObjectID
this.saveModalData.objectDesc = val.ObjectDesc this.saveModalData.objectDesc = val.ObjectDesc
if (val.deviceManager!=''&&val.deviceManager!=null){
if (val.deviceManager != '' && val.deviceManager != null) {
let peopleList = val.deviceManager.split(';') let peopleList = val.deviceManager.split(';')
await this.getOperatorList(1) 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.planOperator = item.adminID
this.saveModalData.planOperatorName = item.adminName this.saveModalData.planOperatorName = item.adminName
} }
}) })
}) })
} }
// BUID
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) { if (this.tagNo === 1055) {
this.saveModalData.defectID = val.DefectID this.saveModalData.defectID = val.DefectID
@ -1831,6 +1885,7 @@
}) })
}, },
// tableDefault // tableDefault
async getColumnList(tableId, columnId) { async getColumnList(tableId, columnId) {
let queryTable= { let queryTable= {

9
src/views/modules/reportWorkOrder/reportDefectOrder.vue

@ -2456,10 +2456,10 @@
this.$message.warning('请选择维修结果!') this.$message.warning('请选择维修结果!')
return 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 === '') { if (this.saveData.operator == null || this.saveData.operator === '') {
this.$message.warning('请选择维修人员!') this.$message.warning('请选择维修人员!')
return return
@ -2975,6 +2975,7 @@
this.$message.warning('请选择要转单的工单!') this.$message.warning('请选择要转单的工单!')
return return
} }
this.dataListSelections[0].repairType = '设备维修组' this.dataListSelections[0].repairType = '设备维修组'
updateRepairTypes(this.dataListSelections).then(({data}) => { updateRepairTypes(this.dataListSelections).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {

Loading…
Cancel
Save