|
|
@@ -1657,16 +1657,17 @@ class CalcProgram {
|
|
|
if (treeNode.calcType == treeNodeCalcType.ctGatherBillsFees){
|
|
|
for (let node of nodes) {
|
|
|
if (node.data.feesIndex && node.data.feesIndex[ft.type]) {
|
|
|
- if (projectObj.project.property.valuationType === 'bill') { // 预算
|
|
|
- buf = (buf + parseFloatPlus(node.data.feesIndex[ft.type].unitFee)).toDecimal(decimalObj.process);
|
|
|
- btuf = (btuf + parseFloatPlus(node.data.feesIndex[ft.type].tenderUnitFee)).toDecimal(decimalObj.process);
|
|
|
- };
|
|
|
btf = (btf + parseFloatPlus(node.data.feesIndex[ft.type].totalFee)).toDecimal(decimalObj.process);
|
|
|
bttf = (bttf + parseFloatPlus(node.data.feesIndex[ft.type].tenderTotalFee)).toDecimal(decimalObj.process);
|
|
|
+
|
|
|
+ if (calcTools.isBudgetProject()){
|
|
|
+ buf = (btf / bq).toDecimal(decimalObj.process);
|
|
|
+ btuf = (bttf / bq).toDecimal(decimalObj.process);
|
|
|
+ }
|
|
|
};
|
|
|
};
|
|
|
}
|
|
|
- else if (treeNode.calcType == treeNodeCalcType.ctGatherRationsFees){ // 这里的算法要配合冷姐姐的神图才能看懂^_^
|
|
|
+ else if (treeNode.calcType == treeNodeCalcType.ctGatherRationsFees){
|
|
|
let sum_rtf = 0, sum_rttf = 0;
|
|
|
for (let node of nodes) {
|
|
|
let ruf = 0, rtuf = 0, rtf = 0, rttf = 0;
|
|
|
@@ -1747,16 +1748,14 @@ class CalcProgram {
|
|
|
|
|
|
if (treeNode.data.calcFlag == treeNodeCalcFlag.customUnitPrice){ // 修改了清单单价:以单价为准,算金额
|
|
|
uf = parseFloatPlus(treeNode.data.feesIndex.common.unitFee);
|
|
|
- if (nQ == 0) nQ = 1;
|
|
|
tf = (uf * nQ).toDecimal(decimalObj.bills.totalPrice);
|
|
|
}
|
|
|
else if (treeNode.data.calcFlag == treeNodeCalcFlag.customTotalPrice){ // 修改了清单金额:以金额为准,算单价。修改了清单数量也一样
|
|
|
tf = parseFloatPlus(treeNode.data.feesIndex.common.totalFee);
|
|
|
- uf = nQ ? (tf / nQ) : tf; // 如果工程量为0或空,综合合单直接填到综合单价
|
|
|
+ uf = nQ ? (tf / nQ) : tf; // 如果工程量为0或空,综合单价直接等于综合合价
|
|
|
uf = uf.toDecimal(decimalObj.bills.unitPrice);
|
|
|
- if (projectObj.project.property.valuationType != 'bill') { // 招投标项目, 还要反算
|
|
|
- let nQ2 = nQ ? nQ : 1;
|
|
|
- tf = (uf * nQ2).toDecimal(decimalObj.bills.totalPrice);
|
|
|
+ if (calcTools.isBillProject()) { // 招投标项目, 还要反算
|
|
|
+ tf = (uf * nQ).toDecimal(decimalObj.bills.totalPrice);
|
|
|
};
|
|
|
};
|
|
|
|
|
|
@@ -1765,14 +1764,12 @@ class CalcProgram {
|
|
|
calcTools.checkFeeField(treeNode, ftObj);
|
|
|
|
|
|
// 数量、金额时,同步定额建安费
|
|
|
- // if (treeNode.data.calcFlag == treeNodeCalcFlag.customUnitPrice || treeNode.data.calcFlag == treeNodeCalcFlag.customTotalPrice){
|
|
|
- let ftObj2 = {
|
|
|
- fieldName: 'rationCommon',
|
|
|
- unitFee: uf,
|
|
|
- totalFee: tf
|
|
|
- };
|
|
|
- calcTools.checkFeeField(treeNode, ftObj2);
|
|
|
- // };
|
|
|
+ let ftObj2 = {
|
|
|
+ fieldName: 'rationCommon',
|
|
|
+ unitFee: uf,
|
|
|
+ totalFee: tf
|
|
|
+ };
|
|
|
+ calcTools.checkFeeField(treeNode, ftObj2);
|
|
|
}
|
|
|
|
|
|
treeNode.data.calcTemplate = {"calcItems": []};
|