chenshilong 7 年 前
コミット
69c4a7a96f
1 ファイル変更4 行追加5 行削除
  1. 4 5
      web/building_saas/main/js/models/calc_program.js

+ 4 - 5
web/building_saas/main/js/models/calc_program.js

@@ -356,7 +356,9 @@ let calcTools = {
             if (treeNode.data.type == rationType.volumePrice)
                 result = treeNode.data.marketUnitFee ? parseFloat(treeNode.data.marketUnitFee).toDecimal(decimalObj.ration.unitPrice) : 0
             else if (treeNode.data.type == rationType.gljRation)
-                result = treeNode.data.basePrice ? parseFloat(treeNode.data.basePrice).toDecimal(decimalObj.ration.unitPrice) : 0;
+                // result = treeNode.data.basePrice ? parseFloat(treeNode.data.basePrice).toDecimal(decimalObj.ration.unitPrice) : 0;
+                // 这里因为是算基数所以要取基价,但不能直接取basePrice,受限于项目属性的三个选项。
+                result = gljOprObj.getBasePrice(treeNode);
         }
         else if (treeNode.data.subType === gljType.GENERAL_MACHINE && baseName === '定额基价机上人工费') {
             let glj = {
@@ -1119,15 +1121,12 @@ class CalcProgram {
         else{
             let fnArr = [];
             if (treeNode.calcType == treeNodeCalcType.ctRationCalcProgram) {
-                if (treeNode.data.type == rationType.volumePrice){
+                if (treeNode.data.type == rationType.volumePrice || treeNode.data.type == rationType.gljRation){
                     delete treeNode.data.gljList;
                     let muf = treeNode.data.marketUnitFee ? treeNode.data.marketUnitFee : 0;
                     let q = calcTools.uiNodeQty(treeNode) ? calcTools.uiNodeQty(treeNode) : 0;
                     treeNode.data.marketTotalFee = (muf * q).toDecimal(decimalObj.ration.totalPrice);
                 }
-                else if (treeNode.data.type == rationType.gljRation){
-
-                }
                 else{
                     treeNode.data.gljList = me.project.ration_glj.getGljArrByRation(treeNode.data.ID);
                     // 计算程序里没有暂估费的计算规则,会漏掉,所以这里要专门算。