MaiXinRong 2 yıl önce
ebeveyn
işleme
89aa877094
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      app/service/report_memory.js

+ 2 - 2
app/service/report_memory.js

@@ -1358,9 +1358,9 @@ module.exports = app => {
 
             const selects = await this.ctx.service.project.getPmDealCache(this.ctx.session.sessionProject.id);
             const pm = require('../lib/pm');
-            this.pmDeal = pm.dealData(this.ctx, this.ctx.session.sessionProject.code, selects);
+            this.pmDeal = await pm.dealData(this.ctx, this.ctx.session.sessionProject.code, selects);
 
-            result = this.pmDeal.contracts.filter(x => { return x.contracts_type === 2 });
+            result = this.pmDeal.contracts ? this.pmDeal.contracts.filter(x => { return x.contracts_type === 2 }) : [];
             // 排序:标段-合同类别-创建时间
             result.sort((x, y) => {
                 const bidSort = selects.indexOf(x.bidsection_id + '') - selects.indexOf(y.bidsection_id + '');