|
|
@@ -338,15 +338,15 @@ function getReportData(nameList,items,prjTypeNames,compilationScopes,decimal,isP
|
|
|
let datas = [],totalItem = null;
|
|
|
let overWrite = null;
|
|
|
if(overWriteUrl && overWriteUrl!=""){
|
|
|
- overWrite = require("../../.."+compilation.overWriteUrl);
|
|
|
+ overWrite = require("../../.."+overWriteUrl);
|
|
|
}
|
|
|
setChildrenDatas(items,datas);
|
|
|
let totalExp = totalItem.calcBase;
|
|
|
if(isProgressiveType&&progressiveInterval){
|
|
|
for(let t of datas){
|
|
|
- totalExp.replace(t.ID,t.billsTtlPrice+"");
|
|
|
+ totalExp = totalExp.replace(t.ID,t.billsTtlPrice+"");
|
|
|
}
|
|
|
- totalExp.replace(/@/g,"");
|
|
|
+ totalExp = totalExp.replace(/@/g,"");
|
|
|
let nTotal = eval(totalExp);
|
|
|
totalItem.billsTtlPrice = scMathUtil.roundForObj(nTotal,decimal.bills.totalPrice);
|
|
|
}
|
|
|
@@ -393,6 +393,7 @@ function getReportData(nameList,items,prjTypeNames,compilationScopes,decimal,isP
|
|
|
billsAmounts:[],
|
|
|
'技术经济指标':[],
|
|
|
billsLevel:level,
|
|
|
+ calcBase:bills.calcBase,
|
|
|
billsMemos:bills.remark
|
|
|
};
|
|
|
let total = 0;
|
|
|
@@ -429,14 +430,16 @@ function getReportData(nameList,items,prjTypeNames,compilationScopes,decimal,isP
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(progressiveInterval && isProgressiveType&&calcUtil.isProgressive(bills.calcBase,overWrite?overWrite.progression:undefined) && rootFlag == fixedFlag.MAINTENANCE_EXPENSES){
|
|
|
- let calcTotal = calcUtil.getProgressiveFee(baseTotal,bills.calcBase,progressiveInterval,decimal.bills.totalPrice,overWrite?overWrite.deficiency:undefined);
|
|
|
- tem.billsTtlPrice = calcTotal;
|
|
|
- let rate = scMathUtil.roundForObj(calcTotal * 100/baseTotal,decimal.feeRate);
|
|
|
- tem.billsMemos = "费率:"+rate+"%";
|
|
|
- //“费率:n%”,n为汇总后重算的金额/汇总后的基数
|
|
|
- }else{
|
|
|
- tem.billsTtlPrice = scMathUtil.roundForObj(total,decimal.bills.totalPrice);
|
|
|
+ tem.billsTtlPrice = scMathUtil.roundForObj(total,decimal.bills.totalPrice);
|
|
|
+ if(progressiveInterval && isProgressiveType && rootFlag == fixedFlag.MAINTENANCE_EXPENSES){
|
|
|
+ let baseArr = calcUtil.getProgressive(bills.calcBase,overWrite?overWrite.progression:undefined);
|
|
|
+ if(baseArr.length > 0){
|
|
|
+ let calcTotal = calcUtil.getProgressiveFee(baseTotal,baseArr[0],progressiveInterval,decimal.bills.totalPrice,overWrite?overWrite.deficiency:undefined);
|
|
|
+ tem.billsTtlPrice = calcTotal;
|
|
|
+ let rate = scMathUtil.roundForObj(calcTotal * 100/baseTotal,decimal.feeRate);
|
|
|
+ tem.billsMemos = "费率:"+rate+"%";
|
|
|
+ //“费率:n%”,n为汇总后重算的金额/汇总后的基数
|
|
|
+ }
|
|
|
}
|
|
|
tem.rationTotal = scMathUtil.roundForObj(rationTotal,decimal.bills.totalPrice);//定额总建安费
|
|
|
tem['技术经济综合指标'] = (tem.billsTtlAmt && parseFloat(tem.billsTtlAmt) !== 0)?scMathUtil.roundForObj(tem.billsTtlPrice/tem.billsTtlAmt,2):scMathUtil.roundForObj(tem.billsTtlPrice,2);
|
|
|
@@ -583,7 +586,7 @@ async function getBillsByProjectID(projectID){
|
|
|
if(commonFee&&commonFee.totalFee) prices[projectName] = commonFee.totalFee;
|
|
|
if(commonFee&&commonFee.unitFee) unitPrices[projectName] = commonFee.unitFee;
|
|
|
if(rationFee&&rationFee.totalFee) rationCommons[projectName] = rationFee.totalFee;
|
|
|
- baseProgressiveFees = baseProgressiveFees[projectName] = b.baseProgressiveFee;
|
|
|
+ baseProgressiveFees[projectName] = b.baseProgressiveFee;
|
|
|
|
|
|
quantityMap[projectName] = b.quantity;
|
|
|
let flagIndex = _.find(b._doc.flags,{'fieldName':'fixed'});
|