Переглянути джерело

清单汇总,章节合计,计算补差数据

MaiXinRong 3 роки тому
батько
коміт
0a9feb6866
1 змінених файлів з 4 додано та 4 видалено
  1. 4 4
      app/public/js/stage_gather.js

+ 4 - 4
app/public/js/stage_gather.js

@@ -140,11 +140,11 @@ $(document).ready(function () {
         SpreadJsObj.loadSheetData(gclSpread.getActiveSheet(), SpreadJsObj.DataType.Data, gclGatherData);
         loadLeafXmjData(0);
         // 章节合计
-        const chapterData = gclGatherModel.gatherChapterData(chapter, result.spec, ['total_price', 'contract_tp', 'qc_tp', 'pre_contract_tp', 'pre_qc_tp']);
+        const chapterData = gclGatherModel.gatherChapterData(chapter, result.spec, ['total_price', 'contract_tp', 'qc_tp', 'pre_contract_tp', 'pre_qc_tp', 'contract_pc_tp', 'qc_pc_tp', 'pc_tp']);
         for (const c of chapterData) {
-            c.gather_tp = ZhCalc.add(c.contract_tp, c.qc_tp);
-            c.end_contract_tp = ZhCalc.add(c.contract_tp, c.pre_contract_tp);
-            c.end_qc_tp = ZhCalc.add(c.qc_tp, c.pre_qc_tp);
+            c.gather_tp = ZhCalc.sum([c.contract_tp, c.qc_tp, c.pc_tp]);
+            c.end_contract_tp = ZhCalc.sum([c.contract_tp, c.pre_contract_tp, c.contract_pc_tp]);
+            c.end_qc_tp = ZhCalc.sum([c.qc_tp, c.pre_qc_tp, c.qc_pc_tp]);
             c.end_gather_tp = ZhCalc.add(c.end_contract_tp, c.end_qc_tp);
             c.end_final_tp = ZhCalc.add(c.end_qc_tp, c.total_price);
             c.end_final_ratio = ZhCalc.mul(ZhCalc.div(c.end_gather_tp, c.end_final_tp), 100, 2);