Explorar o código

季华报表,判断配置的审批人是否存在

MaiXinRong %!s(int64=4) %!d(string=hai) anos
pai
achega
790594d67e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      app/lib/rptCustomData.js

+ 2 - 0
app/lib/rptCustomData.js

@@ -242,6 +242,7 @@ class jhHelper {
         ];
         for (const dc of gsDefine.defaultCompare) {
             const auditor = auditors[dc];
+            if (!auditor) continue;
             const auditorStage = await this.ctx.service.stageBills.getAuditorStageData(tender.id, stage.id, auditor.times, auditor.order);
             loadData.push({ data: auditorStage, fields: this.billsQueryField, prefix: `r${dc}_`, relaId: 'lid' });
         }
@@ -260,6 +261,7 @@ class jhHelper {
         ];
         for (const dc of gsDefine.defaultCompare) {
             const auditor = auditors[dc];
+            if (!auditor) continue;
             const auditorStage = await this.ctx.service.stagePos.getAuditorStageData2(tender.id, stage.id, auditor.times, auditor.order);
             loadData.push({ data: auditorStage, fields: ['qc_qty'], prefix: `r${dc}_`, relaId: 'pid' });
         }