Browse Source

调试

master
zhaoyiran 7 months ago
parent
commit
5cd12db19f
  1. 49
      src/views/eam/device/devicemaintenancejob/index.vue

49
src/views/eam/device/devicemaintenancejob/index.vue

@ -390,53 +390,12 @@ const judgeIsTheClassEngineerAndApply = (row,type) => {
}else{
return false
}
}else if(row.status === 'COMPLETED' && type == 'VERIFY'){
if(row.requestNumber == null || row.requestNumber == ''){
//
const rolesOk = userStore.roles.find(item => {
if (row.type == 'DEVICE') {
return item == 'device_class_Engineer_role'
}else if (row.type == 'TECH') {
return item == 'tech_class_Engineer_role'
}
})
if(rolesOk) return true
}
} else if (row.status === 'APPLYPASS' && type == 'VERIFY') {
//
const rolesOk = userStore.roles.find(item => {
if (row.type == 'DEVICE') {
return item == 'device_class_Engineer_role'
}else if (row.type == 'TECH') {
return item == 'tech_class_Engineer_role'
}
})
if(rolesOk) return true
}
// COMPLETEDAPPLYPASSCOMPLETEDfalse
return false;
}
const judgeIsTheClassWorker = (row) => {
const rolesOk = userStore.roles.find(item => {
if (row.type == 'DEVICE') {
return item == 'device_class_worker_role'
}else if (row.type == 'TECH') {
return item == 'tech_class_worker_role'
}
})
if (rolesOk != undefined && rolesOk != null) {
return true
} else {
return false
}
}
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi:'eam:device-maintenance-job-main:create'}), //
@ -492,7 +451,7 @@ const butttondata = (row) => {
defaultButtons.acceptOrderBtn({
hasPermi:'eam:device-maintenance-job-main:orderClick',
hide: !(
row.status == 'PENDING' && judgeIsTheClass(row) && judgeIsTheFactory(row)
row.status == 'PENDING' && judgeIsTheFactory(row)
)
}), //
defaultButtons.turnOrderBtn({
@ -1151,7 +1110,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
if (operatRecord.value.type == 'TECH') {
DeviceMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'maintenances') {
selecUserByType({ classType: 'TECH', factoryAreaNumber: '', flag: null }).then(response => {
selecUserByType({ classType: 'TECH', factoryAreaNumber: operatRecord.value.factoryAreaNumber, flag: null }).then(response => {
item.componentProps.options = response
callback();
});
@ -1160,7 +1119,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
} else if (operatRecord.value.type == 'DEVICE') {
DeviceMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'maintenances') {
selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: null }).then(response => {
selecUserByType({ classType: 'DEVICE', factoryAreaNumber: operatRecord.value.factoryAreaNumber, flag: null }).then(response => {
item.componentProps.options = response
callback();
});
@ -1169,7 +1128,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
} else if (operatRecord.value.type == 'MOLD') {
DeviceMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'maintenances') {
selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: null }).then(response => {
selecUserByType({ classType: 'MOLD', factoryAreaNumber: operatRecord.value.factoryAreaNumber, flag: null }).then(response => {
item.componentProps.options = response
callback();
});

Loading…
Cancel
Save