zhongzewei hace 7 años
padre
commit
b14fe329f9

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

@@ -577,7 +577,7 @@ let baseFigureTemplate = {
                 let adjPrc = calcBase.project.projectGLJ.getAdjustPrice(glj);
                 //价差
                 let dffPrc = parseFloat(glj.unit_price.market_price - adjPrc).toDecimal(decimalObj.glj.unitPrice);
-                rst = (rst + parseFloat(glj.quantity * dffPrc).toDecimal(2)).toDecimal(2);
+                rst = (rst + parseFloat(glj.subdivisionQuantity * dffPrc).toDecimal(2)).toDecimal(2);
             }
         }
         return rst;
@@ -872,14 +872,14 @@ let baseFigureTemplate = {
     },
     'FBRGGR': function () {//分包人工工日
         let rst = 0;
-        let rationIds = [];//查找定额工料机
+        let rationObjs = [];//查找定额工料机
         let rations = calcBase.project.Ration.datas;
         let rationGljs = calcBase.project.ration_glj.datas;
         for(let ration of rations){
             if(ration.isSubcontract){
                 //定额
                 if(ration.type === rationType.ration){
-                    rationIds.push(ration.ID);
+                    rationObjs.push({ID: ration.ID, quantity: ration.quantity});
                 }
                 //量人 type 2, subType 1
                 else if(ration.type === rationType.volumePrice && ration.subType === volumePriceMaps['量人']){
@@ -891,10 +891,10 @@ let baseFigureTemplate = {
                 }
             }
         }
-        for(let rationID of rationIds){
+        for(let ration of rationObjs){
             for(let glj of rationGljs){
-                if(rationID === glj.rationID){
-                    rst = parseFloat(rst + glj.quantity).toDecimal(decimalObj.glj.quantity);
+                if(ration.ID === glj.rationID){
+                    rst = parseFloat(rst + parseFloat(glj.quantity * ration.quantity).toDecimal(decimalObj.glj.quantity)).toDecimal(decimalObj.glj.quantity);
                 }
             }
         }

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

@@ -94,7 +94,7 @@ let calcBaseView = {
         let fuc = function () {
             sheet.setRowCount(datas.length);
             let style = new GC.Spread.Sheets.Style();
-            style.formatter = MainTreeCol.getNumberFormatter(decimalObj.bills.totalPrice, true);
+            //style.formatter = MainTreeCol.getNumberFormatter(decimalObj.bills.totalPrice, true);
             sheet.setStyle(-1, 1, style);
             for(let col = 0, cLen = cols.length; col < cLen; col++){
                 sheet.getRange(-1, col, -1, 1).hAlign(GC.Spread.Sheets.HorizontalAlign[cols[col]['hAlign']]);