diff --git a/src/views/eam/mold/moldmaintenancejob/index.vue b/src/views/eam/mold/moldmaintenancejob/index.vue index 8955b3d..531dc70 100644 --- a/src/views/eam/mold/moldmaintenancejob/index.vue +++ b/src/views/eam/mold/moldmaintenancejob/index.vue @@ -449,7 +449,7 @@ const butttondata = (row) => { defaultButtons.acceptOrderBtn({ hasPermi:'eam:mold-maintenance-job-main:orderClick', hide: !( - row.status == 'PENDING' && judgeIsTheClass(row) && judgeIsTheFactory(row) + row.status == 'PENDING' && judgeIsTheFactory(row) ) }), // 接单 defaultButtons.turnOrderBtn({ @@ -839,7 +839,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => { if (operatRecord.value.type == 'TECH') { MoldMaintenanceDetail.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(); }); @@ -848,7 +848,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => { } else if (operatRecord.value.type == 'DEVICE') { MoldMaintenanceDetail.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(); }); @@ -857,7 +857,7 @@ const openFormCallBack = (type, row, masterParmas, callback) => { } else if (operatRecord.value.type == 'MOLD') { MoldMaintenanceDetail.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(); }); @@ -1174,35 +1174,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.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 return false; } - - - - /** 初始化 **/ onMounted(async () => { getList()