Przeglądaj źródła

fix(client): 调价转圈圈卡死问题。

chenshilong 3 lat temu
rodzic
commit
44a1b5dc25

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

@@ -724,7 +724,7 @@ let calcTools = {
       sumTU = undefined;
     } else if (me.isLeafBill(treeNode)) {
       if (projectObj.project.Bills.isEngineerEst(treeNode)) {
-        if (treeNode.data.feesIndex["common"] != undefined) {
+        if (treeNode.data.feesIndex?.common) {
           sumT = treeNode.data.feesIndex["common"].totalFee;
           sumU = treeNode.data.feesIndex["common"].unitFee;
           sumTT = treeNode.data.feesIndex["common"].tenderTotalFee;
@@ -2766,6 +2766,7 @@ class CalcProgram {
   reverseTenderCalc(treeNode, tender) {
     if (tender == tenderTypes.ttReverseRation) {
       if (
+        treeNode.data.feesIndex &&
         treeNode.data.feesIndex.common &&
         treeNode.data.feesIndex.common.tenderUnitFee !=
           treeNode.data.feesIndex.common.unitFee
@@ -2786,6 +2787,7 @@ class CalcProgram {
       } else {
         // 既没有目标金额也没有目标单价,此时要初始化使调价合价=原始综合合价,调价单价=原始综合单价。
         if (
+	  treeNode.data.feesIndex &&
           treeNode.data.feesIndex.common &&
           treeNode.data.feesIndex.common.tenderUnitFee !=
             treeNode.data.feesIndex.common.unitFee
@@ -2795,6 +2797,7 @@ class CalcProgram {
           treeNode.changed = true;
         }
         if (
+	  treeNode.data.feesIndex &&
           treeNode.data.feesIndex.common &&
           treeNode.data.feesIndex.common.tenderTotalFee !=
             treeNode.data.feesIndex.common.totalFee
@@ -2820,7 +2823,7 @@ class CalcProgram {
 
     // 系数=调后单价/调前单价
     let coe = 1;
-    if (treeNode.data.feesIndex.common.totalFee != 0)
+    if (treeNode.data.feesIndex?.common?.totalFee != 0)
       coe = (
         treeNode.data.targetUnitFee / treeNode.data.feesIndex.common.unitFee
       ).toDecimal(decimalObj.process);

+ 0 - 1
web/building_saas/main/js/views/billsElf.js

@@ -959,7 +959,6 @@ const BillsSub = (function() {
         });
     }
     function toggleDiv(action){
-        debugger
        if(action=='hide'){
          $('#QDZY_div').hide(); 
          $('#QDJL_div').hide();