|
@@ -724,7 +724,7 @@ let calcTools = {
|
|
|
};
|
|
|
return result;
|
|
|
},
|
|
|
- partASupplyFee: function (treeNode, baseName, isTender, isRationPirce = true) {
|
|
|
+ partASupplyFee: function (treeNode, baseName, isTender, isRationPirce = true) { // isRationPirce 为true时表示取定额价。如:甲供定额材料费
|
|
|
if (!treeNode.data.gljList) return 0;
|
|
|
let projectGLJ = projectObj.project.projectGLJ;
|
|
|
|
|
@@ -778,7 +778,6 @@ let calcTools = {
|
|
|
let sum = 0;
|
|
|
for (let glj of treeNode.data.gljList){
|
|
|
let gljQ = isTender ? glj.tenderQuantity : glj.quantity;
|
|
|
- gljP = isRationPirce ? glj.basePrice : glj.marketPrice;
|
|
|
|
|
|
let X = 1; // 部分甲供系数(默认1,即完全甲供)
|
|
|
let tempSGLJ = supplyGLJsIdx[glj.projectGLJID];
|
|
@@ -786,15 +785,17 @@ let calcTools = {
|
|
|
if (tempSGLJ) {
|
|
|
// 处理部分甲供
|
|
|
if (baseName.includes('甲供') && (tempSGLJ.supply == supplyType.BFJG)){
|
|
|
- // let Q = isTender ? tempSGLJ.tenderQuantity : tempSGLJ.quantity;
|
|
|
- let Q = tempSGLJ.quantity;
|
|
|
+ let Q = isTender ? tempSGLJ.tenderQuantity : tempSGLJ.quantity;
|
|
|
+ // let Q = tempSGLJ.quantity;
|
|
|
Q = Q ? Q : 1;
|
|
|
X = tempSGLJ.supply_quantity / Q;
|
|
|
- }
|
|
|
+ };
|
|
|
+ let gljP = isRationPirce ? glj.basePrice : (isTender ? projectGLJ.getTenderMarketPrice(glj) : glj.marketPrice);
|
|
|
sum = (sum + gljP * gljQ * X).toDecimal(decimalObj.process);
|
|
|
}
|
|
|
else{ // 当前材料不是甲供材料
|
|
|
- if (compT.includes(glj.type)) { // 混凝土等。组成物的母体,母体如果有组成物,则母体无法作为甲供材料,无法设置,此时要看其组成物是否是甲供材料;母体如果没有组成物,则母体有可能成为甲供材料。
|
|
|
+ // 混凝土等。组成物的母体,母体如果有组成物,则母体无法作为甲供材料,无法设置,此时要看其组成物是否是甲供材料;母体如果没有组成物,则母体有可能成为甲供材料。
|
|
|
+ if (compT.includes(glj.type)) {
|
|
|
let pGLJ = projectGLJ.getDataByID(glj.projectGLJID);
|
|
|
let compositions = pGLJ.ratio_data; // 组成物明细
|
|
|
if (compositions.length > 0){
|
|
@@ -804,7 +805,7 @@ let calcTools = {
|
|
|
if (baseName.includes('甲供') && (c.supply == supplyType.BFJG)){
|
|
|
X = c.supplyX;
|
|
|
};
|
|
|
- let cP = isRationPirce ? c.basePrice : c.marketPrice;
|
|
|
+ let cP = isRationPirce ? c.basePrice : (isTender ? projectGLJ.getTenderMarketPrice(c) : c.marketPrice);
|
|
|
sum = (sum + cP * c.consumption * gljQ * X).toDecimal(decimalObj.process);
|
|
|
}
|
|
|
}
|