MaiXinRong 1 год назад
Родитель
Сommit
0ec2f2407c
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      app/service/stage.js

+ 2 - 2
app/service/stage.js

@@ -206,7 +206,7 @@ module.exports = app => {
             if (stage.status !== status.checked && stage.status !== status.uncheck) {
                 if (stage.status !== status.checkNo) {
                     // 找出当前操作人上一个审批人,包括审批完成的和退回上一个审批人的,同时当前操作人为第一人时,就是则为原报
-                    if (stage.flowAuditors.find(x => { return x.status !== auditConst.stage.status.checking})) return; // 当前流程存在审批人审批通过时,不可撤回
+                    if (stage.flowAuditors.find(x => { return x.status !== auditConst.stage.status.checking}) && stage.flowAuditorIds.indexOf(accountId) < 0) return; // 当前流程存在审批人审批通过时,不可撤回
                     const flowAssists = stage.auditAssists.filter(x => { return stage.flowAuditorIds.indexOf(x.user_id) >= 0; });
                     if (flowAssists.find(x => { return x.confirm; })) return; //当前流程存在协审人确认时,不可撤回
                     if (stage.curAuditorIds.indexOf(accountId) < 0 && stage.flowAuditorIds.indexOf(accountId) >= 0) {
@@ -232,7 +232,7 @@ module.exports = app => {
                             stage.cancancel = 3;// 审批人撤回审批退回上一人
                         }
                         stage.preAuditors = preAuditors;
-                    } else if (preAuditors.length > 0 && accountId === stage.user_id) {
+                    } else if (preAuditors.length === 0 && accountId === stage.user_id) {
                         stage.cancancel = 1;// 原报撤回
                     }
                 } else {