MaiXinRong 9 kuukautta sitten
vanhempi
commit
e48fab3b67
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      app/middleware/stage_check.js
  2. 1 1
      app/service/stage.js

+ 1 - 1
app/middleware/stage_check.js

@@ -109,7 +109,7 @@ module.exports = options => {
                         stage.canCheck = true;
                     } else if (stage.curAuditors[0].audit_type === auditType.key.union) {
                         stage.readOnly = stage.relaAuditor.status === status.checked;
-                        stage.canCheck = !stage.readOnly
+                        stage.canCheck = !stage.readOnly;
                     }
                 }
             }

+ 1 - 1
app/service/stage.js

@@ -89,7 +89,7 @@ module.exports = app => {
                 name: stage.user.name, role: stage.user.role, company: stage.user.company
             }]);
             stage.finalAuditorIds = stage.userGroups[stage.userGroups.length - 1].map(x => { return x.aid; });
-            stage.relaAuditor = stage.auditors.find(x => { return x.aid === accountId });
+            stage.relaAuditor = this._.findLast(stage.auditors, x => { return x.aid === accountId });
 
             stage.assists = await this.service.stageAuditAss.getData(stage); // 全部协同人
             stage.assists = stage.assists.filter(x => {