Преглед изворни кода

计量单元,合同完成率

MaiXinRong пре 3 месеци
родитељ
комит
827bbae067
2 измењених фајлова са 5 додато и 2 уклоњено
  1. 4 2
      app/const/spread.js
  2. 1 0
      app/public/js/stage.js

+ 4 - 2
app/const/spread.js

@@ -672,10 +672,11 @@ const BaseSpreadColSetting = {
                 {title: '|完成', colSpan: '|1', rowSpan: '|1', field: 'gather_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
             ],
             end_calc: [
-                {title: '截止本期计量|合同', colSpan: '4|1', rowSpan: '1|1', field: 'end_contract_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
+                {title: '截止本期计量|合同', colSpan: '5|1', rowSpan: '1|1', field: 'end_contract_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
                 {title: '|数量变更', colSpan: '|1', rowSpan: '|1', field: 'end_qc_qty', hAlign: 2, width: 80, type: 'Number', readOnly: true},
                 {title: '|不计价', colSpan: '|1', rowSpan: '|1', field: 'end_qc_minus_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
                 {title: '|完成', colSpan: '|1', rowSpan: '|1', field: 'end_gather_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
+                {title: '|合同完成率(%)', colSpan: '|1', rowSpan: '|1', field: 'end_contract_percent', hAlign: 2, width: 65, readOnly: true, type: 'Number'},
             ],
             postil: [{title: '本期批注', colSpan: '1', rowSpan: '2', field: 'postil', hAlign: 0, width: 80, formatter: '@', cellType: 'autoTip'},],
             drawing_code: [{title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@', textIndent: 1}],
@@ -830,10 +831,11 @@ const BaseSpreadColSetting = {
                 {title: '|完成', colSpan: '|1', rowSpan: '|1', field: 'gather_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
             ],
             end_calc: [
-                {title: '截止本期计量|合同', colSpan: '4|1', rowSpan: '1|1', field: 'end_contract_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
+                {title: '截止本期计量|合同', colSpan: '5|1', rowSpan: '1|1', field: 'end_contract_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
                 {title: '|数量变更', colSpan: '|1', rowSpan: '|1', field: 'end_qc_qty', hAlign: 2, width: 80, type: 'Number', readOnly: true},
                 {title: '|不计价', colSpan: '|1', rowSpan: '|1', field: 'end_qc_minus_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
                 {title: '|完成', colSpan: '|1', rowSpan: '|1', field: 'end_gather_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
+                {title: '|合同完成率(%)', colSpan: '|1', rowSpan: '|1', field: 'end_contract_percent', hAlign: 2, width: 65, readOnly: true, type: 'Number'},
             ],
             postil: [{title: '本期批注', colSpan: '1', rowSpan: '2', field: 'postil', hAlign: 0, width: 80, formatter: '@', cellType: 'autoTip'},],
             drawing_code: [{title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@', textIndent: 1}],

+ 1 - 0
app/public/js/stage.js

@@ -359,6 +359,7 @@ $(document).ready(() => {
         pos.end_gather_qty = ZhCalc.add(pos.pre_gather_qty, pos.gather_qty);
         pos.sum = ZhCalc.add(pos.end_qc_qty, pos.quantity);
         pos.end_gather_percent = ZhCalc.mul(ZhCalc.div(pos.end_gather_qty, pos.sum), 100, 2);
+        pos.end_contract_percent = ZhCalc.mul(ZhCalc.div(pos.end_contract_qty, pos.quantity), 100, 2);
         pos.estimate_qty = !checkZero(pos.real_qty)
             ? ZhCalc.sub(ZhCalc.sub(pos.real_qty, pos.quantity), pos.end_qc_qty)
             : null;