浏览代码

fix: 修改材料计算,也应同步刷新父节点对应的造价书主树

zhangweicheng 1 年之前
父节点
当前提交
e0607c14b1
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. 9 2
      web/building_saas/main/js/models/project_glj.js

+ 9 - 2
web/building_saas/main/js/models/project_glj.js

@@ -784,8 +784,6 @@ ProjectGLJ.prototype.refreshEctrovalenceCache = function (updateMap) {
         }
         const parentGljs = this.getProjectGLJs(conditions,false)
         this.getImpactRationNodes([...gljList,...parentGljs]);//更新工料机类型的定额价格
-        
-
     }
 };
 
@@ -800,6 +798,15 @@ ProjectGLJ.prototype.refreshMaterialCalcCache = function (updateMap,isFromFeeRat
       }else {
         gljList =  this.m_updateUnitPrice([updateMap["unitPrice"]],isFromFeeRate);
       }
+      const conditions = [];
+      for(const glj of gljList){
+          const keys = this.datas.mixRatioConnectData[gljUtil.getIndex(glj)]
+          for(const key of keys){
+              conditions.push(gljOprObj.getConditionByKey(key));
+          }
+      }
+      const parentGljs = this.getProjectGLJs(conditions,false)
+      this.getImpactRationNodes([...gljList,...parentGljs]);//更新工料机类型的定额价格
    }
    return gljList;