瀏覽代碼

暂估费:点造价计算,时而计算时而消失问题。(totalQuantity值不稳定)

chenshilong 7 年之前
父節點
當前提交
1c41acc168
共有 2 個文件被更改,包括 10 次插入4 次删除
  1. 5 3
      web/building_saas/main/js/models/calc_program.js
  2. 5 1
      web/building_saas/main/js/models/ration_glj.js

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

@@ -1387,7 +1387,7 @@ class CalcProgram {
     };
     };
 
 
     // 只计算treeNode自身。changedArr: 外部传来的一个数组,专门存储发生变动的节点。
     // 只计算treeNode自身。changedArr: 外部传来的一个数组,专门存储发生变动的节点。
-    innerCalc(treeNode, changedArr){
+    innerCalc(treeNode, changedArr, isTender = false){
         let me = this;
         let me = this;
         // 仅用作树节点显示的工料机不能参与计算。
         // 仅用作树节点显示的工料机不能参与计算。
         if (treeNode.sourceType === ModuleNames.ration_glj) return;
         if (treeNode.sourceType === ModuleNames.ration_glj) return;
@@ -1669,8 +1669,10 @@ class CalcProgram {
                     calcNodes(node.children);
                     calcNodes(node.children);
                 };
                 };
 
 
-                if ((calcType == calcAllType.catAll || calcType == node.sourceType) && node.calcType != treeNodeCalcType.ctCalcBaseValue) {
-                    me.innerCalc(node, changedNodes);
+                if (calcType == calcAllType.catAll || calcType == node.sourceType) {
+                    node.calcType = calcTools.getCalcType(node);
+                    if (node.calcType != treeNodeCalcType.ctCalcBaseValue)
+                        me.innerCalc(node, changedNodes);
                 };
                 };
             }
             }
         };
         };

+ 5 - 1
web/building_saas/main/js/models/ration_glj.js

@@ -50,7 +50,11 @@ var ration_glj = {
             }
             }
             else{
             else{
                 let result = this.datas.filter(function (data) {
                 let result = this.datas.filter(function (data) {
-                    return data.rationID === ration.ID;
+                    if(data.rationID === ration.ID){
+                        gljOprObj.getTotalQuantity(data, ration);
+                        return true;
+                    }
+                    return false;
                 })
                 })
                 result = gljOprObj.combineWithProjectGlj(result);
                 result = gljOprObj.combineWithProjectGlj(result);
                 return result;
                 return result;