Browse Source

报表,调差工料明细,数据调整

MaiXinRong 2 years ago
parent
commit
46bbca98c4
1 changed files with 7 additions and 1 deletions
  1. 7 1
      app/lib/rm/material.js

+ 7 - 1
app/lib/rm/material.js

@@ -226,7 +226,13 @@ class ReportMemoryMaterial {
 
     async getMaterialGlDetail(tender_id, material_order, fields) {
         const material = await this.ctx.service.material.getDataByCondition({tid: tender_id, order: material_order});
-        return material ? await this.ctx.service.materialList.getMaterialData(tender_id, material.id) : [];
+        if (!material) return [];
+
+        if (material.is_stage_self) {
+            return await this.ctx.service.materialList.getMaterialStageData(tender_id, material.id);
+        } else {
+            return await this.ctx.service.materialList.getMaterialData(tender_id, material.id);
+        }
     }
 
     async getMaterialBills(tender_id, material_order, fields, showLevel) {