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

fix: (公路云、养护云)使用综合电价计算电预算价,造价书界面与定额同层的机械预算单价应同步变。 修改组成物消耗量也同样处理

zhangweicheng 1 éve
szülő
commit
4636b96f16

+ 15 - 3
web/building_saas/main/js/models/project_glj.js

@@ -631,7 +631,7 @@ ProjectGLJ.prototype.m_updateUnitPrice = function (datas,isFromFeeRate=false) {/
     //刷新定额工料机
     gljOprObj.refreshView();
     //socket推送更新信息
-    projectGljObject.onUnitFileChange(isFromFeeRate?false:true);//如果是从更新费率过来的,不用在项目属性上做标记,费率那里已经自动计算所有节点了
+    projectGljObject.onUnitFileChange(!isFromFeeRate);//如果是从更新费率过来的,不用在项目属性上做标记,费率那里已经自动计算所有节点了
 
     return gljList
 
@@ -769,11 +769,23 @@ ProjectGLJ.prototype.refreshEctrovalenceCache = function (updateMap) {
     }
 
     if(updateMap["unitPrice"]) {
+        let gljList = [];
         if(Array.isArray(updateMap["unitPrice"])){
-            this.m_updateUnitPrice(updateMap["unitPrice"]);
+            gljList=  this.m_updateUnitPrice(updateMap["unitPrice"]);
         }else {
-            this.m_updateUnitPrice([updateMap["unitPrice"]]);
+            gljList = this.m_updateUnitPrice([updateMap["unitPrice"]]);
         }
+        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]);//更新工料机类型的定额价格
+        
+
     }
 };
 

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

@@ -709,6 +709,7 @@ projectGljObject = {
     projectGLJ.batchUpdateConsumption(updateData, updateMap, async function () {
       //更新人材机汇总表
       me.refreshDataSheet();
+      projectGLJ.getImpactRationNodes([ me.getProjectGLJSelected()]);//更新工料机类型的定额价格
       let materialGljList = await projectGLJ.calcAllMaterialWhenChange();
       if (materialGljList.length == 0) me.onUnitFileChange(true);
       gljOprObj.refreshView();