Jelajahi Sumber

分组审批,只读判断

MaiXinRong 2 hari lalu
induk
melakukan
6f50461334
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 5 0
      app/middleware/stage_check.js

+ 5 - 0
app/middleware/stage_check.js

@@ -98,6 +98,11 @@ module.exports = options => {
                 stage.readOnly = true;
                 stage.curTimes = stage.times;
                 stage.curOrder = _.max(_.map(stage.auditors, 'order'));
+            } else if (stage.status === status.checking && stage.curAuditors[0].audit_type === auditType.key.multi) {
+                stage.curOrder = stage.curAuditors[0].order;
+                stage.curTimes = stage.times;
+                const ass = stage.auditAssists.find(x => { return stage.curAuditorIds.indexOf(x.user_id) >= 0 && x.ass_user_id === accountId; });
+                stage.readOnly = stage.curAuditorIds.indexOf(accountId) < 0 && !ass;
             } else {
                 const ass = stage.auditAssists.find(x => { return stage.flowAuditorIds.indexOf(x.user_id) >= 0 && x.ass_user_id === accountId; });
                 stage.readOnly = stage.flowAuditorIds.indexOf(accountId) < 0 && !ass;