|
@@ -998,11 +998,11 @@ module.exports = app => {
|
|
|
// 判断上一次审批是否为非原报为审批人
|
|
|
const nowUidList = ctx.helper._.map(ctx.change.auditors, 'uid');
|
|
|
// 判断条件修订可上报条件
|
|
|
- // 1.有原报,有其他人 可以添加原报作为审核人,但是不能只原报上报
|
|
|
- // 2.有原报,无其他人 可以添加原报作为审核人,可以只原报上报
|
|
|
- // 3.无原报,有其他人 不可以添加原报
|
|
|
+ // 1.有原报,不管有无其他人 可以添加原报作为审核人,但是不能只原报上报
|
|
|
+ // 2.无原报,有其他人 不可以添加原报
|
|
|
const noYBUidList = ctx.change.status === audit.flow.status.revise ? ctx.helper._.initial(ctx.helper._.tail(lastUidList)) : ctx.helper._.tail(lastUidList);
|
|
|
- if (!ctx.helper._.isEqual(lastUidList, nowUidList) && ctx.helper._.includes(noYBUidList, lastUidList[0]) && nowUidList.length === 2 && nowUidList[0] === nowUidList[1]) {
|
|
|
+ // if (!ctx.helper._.isEqual(lastUidList, nowUidList) && ctx.helper._.includes(noYBUidList, lastUidList[0]) && nowUidList.length === 2 && nowUidList[0] === nowUidList[1]) {
|
|
|
+ if (nowUidList.length === 2 && nowUidList[0] === nowUidList[1]) {
|
|
|
throw '该变更令不能指定原报人为单独审批人';
|
|
|
}
|
|
|
if (!ctx.helper._.isEqual(lastUidList, nowUidList) && !ctx.helper._.includes(noYBUidList, lastUidList[0]) && ctx.helper._.includes(ctx.helper._.tail(nowUidList), nowUidList[0])) {
|