|
@@ -342,13 +342,14 @@ function getReportData(nameList,items,prjTypeNames,compilationScopes,decimal,isP
|
|
|
}
|
|
}
|
|
|
setChildrenDatas(items,datas);
|
|
setChildrenDatas(items,datas);
|
|
|
let totalExp = totalItem.calcBase;
|
|
let totalExp = totalItem.calcBase;
|
|
|
- if(isProgressiveType&&progressiveInterval){
|
|
|
|
|
|
|
+ if(isProgressiveType&&progressiveInterval){//有累进的要重新计算总金额和技术经济综合指标
|
|
|
for(let t of datas){
|
|
for(let t of datas){
|
|
|
totalExp = totalExp.replace(t.ID,t.billsTtlPrice+"");
|
|
totalExp = totalExp.replace(t.ID,t.billsTtlPrice+"");
|
|
|
}
|
|
}
|
|
|
totalExp = totalExp.replace(/@/g,"");
|
|
totalExp = totalExp.replace(/@/g,"");
|
|
|
let nTotal = eval(totalExp);
|
|
let nTotal = eval(totalExp);
|
|
|
totalItem.billsTtlPrice = scMathUtil.roundForObj(nTotal,decimal.bills.totalPrice);
|
|
totalItem.billsTtlPrice = scMathUtil.roundForObj(nTotal,decimal.bills.totalPrice);
|
|
|
|
|
+ totalItem['技术经济综合指标'] = (totalItem.billsTtlAmt && parseFloat(totalItem.billsTtlAmt) !== 0)?scMathUtil.roundForObj(totalItem.billsTtlPrice/totalItem.billsTtlAmt,2):scMathUtil.roundForObj(totalItem.billsTtlPrice,2);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for(let d of datas){
|
|
for(let d of datas){
|
|
@@ -373,8 +374,11 @@ function getReportData(nameList,items,prjTypeNames,compilationScopes,decimal,isP
|
|
|
arr.push(tbill);
|
|
arr.push(tbill);
|
|
|
let sumChildren = setChildrenDatas(c.children,arr,level+1,rootFlag);
|
|
let sumChildren = setChildrenDatas(c.children,arr,level+1,rootFlag);
|
|
|
if(isProgressiveType && progressiveInterval && rootFlag == fixedFlag.MAINTENANCE_EXPENSES){//如果要累进的,父节点要重新汇总
|
|
if(isProgressiveType && progressiveInterval && rootFlag == fixedFlag.MAINTENANCE_EXPENSES){//如果要累进的,父节点要重新汇总
|
|
|
|
|
+ if(c.children.length > 0){
|
|
|
|
|
+ tbill.billsTtlPrice = sumChildren;
|
|
|
|
|
+ tbill['技术经济综合指标'] = (tbill.billsTtlAmt && parseFloat(tbill.billsTtlAmt) !== 0)?scMathUtil.roundForObj(tbill.billsTtlPrice/tbill.billsTtlAmt,2):scMathUtil.roundForObj(tbill.billsTtlPrice,2);
|
|
|
|
|
+ }
|
|
|
if(level>0) temTotalPrice = scMathUtil.roundForObj(tbill.billsTtlPrice + temTotalPrice,decimal.bills.totalPrice);
|
|
if(level>0) temTotalPrice = scMathUtil.roundForObj(tbill.billsTtlPrice + temTotalPrice,decimal.bills.totalPrice);
|
|
|
- if(c.children.length > 0) tbill.billsTtlPrice = sumChildren;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return temTotalPrice;
|
|
return temTotalPrice;
|