Преглед на файлове

标段概况图表增加本期补差数据调整金额

laiguoran преди 2 години
родител
ревизия
4870b07c56
променени са 2 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. 3 3
      app/lib/tender_info.js
  2. 2 2
      app/view/tender/detail.ejs

+ 3 - 3
app/lib/tender_info.js

@@ -85,8 +85,8 @@ class TenderInfo {
             const chapter = this._findGclChapter(gclChapter, b, 'b_code');
             if (!chapter) continue;
             chapter.total_price = this.ctx.helper.add(chapter.total_price, b.total_price);
-            chapter.contract_tp = this.ctx.helper.add(chapter.contract_tp, b.contract_tp);
-            chapter.qc_tp = this.ctx.helper.add(chapter.qc_tp, b.qc_tp);
+            chapter.contract_tp = this.ctx.helper.sum([chapter.contract_tp, b.contract_tp, b.contract_pc_tp]);
+            chapter.qc_tp = this.ctx.helper.sum([chapter.qc_tp, b.qc_tp, b.qc_pc_tp]);
             chapter.pre_contract_tp = this.ctx.helper.add(chapter.pre_contract_tp, b.pre_contract_tp);
             chapter.pre_qc_tp = this.ctx.helper.add(chapter.pre_qc_tp, b.pre_qc_tp);
         }
@@ -105,4 +105,4 @@ class TenderInfo {
     }
 }
 
-module.exports = TenderInfo;
+module.exports = TenderInfo;

+ 2 - 2
app/view/tender/detail.ejs

@@ -788,7 +788,7 @@
                 stack: '完成',
                 data:[
                     <% for (const s of stages) {%>
-                    <%- ctx.helper.add(s.contract_tp, s.qc_tp) %>,
+                    <%- ctx.helper.sum([s.contract_tp, s.qc_tp, s.pc_tp]) %>,
                     <% } %>
                 ]
             },
@@ -799,7 +799,7 @@
                 yAxisIndex: 1,
                 data:[
                     <% for (const s of stages) {%>
-                    <%- ctx.helper.mul(ctx.helper.div(ctx.helper.add(s.contract_tp, s.qc_tp), tender.sum, 2), 100) %>,
+                    <%- ctx.helper.mul(ctx.helper.div(ctx.helper.sum([s.contract_tp, s.qc_tp, s.pc_tp]), tender.sum, 2), 100) %>,
                     <% } %>
                 ]
             },