Forráskód Böngészése

计算程序计算后刷新到树显示

Chenshilong 7 éve
szülő
commit
f0ea4767e3

+ 6 - 5
public/calc_util.js

@@ -359,7 +359,7 @@ class Calculation {
 
                 // 费用同步到定额
                 // 引入小麦的字段检测后,快速切换定额出现计算卡顿现象,过多的循环造成。这里把她的代码拆出来,减少微循环。
-                if (!$treeNode.feesIndex[calcItem.fieldName]){
+                if (!$treeNode.data.feesIndex[calcItem.fieldName]){
                     let fee = {
                         'fieldName': calcItem.fieldName,
                         'unitFee': calcItem.unitFee,
@@ -367,14 +367,15 @@ class Calculation {
                         'tenderUnitFee': 0,
                         'tenderTotalFee': 0
                     };
-                    $treeNode.fees.push(fee);
-                    $treeNode.feesIndex[calcItem.fieldName] = fee;
+                    $treeNode.data.fees.push(fee);
+                    $treeNode.data.feesIndex[calcItem.fieldName] = fee;
                 }
                 else{
-                    $treeNode.feesIndex[calcItem.fieldName].unitFee = calcItem.unitFee;
-                    $treeNode.feesIndex[calcItem.fieldName].totalFee = calcItem.totalFee;
+                    $treeNode.data.feesIndex[calcItem.fieldName].unitFee = calcItem.unitFee;
+                    $treeNode.data.feesIndex[calcItem.fieldName].totalFee = calcItem.totalFee;
                 }
             }
+
         }
     }
 };

+ 1 - 0
web/building_saas/main/js/models/calc_program.js

@@ -3613,5 +3613,6 @@ class CalcProgram {
     calculate(treeNode){
         treeNode.data.gljList = this.project.ration_glj.getGljArrByRation(treeNode.data.ID);
         this.calc.calculate(treeNode);
+        projectObj.mainController.showTreeData();
     };
 }