|
@ -449,7 +449,7 @@ const butttondata = (row) => { |
|
|
defaultButtons.acceptOrderBtn({ |
|
|
defaultButtons.acceptOrderBtn({ |
|
|
hasPermi:'eam:mold-maintenance-job-main:orderClick', |
|
|
hasPermi:'eam:mold-maintenance-job-main:orderClick', |
|
|
hide: !( |
|
|
hide: !( |
|
|
row.status == 'PENDING' && judgeIsTheClass(row) && judgeIsTheFactory(row) |
|
|
row.status == 'PENDING' && judgeIsTheFactory(row) |
|
|
) |
|
|
) |
|
|
}), // 接单 |
|
|
}), // 接单 |
|
|
defaultButtons.turnOrderBtn({ |
|
|
defaultButtons.turnOrderBtn({ |
|
@ -839,7 +839,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => { |
|
|
if (operatRecord.value.type == 'TECH') { |
|
|
if (operatRecord.value.type == 'TECH') { |
|
|
MoldMaintenanceDetail.allSchemas.formSchema.forEach((item) => { |
|
|
MoldMaintenanceDetail.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'maintenances') { |
|
|
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 |
|
|
item.componentProps.options = response |
|
|
callback(); |
|
|
callback(); |
|
|
}); |
|
|
}); |
|
@ -848,7 +848,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => { |
|
|
} else if (operatRecord.value.type == 'DEVICE') { |
|
|
} else if (operatRecord.value.type == 'DEVICE') { |
|
|
MoldMaintenanceDetail.allSchemas.formSchema.forEach((item) => { |
|
|
MoldMaintenanceDetail.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'maintenances') { |
|
|
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 |
|
|
item.componentProps.options = response |
|
|
callback(); |
|
|
callback(); |
|
|
}); |
|
|
}); |
|
@ -857,7 +857,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => { |
|
|
} else if (operatRecord.value.type == 'MOLD') { |
|
|
} else if (operatRecord.value.type == 'MOLD') { |
|
|
MoldMaintenanceDetail.allSchemas.formSchema.forEach((item) => { |
|
|
MoldMaintenanceDetail.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'maintenances') { |
|
|
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 |
|
|
item.componentProps.options = response |
|
|
callback(); |
|
|
callback(); |
|
|
}); |
|
|
}); |
|
@ -1174,35 +1174,12 @@ const judgeIsTheClassEngineerAndApply = (row,type) => { |
|
|
}else{ |
|
|
}else{ |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
}else if(row.status === 'COMPLETED' && type == 'VERIFY') { |
|
|
|
|
|
if(row.requestNumber == null || row.requestNumber == ''){ |
|
|
|
|
|
// 先判断角色是否满足条件 |
|
|
|
|
|
const rolesOk = userStore.roles.some(item => { |
|
|
|
|
|
if (row.type == 'MOLD') { |
|
|
|
|
|
return item === 'mold_class_Engineer_role'; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
if(rolesOk) return true |
|
|
|
|
|
} |
|
|
|
|
|
}else if (row.status === 'APPLYPASS' && type == 'VERIFY') { |
|
|
|
|
|
// 先判断角色是否满足条件 |
|
|
|
|
|
const rolesOk = userStore.roles.some(item => { |
|
|
|
|
|
if (row.type == 'MOLD') { |
|
|
|
|
|
return item === 'mold_class_Engineer_role'; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
if(rolesOk) return true |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 如果不是COMPLETED或APPLYPASS状态,或者COMPLETED状态下条件不满足,则默认返回false |
|
|
// 如果不是COMPLETED或APPLYPASS状态,或者COMPLETED状态下条件不满足,则默认返回false |
|
|
return false; |
|
|
return false; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|