|
@ -357,10 +357,6 @@ const judgeIsTheClass = (row) => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const judgeIsTheFactory = (row) => { |
|
|
|
|
|
return userStore.userSelfInfo.deptId == row.factoryAreaNumber |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const judgeIsTheClassEngineer = (row) => { |
|
|
const judgeIsTheClassEngineer = (row) => { |
|
|
const rolesOk = userStore.roles.find(item => { |
|
|
const rolesOk = userStore.roles.find(item => { |
|
|
if (row.type == 'MOLD') { |
|
|
if (row.type == 'MOLD') { |
|
@ -392,8 +388,8 @@ const judgeIsTheClassWorker = (row) => { |
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
defaultButtons.defaultAddBtn({ hasPermi:'eam:mold-maintenance-job-main:create'}), // 新增 |
|
|
defaultButtons.defaultAddBtn({ hasPermi:'eam:mold-maintenance-job-main:create'}), // 新增 |
|
|
defaultButtons.defaultImportBtn({ hasPermi:'eam:mold-maintenance-job-main:import'}), |
|
|
// defaultButtons.defaultImportBtn({ hasPermi:'eam:mold-maintenance-job-main:import'}), |
|
|
defaultButtons.defaultExportBtn({ hasPermi:'eam:mold-maintenance-job-main:export'}), |
|
|
// defaultButtons.defaultExportBtn({ hasPermi:'eam:mold-maintenance-job-main:export'}), |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
@ -449,7 +445,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' && judgeIsTheFactory(row) |
|
|
row.status == 'PENDING' |
|
|
) |
|
|
) |
|
|
}), // 接单 |
|
|
}), // 接单 |
|
|
defaultButtons.turnOrderBtn({ |
|
|
defaultButtons.turnOrderBtn({ |
|
@ -463,7 +459,7 @@ const butttondata = (row) => { |
|
|
defaultButtons.verifyOrderBtn({ |
|
|
defaultButtons.verifyOrderBtn({ |
|
|
hasPermi:'eam:mold-maintenance-job-main:orderClickVerify', |
|
|
hasPermi:'eam:mold-maintenance-job-main:orderClickVerify', |
|
|
hide: !( |
|
|
hide: !( |
|
|
judgeIsTheClassEngineerAndApply(row,'VERIFY') && judgeIsTheFactory(row) |
|
|
judgeIsTheClassEngineerAndApply(row,'VERIFY') |
|
|
) |
|
|
) |
|
|
}), // 验证 |
|
|
}), // 验证 |
|
|
defaultButtons.finishOrderBtn({ |
|
|
defaultButtons.finishOrderBtn({ |
|
@ -1163,21 +1159,24 @@ const validateRow = (row) => { |
|
|
return true; |
|
|
return true; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const judgeIsTheClassEngineerAndApply = (row,type) => { |
|
|
const judgeIsTheClassEngineerAndApply = (row,type) => { |
|
|
// 根据不同的状态进行判断 |
|
|
// 根据不同的状态进行判断 |
|
|
if (row.status === 'COMPLETED') { |
|
|
if (row.status === 'COMPLETED' && type == 'CONFIRM') { |
|
|
// COMPLETED状态下,需要额外判断requestNumber和declarer |
|
|
// COMPLETED状态下,需要额外判断requestNumber和declarer |
|
|
if(row.requestNumber != null && row.requestNumber !== '' && row.declarer === userStore.getUser.id){ |
|
|
if(row.requestNumber != null && row.requestNumber !== '' && row.declarer === userStore.getUser.id){ |
|
|
return true |
|
|
return true |
|
|
}else{ |
|
|
}else{ |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
|
|
|
}else if(row.status === 'APPLYPASS' && type == 'VERIFY'){ |
|
|
|
|
|
return true |
|
|
|
|
|
}else if(row.requestNumber == null || row.requestNumber == ''){ |
|
|
|
|
|
if(row.status === 'COMPLETED' && type == 'VERIFY'){ |
|
|
|
|
|
return true |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
// 如果不是COMPLETED或APPLYPASS状态,或者COMPLETED状态下条件不满足,则默认返回false |
|
|
// 如果不是COMPLETED或APPLYPASS状态,或者COMPLETED状态下条件不满足,则默认返回false |
|
|
return false; |
|
|
return false; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|