|
|
@@ -49,7 +49,7 @@ let calcTools = {
|
|
|
},
|
|
|
isTotalCostBill: function (treeNode) {
|
|
|
return treeNode.data.flagsIndex && treeNode.data.flagsIndex.fixed && treeNode.data.flagsIndex.fixed.flag &&
|
|
|
- treeNode.data.flagsIndex.fixed.flag == fixedFlag.ENGINEERINGCOST;
|
|
|
+ treeNode.data.flagsIndex.fixed.flag == fixedFlag.TOTAL_COST;
|
|
|
},
|
|
|
isRationCategory: function(treeNode){
|
|
|
return treeNode.sourceType === ModuleNames.ration;
|
|
|
@@ -492,17 +492,20 @@ let calcTools = {
|
|
|
(treeNode.data.subType === gljType.EQUIPMENT && calcTools.inBase(baseName, 'SC_SBF'));
|
|
|
|
|
|
if (rcj ||
|
|
|
- (treeNode.data.subType === gljType.MAIN_MATERIAL && calcTools.inBase(baseName, 'ZCF'))
|
|
|
- ) {
|
|
|
+ (treeNode.data.subType === gljType.MAIN_MATERIAL && calcTools.inBase(baseName, 'ZCF'))) {
|
|
|
+ let nodeQ = calcTools.uiNodeQty(treeNode) ? calcTools.uiNodeQty(treeNode) : 0;
|
|
|
if (treeNode.data.type == rationType.volumePrice){
|
|
|
- let nodeQ = calcTools.uiNodeQty(treeNode) ? calcTools.uiNodeQty(treeNode) : 0;
|
|
|
result = treeNode.data.marketUnitFee ? (parseFloat(treeNode.data.marketUnitFee) * nodeQ).toDecimal(decimalObj.ration.unitPrice) : 0
|
|
|
}
|
|
|
+ else if (treeNode.data.type == rationType.gljRation){
|
|
|
+ let prc = 0;
|
|
|
+ if (treeNode.data.subType === gljType.EQUIPMENT && calcTools.inBase(baseName, 'SC_SBF'))
|
|
|
+ prc = gljOprObj.getMarketPrice(treeNode)
|
|
|
+ else
|
|
|
+ prc = gljOprObj.getBasePrice(treeNode);
|
|
|
+ result = (prc * nodeQ).toDecimal(decimalObj.ration.unitPrice);
|
|
|
+ }
|
|
|
|
|
|
- else if (treeNode.data.type == rationType.gljRation)
|
|
|
- // result = treeNode.data.basePrice ? parseFloat(treeNode.data.basePrice).toDecimal(decimalObj.ration.unitPrice) : 0;
|
|
|
- // 这里因为是算基数所以要取基价,但不能直接取basePrice,受限于项目属性的三个选项。
|
|
|
- result = gljOprObj.getBasePrice(treeNode);
|
|
|
}
|
|
|
else if (treeNode.data.subType === gljType.GENERAL_MACHINE && calcTools.inBase(baseName, 'JSRGF')) {
|
|
|
let glj = {
|
|
|
@@ -1729,7 +1732,7 @@ class CalcProgram {
|
|
|
|
|
|
// 第1、2部分以外的叶子清单在没有公式的情况下可以手工修改综合单价并参与计算。
|
|
|
// 2017-09-27 需求改了,除了第 1 、 2.2部分以外,都可以手工修改综合单价、综合合价并参与计算
|
|
|
- if(!calcTools.isFBFX(treeNode) && !calcTools.isTechMeasure(treeNode)){ // if(!calcTools.isInheritFrom(treeNode, [fixedFlag.SUB_ENGINERRING, fixedFlag.MEASURE]))
|
|
|
+ if(!calcTools.isFBFX(treeNode) && !calcTools.isTechMeasure(treeNode)){
|
|
|
if (treeNode.data.feesIndex && treeNode.data.feesIndex.common){
|
|
|
let ftObj = {};
|
|
|
ftObj.fieldName = 'common';
|
|
|
@@ -1782,8 +1785,8 @@ class CalcProgram {
|
|
|
calcTools.initSummaryFee(treeNode);
|
|
|
treeNode.data.summaryFees.totalFee = tf;
|
|
|
treeNode.data.summaryFees.estimateFee = calcTools.getFee(treeNode, 'estimate.totalFee');
|
|
|
- treeNode.data.summaryFees.safetyFee = calcTools.getFee(calcTools.getNodeByFlag(fixedFlag.SAFETY_CONSTRUCTION), 'common.totalFee');
|
|
|
- treeNode.data.summaryFees.chargeFee = calcTools.getFee(calcTools.getNodeByFlag(fixedFlag.CHARGE), 'common.totalFee');
|
|
|
+ // treeNode.data.summaryFees.safetyFee = calcTools.getFee(calcTools.getNodeByFlag(fixedFlag.SAFETY_CONSTRUCTION), 'common.totalFee');
|
|
|
+ // treeNode.data.summaryFees.chargeFee = calcTools.getFee(calcTools.getNodeByFlag(fixedFlag.CHARGE), 'common.totalFee');
|
|
|
}
|
|
|
|
|
|
treeNode.data.calcTemplate = {"calcItems": []};
|
|
|
@@ -2080,8 +2083,8 @@ class CalcProgram {
|
|
|
let baseNodes = [], me = this;
|
|
|
baseNodes.push(calcTools.getNodeByFlag(fixedFlag.SUB_ENGINERRING));
|
|
|
baseNodes.push(calcTools.getNodeByFlag(fixedFlag.MEASURE));
|
|
|
- baseNodes.push(calcTools.getNodeByFlag(fixedFlag.OTHER));
|
|
|
- baseNodes.push(calcTools.getNodeByFlag(fixedFlag.CHARGE));
|
|
|
+ // baseNodes.push(calcTools.getNodeByFlag(fixedFlag.OTHER));
|
|
|
+ // baseNodes.push(calcTools.getNodeByFlag(fixedFlag.CHARGE));
|
|
|
return me.getTotalFee(baseNodes, excludeNodes, tender);
|
|
|
};
|
|
|
|