MaiXinRong 5 years ago
parent
commit
2a251a38e8
2 changed files with 7 additions and 5 deletions
  1. 1 2
      app/const/spread.js
  2. 6 3
      app/public/js/gcl_gather.js

+ 1 - 2
app/const/spread.js

@@ -311,9 +311,8 @@ const stageGather = {
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 60, type: 'Number'},
             {title: '本期合同计量|数量', colSpan: '2|1', rowSpan: '1|1', field: 'contract_qty', hAlign: 2, width: 60, type: 'Number'},
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'contract_tp', hAlign: 2, width: 60, type: 'Number'},
-            {title: '本期数量变更|数量', colSpan: '3|1', rowSpan: '1|1', field: 'qc_qty', hAlign: 2, width: 60, type: 'Number'},
+            {title: '本期数量变更|数量', colSpan: '2|1', rowSpan: '1|1', field: 'qc_qty', hAlign: 2, width: 60, type: 'Number'},
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'qc_tp', hAlign: 2, width: 60, type: 'Number'},
-            {title: '|变更令', colSpan: '|1', rowSpan: '|1', field: 'qc_tp_bgl', hAlign: 2, width: 60, formatter: '@'},
             {title: '本期完成计量|数量', colSpan: '2|1', rowSpan: '1|1', field: 'gather_qty', hAlign: 2, width: 60, type: 'Number'},
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'gather_tp', hAlign: 2, width: 60, type: 'Number'},
             {title: '截止本期合同计量|数量', colSpan: '2|1', rowSpan: '1|1', field: 'end_contract_qty', hAlign: 2, width: 60, type: 'Number'},

+ 6 - 3
app/public/js/gcl_gather.js

@@ -13,8 +13,10 @@ const gclGatherModel = (function () {
     // 需要汇总计算的字段
     const ledgerGatherFields = ['quantity', 'total_price', 'deal_qty', 'deal_tp',
         'contract_qty', 'contract_tp', 'qc_qty', 'qc_tp',
-        'pre_contract_qty', 'pre_contract_tp', 'pre_qc_qty', 'pre_qc_tp'];
-    const posGatherFields = ['quantity', 'contract_qty', 'qc_qty', 'gather_qty', 'pre_contract_qty', 'pre_qc_qty'];
+        'pre_contract_qty', 'pre_contract_tp', 'pre_qc_qty', 'pre_qc_tp',
+        'end_contract_qty', 'end_contract_tp', 'end_qc_qty', 'end_qc_tp'];
+    const posGatherFields = ['quantity', 'contract_qty', 'qc_qty', 'gather_qty',
+        'pre_contract_qty', 'pre_qc_qty', 'pre_gather_qty', 'end_contract_qty', 'end_qc_qty', 'end_gather_qty'];
     // 初始化 清单树
     const gsTreeSetting = {
         id: 'ledger_id',
@@ -57,7 +59,6 @@ const gclGatherModel = (function () {
         if (preStage) {
             gsTree.loadPreStageData(preStage);
         }
-        // todo 加载变更令数据
     }
 
     function loadPosData(pos, curPos, prePos) {
@@ -332,6 +333,8 @@ const gclGatherModel = (function () {
             for (const xmj of gcl.leafXmjs) {
                 xmj.pre_gather_qty = ZhCalc.add(xmj.pre_contract_qty, xmj.pre_qc_qty);
                 xmj.gather_qty = ZhCalc.add(xmj.contract_qty, xmj.qc_qty);
+                xmj.end_contract_qty = ZhCalc.add(xmj.pre_contract_qty, xmj.contract_qty);
+                xmj.end_qc_qty = ZhCalc.add(xmj.pre_qc_qty, xmj.qc_qty);
                 xmj.end_gather_qty = ZhCalc.add(xmj.pre_gather_qty, xmj.gather_qty);
                 xmj.end_final_qty = ZhCalc.add(xmj.end_qc_qty, xmj.quantity);
                 xmj.end_gather_percent = ZhCalc.mul(ZhCalc.div(xmj.end_gather_qty, xmj.end_final_qty), 100, 2);