zhangweicheng 5 лет назад
Родитель
Сommit
dc4d0f8838
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      web/building_saas/main/js/models/project_glj.js

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

@@ -934,6 +934,7 @@ ProjectGLJ.prototype.calcEachFreightOrPrice = function (temp,type,priceMap) {//
         let decimal = type == "freight"?getDecimal("glj.unitPrice"):getDecimal("glj.unitPriceHasMix");
         //因为材料计算的数据是保存在单价文件里的,有可能存在共享的情况,这样的话就不能用单价文件里的项目工料机ID来匹配,要用5大项匹配
         let pgljMap = {};
+        if(!temp.rations || temp.rations.length == 0 )return null;//没有定额时不计算
         for(let pg of this.datas.gljList){
             pgljMap[gljUtil.getIndex(pg)] = pg
         }