|
@@ -643,6 +643,7 @@ let calcTools = {
|
|
summaryFees: treeNode.data.summaryFees,
|
|
summaryFees: treeNode.data.summaryFees,
|
|
name:treeNode.data.name,
|
|
name:treeNode.data.name,
|
|
rationQuantityCoe: treeNode.data.rationQuantityCoe,
|
|
rationQuantityCoe: treeNode.data.rationQuantityCoe,
|
|
|
|
+ quantityCoe: treeNode.data.quantityCoe,
|
|
targetUnitFee: treeNode.data.targetUnitFee,
|
|
targetUnitFee: treeNode.data.targetUnitFee,
|
|
targetTotalFee: treeNode.data.targetTotalFee
|
|
targetTotalFee: treeNode.data.targetTotalFee
|
|
};
|
|
};
|
|
@@ -1935,7 +1936,10 @@ class CalcProgram {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
- let coe = (treeNode.data.targetTotalFee / treeNode.data.feesIndex.common.totalFee).toDecimal(decimalObj.process);
|
|
|
|
|
|
+ let coe = 1;
|
|
|
|
+ if (treeNode.data.feesIndex.common.totalFee != 0)
|
|
|
|
+ coe = (treeNode.data.targetTotalFee / treeNode.data.feesIndex.common.totalFee).toDecimal(decimalObj.process);
|
|
|
|
+
|
|
if (tender == tenderTypes.ttReverseRation){
|
|
if (tender == tenderTypes.ttReverseRation){
|
|
if (treeNode.data.rationQuantityCoe != coe){
|
|
if (treeNode.data.rationQuantityCoe != coe){
|
|
treeNode.data.rationQuantityCoe = coe;
|
|
treeNode.data.rationQuantityCoe = coe;
|
|
@@ -1943,10 +1947,17 @@ class CalcProgram {
|
|
};
|
|
};
|
|
}else if (tender == tenderTypes.ttReverseGLJ){
|
|
}else if (tender == tenderTypes.ttReverseGLJ){
|
|
let coeObj = treeNode.data.quantityCoe;
|
|
let coeObj = treeNode.data.quantityCoe;
|
|
- for (let pn in coeObj){
|
|
|
|
- coeObj[pn] = coe;
|
|
|
|
- }
|
|
|
|
- treeNode.changed = true;
|
|
|
|
|
|
+ if (!coeObj){
|
|
|
|
+ treeNode.data.quantityCoe = {labour: coe, material: coe, machine: coe, main: coe, equipment: coe};
|
|
|
|
+ treeNode.changed = true;
|
|
|
|
+ }else{
|
|
|
|
+ for (let pn in coeObj){
|
|
|
|
+ if (coeObj[pn] != coe){
|
|
|
|
+ coeObj[pn] = coe;
|
|
|
|
+ treeNode.changed = true;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ };
|
|
};
|
|
};
|
|
|
|
|
|
treeNode.data.tenderQuantity = (treeNode.data.quantity * coe).toDecimal(decimalObj.decimal("quantity", treeNode));
|
|
treeNode.data.tenderQuantity = (treeNode.data.quantity * coe).toDecimal(decimalObj.decimal("quantity", treeNode));
|