소스 검색

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

MaiXinRong 2 년 전
부모
커밋
46bbca98c4
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  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) {