Browse Source

取费类别为设备的定额会计算出错

chenshilong 4 years ago
parent
commit
d40046baf4
1 changed files with 3 additions and 3 deletions
  1. 3 3
      web/building_saas/main/js/models/calc_program.js

+ 3 - 3
web/building_saas/main/js/models/calc_program.js

@@ -2244,7 +2244,7 @@ class CalcProgram {
     // 反向调价
     calcTenderReverse(treeNode, tender){
         if (tender == tenderTypes.ttReverseRation) {
-            if (treeNode.data.feesIndex.common.tenderUnitFee != treeNode.data.feesIndex.common.unitFee) {
+            if (treeNode.data.feesIndex.common && treeNode.data.feesIndex.common.tenderUnitFee != treeNode.data.feesIndex.common.unitFee) {
                 treeNode.data.feesIndex.common.tenderUnitFee = treeNode.data.feesIndex.common.unitFee;
                 treeNode.changed = true;
             }
@@ -2256,11 +2256,11 @@ class CalcProgram {
                 treeNode.changed = true;
             }
             else{    // 既没有目标金额也没有目标单价,此时要初始化使调价合价=原始综合合价,调价单价=原始综合单价。
-                if (treeNode.data.feesIndex.common.tenderUnitFee != treeNode.data.feesIndex.common.unitFee) {
+                if (treeNode.data.feesIndex.common && treeNode.data.feesIndex.common.tenderUnitFee != treeNode.data.feesIndex.common.unitFee) {
                     treeNode.data.feesIndex.common.tenderUnitFee = treeNode.data.feesIndex.common.unitFee;
                     treeNode.changed = true;
                 };
-                if (treeNode.data.feesIndex.common.tenderTotalFee != treeNode.data.feesIndex.common.totalFee) {
+                if (treeNode.data.feesIndex.common && treeNode.data.feesIndex.common.tenderTotalFee != treeNode.data.feesIndex.common.totalFee) {
                     treeNode.data.feesIndex.common.tenderTotalFee = treeNode.data.feesIndex.common.totalFee;
                     treeNode.changed = true;
                 };