|
|
@@ -290,6 +290,23 @@ let calcTools = {
|
|
|
treeNode.changed = true;
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ checkRationCommon: function (treeNode, obj) {
|
|
|
+ let commonFields = ["rationCommon", "indexCommon"];
|
|
|
+ for (const cf of commonFields) {
|
|
|
+ let ft = cpFeeTypes.find((e) => e.type === cf);
|
|
|
+ if (ft) {
|
|
|
+ calcTools.checkFeeField(treeNode, {
|
|
|
+ fieldName: cf,
|
|
|
+ unitFee: obj.unitFee,
|
|
|
+ totalFee: obj.totalFee,
|
|
|
+ tenderUnitFee: obj.tenderUnitFee,
|
|
|
+ tenderTotalFee: obj.tenderTotalFee,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
setFieldValue: function (treeNode, fieldName, value) {
|
|
|
if (value == null) value = 0;
|
|
|
if (fieldName.includes("feesIndex")) {
|
|
|
@@ -1971,11 +1988,7 @@ class CalcProgram {
|
|
|
bttf = sum_rttf;
|
|
|
}
|
|
|
|
|
|
- /* if (
|
|
|
- calcTools.isBillProject() &&
|
|
|
- (ft.type == "common" || ft.type == "rationCommon")
|
|
|
- ) */
|
|
|
- if (me.project.property.billsCalcMode == leafBillGetFeeType.rationPriceConverse && (ft.type == "common" || ft.type == "rationCommon")) {
|
|
|
+ if (me.project.property.billsCalcMode == leafBillGetFeeType.rationPriceConverse && ["common", "rationCommon", "indexCommon"].includes(ft.type)) {
|
|
|
// 招投标项目, 还要反算
|
|
|
// 9-24 新需求 开放正算反算选项,按选项判断
|
|
|
buf = buf.toDecimal(decimalObj.bills.unitPrice);
|
|
|
@@ -2006,7 +2019,7 @@ class CalcProgram {
|
|
|
delete treeNode.data.gljList;
|
|
|
let me = this;
|
|
|
me.deleteProperties(treeNode, ["programID"]);
|
|
|
- me.deleteUselessFees(treeNode, ["common", "rationCommon"]);
|
|
|
+ me.deleteUselessFees(treeNode, ["common", "rationCommon", "indexCommon"]);
|
|
|
|
|
|
let nQ = calcTools.uiNodeQty(treeNode);
|
|
|
let nTQ = calcTools.uiNodeTenderQty(treeNode);
|
|
|
@@ -2032,14 +2045,10 @@ class CalcProgram {
|
|
|
}
|
|
|
calcTools.checkFeeField(treeNode, feeItem);
|
|
|
//第一部分建安费下,使用基数计算的清单,定额建安费应=金额
|
|
|
- if (cbTools.getBelongFlagList(treeNode).includes(fixedFlag.CONSTRUCTION_INSTALL_FEE))
|
|
|
- calcTools.checkFeeField(treeNode, {
|
|
|
- fieldName: "rationCommon",
|
|
|
- unitFee: uf,
|
|
|
- totalFee: tf,
|
|
|
- tenderUnitFee: tuf,
|
|
|
- tenderTotalFee: ttf,
|
|
|
- });
|
|
|
+ if (cbTools.getBelongFlagList(treeNode).includes(fixedFlag.CONSTRUCTION_INSTALL_FEE)) {
|
|
|
+ let obj = { unitFee: uf, totalFee: tf, tenderUnitFee: tuf, tenderTotalFee: ttf };
|
|
|
+ calcTools.checkRationCommon(treeNode, obj);
|
|
|
+ }
|
|
|
|
|
|
// 总造价清单还要做单项工程、建设项目的四大项金额汇总
|
|
|
if (calcTools.isTotalCostBill(treeNode)) {
|
|
|
@@ -2049,6 +2058,7 @@ class CalcProgram {
|
|
|
// treeNode.data.summaryFees.totalFee = tf;
|
|
|
// treeNode.data.summaryFees.estimateFee = calcTools.getFee(treeNode, 'estimate.totalFee');
|
|
|
}
|
|
|
+
|
|
|
treeNode.data.calcTemplate = {
|
|
|
calcItems: [],
|
|
|
};
|
|
|
@@ -2058,7 +2068,7 @@ class CalcProgram {
|
|
|
let me = this;
|
|
|
delete treeNode.data.gljList;
|
|
|
me.deleteProperties(treeNode, ["calcBase", "calcBaseValue", "tenderCalcBaseValue", "programID"]);
|
|
|
- me.deleteUselessFees(treeNode, ["common", "rationCommon"]);
|
|
|
+ me.deleteUselessFees(treeNode, ["common", "rationCommon", "indexCommon"]);
|
|
|
|
|
|
if (treeNode.data.feesIndex && treeNode.data.feesIndex.common) {
|
|
|
let ftObj = {
|
|
|
@@ -2096,15 +2106,15 @@ class CalcProgram {
|
|
|
(calcTools.isInheritFrom(treeNode, fixedFlag.CONSTRUCTION_INSTALL_FEE) || calcTools.isInheritFrom(treeNode, fixedFlag.ONE_SEVEN_BILLS))
|
|
|
)
|
|
|
need = true;
|
|
|
+ debugger;
|
|
|
if (need) {
|
|
|
- let ftObj2 = {
|
|
|
- fieldName: "rationCommon",
|
|
|
+ let obj = {
|
|
|
unitFee: ftObj.unitFee,
|
|
|
totalFee: ftObj.totalFee,
|
|
|
tenderUnitFee: ftObj.tenderUnitFee,
|
|
|
tenderTotalFee: ftObj.tenderTotalFee,
|
|
|
};
|
|
|
- calcTools.checkFeeField(treeNode, ftObj2);
|
|
|
+ calcTools.checkRationCommon(treeNode, obj);
|
|
|
}
|
|
|
}
|
|
|
|