Parcourir la source

Merge branch 'master' of http://smartcost.f3322.net:3000/SmartCost/ConstructionCost

chenshilong il y a 7 ans
Parent
commit
57ab2e34be

+ 2 - 2
public/web/sheet/sheet_common.js

@@ -138,14 +138,14 @@ var sheetCommonObj = {
         }
         for (var row = 0; row < data.length; row++) {
             //var cell = sheet.getCell(row, col, GC.Spread.Sheets.SheetArea.viewport);
-            this.showRowData(sheet,setting,row,data);
+            this.showRowData(sheet,setting,row,data,distTypeTree);
         }
         this.lockCells(sheet,setting);
         sheet.resumeEvent();
         sheet.resumePaint();
         //me.shieldAllCells(sheet);
     },
-    showRowData:function (sheet,setting,row,data) {
+    showRowData:function (sheet,setting,row,data,distTypeTree=null) {
         let ch = GC.Spread.Sheets.SheetArea.viewport;
         for (var col = 0; col < setting.header.length; col++) {
             //var cell = sheet.getCell(row, col, GC.Spread.Sheets.SheetArea.viewport);

+ 1 - 1
web/building_saas/main/js/models/calc_base.js

@@ -893,7 +893,7 @@ let baseFigureTemplate = {
         }
         for(let ration of rationObjs){
             for(let glj of rationGljs){
-                if(ration.ID === glj.rationID){
+                if(ration.ID === glj.rationID && glj.type === gljType.LABOUR){
                     rst = parseFloat(rst + parseFloat(glj.quantity * ration.quantity).toDecimal(decimalObj.glj.quantity)).toDecimal(decimalObj.glj.quantity);
                 }
             }

+ 1 - 1
web/building_saas/main/js/views/glj_view.js

@@ -1186,8 +1186,8 @@ var gljOprObj = {
     },
     showLibGLJSheetData: function () {
         this.gljLibSheetData = _.sortBy(this.gljLibSheetData, 'code');
-        this.gljLibSheet.setRowCount(this.gljLibSheetData.length);
         sheetCommonObj.showData(this.gljLibSheet, this.gljLibSheetSetting, this.gljLibSheetData, gljOprObj.distTypeTree);
+        this.gljLibSheet.setRowCount(this.gljLibSheetData.length);
     },
     filterLibGLJSheetData: function () {
         let me = this;