|
@@ -519,11 +519,11 @@ let calcTools = {
|
|
|
if (treeNode.data.type != rationType.volumePrice && treeNode.data.type != rationType.gljRation) return;
|
|
|
let result = 0, me = this;
|
|
|
if (
|
|
|
- (treeNode.data.subType === gljType.LABOUR && baseName === calcBaseNames.DEJJRGF) ||
|
|
|
- (baseMaterialTypes.includes(treeNode.data.subType) && baseName === calcBaseNames.DEJJCLF) ||
|
|
|
- (treeNode.data.subType === gljType.GENERAL_MACHINE && baseName === calcBaseNames.DEJJJXF) ||
|
|
|
- (treeNode.data.subType === gljType.MAIN_MATERIAL && baseName === calcBaseNames.ZCF) ||
|
|
|
- (treeNode.data.subType === gljType.EQUIPMENT && baseName === calcBaseNames.SBF)) {
|
|
|
+ (treeNode.data.subType === gljType.LABOUR && baseName === rationCalcBasesNameMap.DEJJRGF) ||
|
|
|
+ (baseMaterialTypes.includes(treeNode.data.subType) && baseName === rationCalcBasesNameMap.DEJJCLF) ||
|
|
|
+ (treeNode.data.subType === gljType.GENERAL_MACHINE && baseName === rationCalcBasesNameMap.DEJJJXF) ||
|
|
|
+ (treeNode.data.subType === gljType.MAIN_MATERIAL && baseName === rationCalcBasesNameMap.ZCF) ||
|
|
|
+ (treeNode.data.subType === gljType.EQUIPMENT && baseName === rationCalcBasesNameMap.SBF)) {
|
|
|
if (treeNode.data.type == rationType.volumePrice)
|
|
|
result = treeNode.data.marketUnitFee ? parseFloat(treeNode.data.marketUnitFee).toDecimal(decimalObj.ration.unitPrice) : 0
|
|
|
else if (treeNode.data.type == rationType.gljRation)
|
|
@@ -531,7 +531,7 @@ let calcTools = {
|
|
|
// 这里因为是算基数所以要取基价,但不能直接取basePrice,受限于项目属性的三个选项。
|
|
|
result = gljOprObj.getBasePrice(treeNode);
|
|
|
}
|
|
|
- else if (treeNode.data.subType === gljType.GENERAL_MACHINE && baseName === calcBaseNames.DEJJJSRGF) {
|
|
|
+ else if (treeNode.data.subType === gljType.GENERAL_MACHINE && baseName === rationCalcBasesNameMap.DEJJJSRGF) {
|
|
|
let glj = {
|
|
|
'code': treeNode.data.code,
|
|
|
'name': treeNode.data.name,
|
|
@@ -544,11 +544,11 @@ let calcTools = {
|
|
|
}
|
|
|
else if (
|
|
|
(treeNode.data.type == rationType.gljRation) &&
|
|
|
- ((treeNode.data.subType === gljType.LABOUR && baseName === calcBaseNames.RGFJC) ||
|
|
|
- (baseMaterialTypes.includes(treeNode.data.subType) && baseName === calcBaseNames.CLFJC) ||
|
|
|
- (treeNode.data.subType === gljType.GENERAL_MACHINE && baseName === calcBaseNames.JXFJC) ||
|
|
|
- (treeNode.data.subType === gljType.MAIN_MATERIAL && baseName === calcBaseNames.ZCFJC) ||
|
|
|
- (treeNode.data.subType === gljType.EQUIPMENT && baseName === calcBaseNames.SBFJC))
|
|
|
+ ((treeNode.data.subType === gljType.LABOUR && baseName === rationCalcBasesNameMap.RGFJC) ||
|
|
|
+ (baseMaterialTypes.includes(treeNode.data.subType) && baseName === rationCalcBasesNameMap.CLFJC) ||
|
|
|
+ (treeNode.data.subType === gljType.GENERAL_MACHINE && baseName === rationCalcBasesNameMap.JXFJC) ||
|
|
|
+ (treeNode.data.subType === gljType.MAIN_MATERIAL && baseName === rationCalcBasesNameMap.ZCFJC) ||
|
|
|
+ (treeNode.data.subType === gljType.EQUIPMENT && baseName === rationCalcBasesNameMap.SBFJC))
|
|
|
) {
|
|
|
let aprice = me.uiGLJPrice(treeNode.data.basePrice); // 量价虚拟的工料机不可能有发文,这里直接取定额价。
|
|
|
let mprice = me.uiGLJPrice(treeNode.data.marketUnitFee);
|
|
@@ -567,22 +567,22 @@ let calcTools = {
|
|
|
supplyT = [supplyType.JDYG];
|
|
|
|
|
|
let gljT = [], compT = [];
|
|
|
- if (baseName == calcBaseNames.JGDEJJRGF || baseName == calcBaseNames.JDDEJJRGF){
|
|
|
+ if (baseName == rationCalcBasesNameMap.JGDEJJRGF || baseName == rationCalcBasesNameMap.JDDEJJRGF){
|
|
|
gljT = [gljType.LABOUR];
|
|
|
}
|
|
|
- else if (baseName == calcBaseNames.JGDEJJCLF || baseName == calcBaseNames.JDDEJJCLF){
|
|
|
+ else if (baseName == rationCalcBasesNameMap.JGDEJJCLF || baseName == rationCalcBasesNameMap.JDDEJJCLF){
|
|
|
gljT = baseMaterialTypes;
|
|
|
compT = compositionTypes;
|
|
|
}
|
|
|
- else if (baseName == calcBaseNames.JGDEJJJXF || baseName == calcBaseNames.JDDEJJJXF){
|
|
|
+ else if (baseName == rationCalcBasesNameMap.JGDEJJJXF || baseName == rationCalcBasesNameMap.JDDEJJJXF){
|
|
|
gljT = baseMachineTypes;
|
|
|
compT = [gljType.GENERAL_MACHINE];
|
|
|
}
|
|
|
- else if (baseName == calcBaseNames.JGZCF || baseName == calcBaseNames.JDZCF){
|
|
|
+ else if (baseName == rationCalcBasesNameMap.JGZCF || baseName == rationCalcBasesNameMap.JDZCF){
|
|
|
gljT = [gljType.MAIN_MATERIAL];
|
|
|
compT = [gljType.MAIN_MATERIAL];
|
|
|
}
|
|
|
- else if (baseName == calcBaseNames.JGSBF || baseName == calcBaseNames.JDSBF){
|
|
|
+ else if (baseName == rationCalcBasesNameMap.JGSBF || baseName == rationCalcBasesNameMap.JDSBF){
|
|
|
gljT = [gljType.EQUIPMENT];
|
|
|
};
|
|
|
// alert(JSON.stringify(projectGLJ.testGLJs()));
|
|
@@ -859,7 +859,7 @@ let calcTools = {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-let calcBaseNames = {
|
|
|
+let rationCalcBasesNameMap = {
|
|
|
DEJJRGF: '定额基价人工费',
|
|
|
DEJJCLF: '定额基价材料费',
|
|
|
DEJJJXF: '定额基价机械费',
|
|
@@ -929,34 +929,34 @@ let rationCalcBases = {
|
|
|
return calcTools.labourDays(node, isTender);
|
|
|
},
|
|
|
'甲供定额基价人工费': function (node, isTender) {
|
|
|
- return calcTools.partASupplyFee(node, calcBaseNames.JGDEJJRGF, isTender);
|
|
|
+ return calcTools.partASupplyFee(node, rationCalcBasesNameMap.JGDEJJRGF, isTender);
|
|
|
},
|
|
|
'甲供定额基价材料费': function (node, isTender) {
|
|
|
- return calcTools.partASupplyFee(node, calcBaseNames.JGDEJJCLF, isTender);
|
|
|
+ return calcTools.partASupplyFee(node, rationCalcBasesNameMap.JGDEJJCLF, isTender);
|
|
|
},
|
|
|
'甲供定额基价机械费': function (node, isTender) {
|
|
|
- return calcTools.partASupplyFee(node, calcBaseNames.JGDEJJJXF, isTender);
|
|
|
+ return calcTools.partASupplyFee(node, rationCalcBasesNameMap.JGDEJJJXF, isTender);
|
|
|
},
|
|
|
'甲供主材费': function (node, isTender) {
|
|
|
- return calcTools.partASupplyFee(node, calcBaseNames.JGZCF, isTender);
|
|
|
+ return calcTools.partASupplyFee(node, rationCalcBasesNameMap.JGZCF, isTender);
|
|
|
},
|
|
|
'甲供设备费': function (node, isTender) {
|
|
|
- return calcTools.partASupplyFee(node, calcBaseNames.JGSBF, isTender);
|
|
|
+ return calcTools.partASupplyFee(node, rationCalcBasesNameMap.JGSBF, isTender);
|
|
|
},
|
|
|
'甲定定额基价人工费': function (node, isTender) {
|
|
|
- return calcTools.partASupplyFee(node, calcBaseNames.JDDEJJRGF, isTender);
|
|
|
+ return calcTools.partASupplyFee(node, rationCalcBasesNameMap.JDDEJJRGF, isTender);
|
|
|
},
|
|
|
'甲定定额基价材料费': function (node, isTender) {
|
|
|
- return calcTools.partASupplyFee(node, calcBaseNames.JDDEJJCLF, isTender);
|
|
|
+ return calcTools.partASupplyFee(node, rationCalcBasesNameMap.JDDEJJCLF, isTender);
|
|
|
},
|
|
|
'甲定定额基价机械费': function (node, isTender) {
|
|
|
- return calcTools.partASupplyFee(node, calcBaseNames.JDDEJJJXF, isTender);
|
|
|
+ return calcTools.partASupplyFee(node, rationCalcBasesNameMap.JDDEJJJXF, isTender);
|
|
|
},
|
|
|
'甲定主材费': function (node, isTender) {
|
|
|
- return calcTools.partASupplyFee(node, calcBaseNames.JDZCF, isTender);
|
|
|
+ return calcTools.partASupplyFee(node, rationCalcBasesNameMap.JDZCF, isTender);
|
|
|
},
|
|
|
'甲定设备费': function (node, isTender) {
|
|
|
- return calcTools.partASupplyFee(node, calcBaseNames.JDSBF, isTender);
|
|
|
+ return calcTools.partASupplyFee(node, rationCalcBasesNameMap.JDSBF, isTender);
|
|
|
},
|
|
|
'暂估材料费': function (node, isTender) {
|
|
|
return calcTools.estimateFee(node, true, isTender);
|