浏览代码

期列表计算相关

MaiXinRong 1 年之前
父节点
当前提交
01f9e0775e
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      app/service/stage.js

+ 5 - 2
app/service/stage.js

@@ -158,7 +158,7 @@ module.exports = app => {
                 stage.curOrder = _.max(_.map(stage.auditors, 'order'));
             } else {
                 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;
+                stage.readOnly = stage.curAuditorIds.indexOf(accountId) < 0 && !ass;
                 stage.curTimes = stage.times;
                 if (!stage.readOnly) {
                     stage.assist = ass;
@@ -167,7 +167,10 @@ module.exports = app => {
                     stage.curOrder = stage.curAuditors[0].order - 1;
                 }
                 // 会签,会签人审批通过时,只读,但是curOrder需按原来的取值
-                stage.readOnly = stage.readOnly && this._.isEqual(stage.flowAuditorIds, stage.curAuditorIds);
+                if (!stage.readOnly) {
+                    stage.readOnly = !_.isEqual(stage.flowAuditorIds, stage.curAuditorIds);
+                    stage.canCheck = true;
+                }
             }
             if (stage.readOnly) {
                 stage.assist = accountId === stage.user_id || stage.auditorIds.indexOf(accountId) >= 0