Explorar el Código

计量汇总,切换数据,显示问题

MaiXinRong hace 2 meses
padre
commit
9e468b99c7
Se han modificado 1 ficheros con 3 adiciones y 4 borrados
  1. 3 4
      app/public/js/spss_gather_stage.js

+ 3 - 4
app/public/js/spss_gather_stage.js

@@ -29,8 +29,8 @@ $(document).ready(() => {
             {title: '单价', colSpan: '1', rowSpan: '3', field: 'unit_price', hAlign: 2, width: 60, type: 'Number'},
         ],
         extraCols: [
-            {title: '标段1|第1期|数量', colSpan: '2|2|1', rowSpan: '1|1|1', field: 'quantity_1', hAlign: 2, width: 80, type: 'Number', formatTitle: '%s|%f|数量', formatField: 'gather_qty_%d'},
-            {title: '||金额', colSpan: '|1', rowSpan: '|1', field: 'total_price_1', hAlign: 2, width: 80, type: 'Number', formatField: 'gather_tp_%d'},
+            {title: '标段1|第1期|数量', colSpan: '2|2|1', rowSpan: '1|1|1', field: 'gather_qty_1', hAlign: 2, width: 80, type: 'Number', formatTitle: '%s|%f|数量', formatField: 'gather_qty_%d'},
+            {title: '||金额', colSpan: '|1', rowSpan: '|1', field: 'gather_tp_1', hAlign: 2, width: 80, type: 'Number', formatField: 'gather_tp_%d'},
         ],
         endCols: [
             {title: '合计||数量', colSpan: '2||1', rowSpan: '2||1', field: 'sum_qty', hAlign: 2, width: 80, type: 'Number'},
@@ -146,7 +146,7 @@ $(document).ready(() => {
         loadShowData: function() {
             const field = $('[name=compare-data]:checked').val();
             for (const node of billsTree.nodes) {
-                for (let i = 1; i < billsTree.count; i++) {
+                for (let i = 1; i <= billsTree.count; i++) {
                     node['gather_qty_' + i] = node[field + '_qty_' + i];
                     node['gather_tp_' + i] = node[field + '_tp_' + i];
                 }
@@ -206,7 +206,6 @@ $(document).ready(() => {
         loadCurPosData: function () {
             const node = SpreadJsObj.getSelectObject(billsSheet);
             if (node) {
-                console.log(node);
                 SpreadJsObj.loadSheetData(posSheet, 'data', node.pos || []);
             } else {
                 SpreadJsObj.loadSheetData(posSheet, 'data', []);