|
@@ -897,7 +897,7 @@ let calcTools = {
|
|
},
|
|
},
|
|
|
|
|
|
// 在项目工料机里检查该工料机是否参与调价
|
|
// 在项目工料机里检查该工料机是否参与调价
|
|
- isTenderGLJ: function (glj){
|
|
|
|
|
|
+ isTenderProjectGLJ: function (glj){
|
|
let projGLJ = this.getProjectGLJ(glj);
|
|
let projGLJ = this.getProjectGLJ(glj);
|
|
return !(projGLJ && projGLJ.is_adjust_price == 1);
|
|
return !(projGLJ && projGLJ.is_adjust_price == 1);
|
|
},
|
|
},
|
|
@@ -921,6 +921,7 @@ let calcTools = {
|
|
tenderCoe_GLJQty: function (treeNode, glj){
|
|
tenderCoe_GLJQty: function (treeNode, glj){
|
|
let coe = 1;
|
|
let coe = 1;
|
|
if (!treeNode.data.quantityCoe) return coe;
|
|
if (!treeNode.data.quantityCoe) return coe;
|
|
|
|
+ if (!calcTools.isTenderProjectGLJ(glj)) return coe;
|
|
|
|
|
|
if (gljType.LABOUR == glj.type){
|
|
if (gljType.LABOUR == glj.type){
|
|
if (treeNode.data.quantityCoe.labour)
|
|
if (treeNode.data.quantityCoe.labour)
|
|
@@ -983,7 +984,7 @@ let calcTools = {
|
|
}
|
|
}
|
|
else{
|
|
else{
|
|
let coe = 1;
|
|
let coe = 1;
|
|
- if (this.isTenderGLJ(glj))
|
|
|
|
|
|
+ if (this.isTenderProjectGLJ(glj))
|
|
coe = this.tenderCoe_GLJQty(treeNode, glj);
|
|
coe = this.tenderCoe_GLJQty(treeNode, glj);
|
|
glj.tenderQuantity = (glj.quantity * coe).toDecimal(decimalObj.glj.quantity);
|
|
glj.tenderQuantity = (glj.quantity * coe).toDecimal(decimalObj.glj.quantity);
|
|
}
|
|
}
|
|
@@ -2459,7 +2460,7 @@ class CalcProgram {
|
|
// 先把会破坏金额比例关系的孩子排除:1.有目标金额的 2.满载的(孙子全满,没有分摊空间,所以实质上该孩子的金额已被锁死无法分摊)
|
|
// 先把会破坏金额比例关系的孩子排除:1.有目标金额的 2.满载的(孙子全满,没有分摊空间,所以实质上该孩子的金额已被锁死无法分摊)
|
|
for (let i = 0; i < treeNode.children.length; i++) {
|
|
for (let i = 0; i < treeNode.children.length; i++) {
|
|
let child = treeNode.children[i];
|
|
let child = treeNode.children[i];
|
|
- if (!child.data.feesIndex['common']) continue; // 无计算金额的(如空清单)当它不存在
|
|
|
|
|
|
+ if (!child.data.feesIndex || !child.data.feesIndex['common']) continue; // 空白行清单、定额
|
|
|
|
|
|
child.data.tender_activeTotal = child.data.feesIndex['common'].totalFee;
|
|
child.data.tender_activeTotal = child.data.feesIndex['common'].totalFee;
|
|
|
|
|
|
@@ -2477,7 +2478,7 @@ class CalcProgram {
|
|
|
|
|
|
for (let i = 0; i < treeNode.children.length; i++) {
|
|
for (let i = 0; i < treeNode.children.length; i++) {
|
|
let child = treeNode.children[i];
|
|
let child = treeNode.children[i];
|
|
- if (!child.data.feesIndex['common']) continue;
|
|
|
|
|
|
+ if (!child.data.feesIndex || !child.data.feesIndex['common']) continue; // 空白行清单、定额
|
|
if (!calcTools.hasTargetTotalFee(child)){
|
|
if (!calcTools.hasTargetTotalFee(child)){
|
|
child.data.tender_activeTarget = (coe * child.data.tender_activeTotal).toDecimal(decimalObj.decimal('totalPrice', treeNode));
|
|
child.data.tender_activeTarget = (coe * child.data.tender_activeTotal).toDecimal(decimalObj.decimal('totalPrice', treeNode));
|
|
child.data.targetTotalFee = child.data.tender_activeTarget;
|
|
child.data.targetTotalFee = child.data.tender_activeTarget;
|