瀏覽代碼

Merge branch 'budget' of http://192.168.1.41:3000/SmartCost/ConstructionCost into budget

vian 4 年之前
父節點
當前提交
729592d9b4
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      modules/reports/controllers/rpt_controller.js

+ 6 - 1
modules/reports/controllers/rpt_controller.js

@@ -212,7 +212,12 @@ async function getAllPagesCommon(construct_id, user_id, prj_id, prj_ids, rpt_id,
             let promiseArr = [null, null, null];
             if (summaryRst.length > 0) {
                 if (summaryRst.indexOf(`Budget`) >= 0 || summaryRst.indexOf(`BudgetDetail`) >= 0) {
-                    promiseArr[0] = bill_facade.getBudgetSummary(construct_id); //与其他汇总类的请求互斥,不能同时出现!
+                    if (flag.budgetSumType && flag.budgetSumType === 'budget_single') {
+                        //单项工程
+                        promiseArr[0] = bill_facade.getSinglesBudgetSummary(construct_id); //与其他汇总类的请求互斥,不能同时出现!
+                    } else {
+                        promiseArr[0] = bill_facade.getBudgetSummary(construct_id); //与其他汇总类的请求互斥,不能同时出现!
+                    }
                 }
                 if (summaryRst.indexOf(`Construct`) >= 0 || summaryRst.indexOf(`ConstructDetail`) >= 0) {
                     promiseArr[0] = pm_facade.getSummaryInfoByTender(prj_id, pm_facade.projectType.project);