Jelajahi Sumber

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

chenshilong 5 tahun lalu
induk
melakukan
38e1a2815e
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      web/building_saas/main/js/models/calc_program.js

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

@@ -2336,7 +2336,7 @@
    // 反向调价
    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;
        }
@@ -2347,11 +2347,11 @@
          treeNode.data.targetTotalFee = (treeNode.data.targetUnitFee * treeNode.data.quantity).toDecimal(decimalObj.decimal('totalPrice', treeNode));
          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;
          };