MaiXinRong 3 ヶ月 前
コミット
7433c7c2fa
1 ファイル変更5 行追加4 行削除
  1. 5 4
      app/middleware/tender_check.js

+ 5 - 4
app/middleware/tender_check.js

@@ -51,6 +51,7 @@ module.exports = options => {
             tender.his = tender.data.ledger_status === auditConst.status.checkNo
                 ? yield this.service.ledgerHistory.getDataById(tender.data.his_id)
                 : null;
+            const subProject = yield this.service.subProject.getDataById(tender.data.spid);
             const accountId = this.session.sessionUser.accountId;
             const advanceAuditors = yield this.service.advanceAudit.getAllAuditors(tender.id);
             const advanceAuditorsId = this.helper._.map(advanceAuditors, 'audit_id');
@@ -76,13 +77,13 @@ module.exports = options => {
             const reviseAuditorsId = this.helper._.map(reviseAuditors, 'audit_id');
             const materialAuditors = yield this.service.materialAudit.getAllAuditors(tender.id);
             const materialAuditorsId = this.helper._.map(materialAuditors, 'aid');
-            const changeProjectAuditors = this.subProject.page_show.openChangeProject ? yield this.service.changeProjectAudit.getAllAuditors(tender.id) : [];
+            const changeProjectAuditors = subProject.page_show.openChangeProject ? yield this.service.changeProjectAudit.getAllAuditors(tender.id) : [];
             const changeProjectAuditorsId = this.helper._.map(changeProjectAuditors, 'aid');
-            const changeProjectXsAuditors = this.subProject.page_show.openChangeProject ? yield this.service.changeProjectXsAudit.getAllAuditors(tender.id) : [];
+            const changeProjectXsAuditors = subProject.page_show.openChangeProject ? yield this.service.changeProjectXsAudit.getAllAuditors(tender.id) : [];
             const changeProjectXsAuditorsId = this.helper._.map(changeProjectXsAuditors, 'aid');
-            const changeApplyAuditors = this.subProject.page_show.openChangeApply ? yield this.service.changeApplyAudit.getAllAuditors(tender.id) : [];
+            const changeApplyAuditors = subProject.page_show.openChangeApply ? yield this.service.changeApplyAudit.getAllAuditors(tender.id) : [];
             const changeApplyAuditorsId = this.helper._.map(changeApplyAuditors, 'aid');
-            const changePlanAuditors = this.subProject.page_show.openChangePlan ? yield this.service.changePlanAudit.getAllAuditors(tender.id) : [];
+            const changePlanAuditors = subProject.page_show.openChangePlan ? yield this.service.changePlanAudit.getAllAuditors(tender.id) : [];
             const changePlanAuditorsId = this.helper._.map(changePlanAuditors, 'aid');
             const tenderPermission = this.session.sessionUser.permission ? this.session.sessionUser.permission.tender : null;
             const isTenderTourist = yield this.service.tenderTourist.getDataByCondition({ tid: tender.id, user_id: accountId });