|
@@ -156,6 +156,10 @@ let calcTools = {
|
|
isGljRation: function (treeNode) {
|
|
isGljRation: function (treeNode) {
|
|
return this.isRationCategory(treeNode) && treeNode.data.type === rationType.gljRation;
|
|
return this.isRationCategory(treeNode) && treeNode.data.type === rationType.gljRation;
|
|
},
|
|
},
|
|
|
|
+ isVP_or_GLJR: function (treeNode) { // 是量价或工料机类型的定额
|
|
|
|
+ return this.isRationCategory(treeNode) &&
|
|
|
|
+ (treeNode.data.type == rationType.volumePrice || treeNode.data.type == rationType.gljRation);
|
|
|
|
+ },
|
|
isSameTypeNode: function (node1, node2) {
|
|
isSameTypeNode: function (node1, node2) {
|
|
if (node1.parent && node2.parent && (node1.parent === node2.parent) && (node1.sourceType === node1.sourceType)
|
|
if (node1.parent && node2.parent && (node1.parent === node2.parent) && (node1.sourceType === node1.sourceType)
|
|
&& (node1.data && node2.data && node1.data.type === node2.data.type)){
|
|
&& (node1.data && node2.data && node1.data.type === node2.data.type)){
|
|
@@ -203,7 +207,7 @@ let calcTools = {
|
|
getGLJList: function (treeNode, needOneBill) {
|
|
getGLJList: function (treeNode, needOneBill) {
|
|
delete treeNode.data.gljList;
|
|
delete treeNode.data.gljList;
|
|
if (this.isRationCategory(treeNode)) {
|
|
if (this.isRationCategory(treeNode)) {
|
|
- if (treeNode.data.type != rationType.volumePrice) {
|
|
|
|
|
|
+ if (!calcTools.isVP_or_GLJR(treeNode)){
|
|
treeNode.data.gljList = projectObj.project.calcProgram.getGljArrByRation(treeNode.data);
|
|
treeNode.data.gljList = projectObj.project.calcProgram.getGljArrByRation(treeNode.data);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -211,7 +215,7 @@ let calcTools = {
|
|
let nodeQ = this.uiNodeQty(treeNode);
|
|
let nodeQ = this.uiNodeQty(treeNode);
|
|
let q = nodeQ ? nodeQ : 1;
|
|
let q = nodeQ ? nodeQ : 1;
|
|
let allNodes = projectObj.project.Ration.getRationNodes(treeNode);
|
|
let allNodes = projectObj.project.Ration.getRationNodes(treeNode);
|
|
- let rNodes = allNodes.filter(function (node) {return node.data.type != rationType.volumePrice});
|
|
|
|
|
|
+ let rNodes = allNodes.filter(function (node) {return calcTools.isRationItem(node)});
|
|
let rations = rNodes.map(function (node) {return node.data});
|
|
let rations = rNodes.map(function (node) {return node.data});
|
|
treeNode.data.gljList = projectObj.project.ration_glj.getGatherGljArrByRations(rations, needOneBill, q);
|
|
treeNode.data.gljList = projectObj.project.ration_glj.getGatherGljArrByRations(rations, needOneBill, q);
|
|
};
|
|
};
|
|
@@ -662,7 +666,7 @@ let calcTools = {
|
|
'tenderUnitFee': sumTU, 'tenderTotalFee': sumTT});
|
|
'tenderUnitFee': sumTU, 'tenderTotalFee': sumTT});
|
|
},
|
|
},
|
|
marketPriceToBase: function (treeNode, baseName, isTender) {
|
|
marketPriceToBase: function (treeNode, baseName, isTender) {
|
|
- if (treeNode.data.type != rationType.volumePrice && treeNode.data.type != rationType.gljRation) return;
|
|
|
|
|
|
+ if (!calcTools.isVP_or_GLJR(treeNode)) return;
|
|
let result = 0, me = this;
|
|
let result = 0, me = this;
|
|
|
|
|
|
function isRCJZC(treeNode, baseName) { // 基数名称中是否包含人材机主设,且树结点类型要匹配一致
|
|
function isRCJZC(treeNode, baseName) { // 基数名称中是否包含人材机主设,且树结点类型要匹配一致
|
|
@@ -701,7 +705,7 @@ let calcTools = {
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
if (isRCJZC(treeNode, baseName)) {
|
|
if (isRCJZC(treeNode, baseName)) {
|
|
- if (treeNode.data.type == rationType.volumePrice){
|
|
|
|
|
|
+ if (calcTools.isVolumePrice(treeNode)){
|
|
if (isTender){
|
|
if (isTender){
|
|
let coe = this.tenderCoe_GLJPrice();
|
|
let coe = this.tenderCoe_GLJPrice();
|
|
if (treeNode.data.marketUnitFee)
|
|
if (treeNode.data.marketUnitFee)
|
|
@@ -712,7 +716,7 @@ let calcTools = {
|
|
else
|
|
else
|
|
result = treeNode.data.marketUnitFee ? parseFloat(treeNode.data.marketUnitFee).toDecimal(decimalObj.ration.unitPrice) : 0
|
|
result = treeNode.data.marketUnitFee ? parseFloat(treeNode.data.marketUnitFee).toDecimal(decimalObj.ration.unitPrice) : 0
|
|
}
|
|
}
|
|
- else if (treeNode.data.type == rationType.gljRation)
|
|
|
|
|
|
+ else if (calcTools.isGljRation(treeNode))
|
|
// result = treeNode.data.basePrice ? parseFloat(treeNode.data.basePrice).toDecimal(decimalObj.ration.unitPrice) : 0;
|
|
// result = treeNode.data.basePrice ? parseFloat(treeNode.data.basePrice).toDecimal(decimalObj.ration.unitPrice) : 0;
|
|
// 这里因为是算基数所以要取基价,但不能直接取basePrice,受限于项目属性的三个选项。
|
|
// 这里因为是算基数所以要取基价,但不能直接取basePrice,受限于项目属性的三个选项。
|
|
result = gljOprObj.getBasePrice(treeNode);
|
|
result = gljOprObj.getBasePrice(treeNode);
|
|
@@ -720,7 +724,7 @@ let calcTools = {
|
|
};
|
|
};
|
|
return result;
|
|
return result;
|
|
},
|
|
},
|
|
- partASupplyFee: function (treeNode, baseName, isTender, isRationPirce = true) {
|
|
|
|
|
|
+ partASupplyFee: function (treeNode, baseName, isTender, isRationPirce = true) { // isRationPirce 为true时表示取定额价。如:甲供定额材料费
|
|
if (!treeNode.data.gljList) return 0;
|
|
if (!treeNode.data.gljList) return 0;
|
|
let projectGLJ = projectObj.project.projectGLJ;
|
|
let projectGLJ = projectObj.project.projectGLJ;
|
|
|
|
|
|
@@ -774,7 +778,6 @@ let calcTools = {
|
|
let sum = 0;
|
|
let sum = 0;
|
|
for (let glj of treeNode.data.gljList){
|
|
for (let glj of treeNode.data.gljList){
|
|
let gljQ = isTender ? glj.tenderQuantity : glj.quantity;
|
|
let gljQ = isTender ? glj.tenderQuantity : glj.quantity;
|
|
- gljP = isRationPirce ? glj.basePrice : glj.marketPrice;
|
|
|
|
|
|
|
|
let X = 1; // 部分甲供系数(默认1,即完全甲供)
|
|
let X = 1; // 部分甲供系数(默认1,即完全甲供)
|
|
let tempSGLJ = supplyGLJsIdx[glj.projectGLJID];
|
|
let tempSGLJ = supplyGLJsIdx[glj.projectGLJID];
|
|
@@ -782,15 +785,17 @@ let calcTools = {
|
|
if (tempSGLJ) {
|
|
if (tempSGLJ) {
|
|
// 处理部分甲供
|
|
// 处理部分甲供
|
|
if (baseName.includes('甲供') && (tempSGLJ.supply == supplyType.BFJG)){
|
|
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;
|
|
Q = Q ? Q : 1;
|
|
X = tempSGLJ.supply_quantity / Q;
|
|
X = tempSGLJ.supply_quantity / Q;
|
|
- }
|
|
|
|
|
|
+ };
|
|
|
|
+ let gljP = isRationPirce ? glj.basePrice : (isTender ? projectGLJ.getTenderMarketPrice(calcTools.getProjectGLJ(glj)) : glj.marketPrice);
|
|
sum = (sum + gljP * gljQ * X).toDecimal(decimalObj.process);
|
|
sum = (sum + gljP * gljQ * X).toDecimal(decimalObj.process);
|
|
}
|
|
}
|
|
else{ // 当前材料不是甲供材料
|
|
else{ // 当前材料不是甲供材料
|
|
- if (compT.includes(glj.type)) { // 混凝土等。组成物的母体,母体如果有组成物,则母体无法作为甲供材料,无法设置,此时要看其组成物是否是甲供材料;母体如果没有组成物,则母体有可能成为甲供材料。
|
|
|
|
|
|
+ // 混凝土等。组成物的母体,母体如果有组成物,则母体无法作为甲供材料,无法设置,此时要看其组成物是否是甲供材料;母体如果没有组成物,则母体有可能成为甲供材料。
|
|
|
|
+ if (compT.includes(glj.type)) {
|
|
let pGLJ = projectGLJ.getDataByID(glj.projectGLJID);
|
|
let pGLJ = projectGLJ.getDataByID(glj.projectGLJID);
|
|
let compositions = pGLJ.ratio_data; // 组成物明细
|
|
let compositions = pGLJ.ratio_data; // 组成物明细
|
|
if (compositions.length > 0){
|
|
if (compositions.length > 0){
|
|
@@ -800,7 +805,7 @@ let calcTools = {
|
|
if (baseName.includes('甲供') && (c.supply == supplyType.BFJG)){
|
|
if (baseName.includes('甲供') && (c.supply == supplyType.BFJG)){
|
|
X = c.supplyX;
|
|
X = c.supplyX;
|
|
};
|
|
};
|
|
- let cP = isRationPirce ? c.basePrice : c.marketPrice;
|
|
|
|
|
|
+ let cP = isRationPirce ? c.basePrice : (isTender ? projectGLJ.getTenderMarketPrice(calcTools.getProjectGLJ(c)) : c.marketPrice);
|
|
sum = (sum + cP * c.consumption * gljQ * X).toDecimal(decimalObj.process);
|
|
sum = (sum + cP * c.consumption * gljQ * X).toDecimal(decimalObj.process);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -949,17 +954,21 @@ let calcTools = {
|
|
let qCoe = 1;
|
|
let qCoe = 1;
|
|
/* 量价、工料机类型的定额,在反向调价之调整人材机消耗量系数时,因为他们没有工料机可调,调价结果没变,影响汇总后的父结点金额。
|
|
/* 量价、工料机类型的定额,在反向调价之调整人材机消耗量系数时,因为他们没有工料机可调,调价结果没变,影响汇总后的父结点金额。
|
|
所以要特殊处理:此种情况下仍然要调量价的消耗量,即还是要像"子目工程量调整系数"方式那样调,但系数又不能在"子目工程量调整系数"
|
|
所以要特殊处理:此种情况下仍然要调量价的消耗量,即还是要像"子目工程量调整系数"方式那样调,但系数又不能在"子目工程量调整系数"
|
|
- 中显示出来,所以可以改变tenderQuantity达到同样的效果以瞒天过海。所以在取系数时,无论什么系数,只要能取到就算正确。 */
|
|
|
|
- if (treeNode.data.type == rationType.volumePrice || treeNode.data.type == rationType.gljRation){
|
|
|
|
- if (treeNode.data.rationQuantityCoe)
|
|
|
|
- qCoe = treeNode.data.rationQuantityCoe
|
|
|
|
- else if (treeNode.data.quantityCoe && treeNode.data.quantityCoe.labour)
|
|
|
|
- qCoe = treeNode.data.quantityCoe.labour;
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
|
|
+ 中显示出来(明明是调工料机,你却调到树结点上,这比较搞笑啊),所以可以改变tenderQuantity达到同样的效果以瞒天过海。所以在取系数时,
|
|
|
|
+ 无论什么系数,只要能取到就算正确。
|
|
|
|
+ 2020-04-05 注: 以上是老黄历。新思路是量价只作为定额调整,不作为工料机调整。两种反调模式下,统一都只调子目消耗量系数。
|
|
|
|
+ 为避免歧义,量价的工料机调整系数不允许输入。
|
|
|
|
+ */
|
|
|
|
+ // if (calcTools.isVP_or_GLJR(treeNode)){
|
|
|
|
+ // if (treeNode.data.rationQuantityCoe)
|
|
|
|
+ // qCoe = treeNode.data.rationQuantityCoe
|
|
|
|
+ // else if (treeNode.data.quantityCoe && treeNode.data.quantityCoe.labour)
|
|
|
|
+ // qCoe = treeNode.data.quantityCoe.labour;
|
|
|
|
+ // }
|
|
|
|
+ // else {
|
|
if (treeNode.data.rationQuantityCoe)
|
|
if (treeNode.data.rationQuantityCoe)
|
|
qCoe = treeNode.data.rationQuantityCoe;
|
|
qCoe = treeNode.data.rationQuantityCoe;
|
|
- };
|
|
|
|
|
|
+ // };
|
|
if (qCoe == '0' || qCoe == 0) qCoe = 1;
|
|
if (qCoe == '0' || qCoe == 0) qCoe = 1;
|
|
treeNode.data.tenderQuantity = (this.uiNodeQty(treeNode) * qCoe).toDecimal(decimalObj.decimal("quantity", treeNode));
|
|
treeNode.data.tenderQuantity = (this.uiNodeQty(treeNode) * qCoe).toDecimal(decimalObj.decimal("quantity", treeNode));
|
|
return treeNode.data.tenderQuantity;
|
|
return treeNode.data.tenderQuantity;
|
|
@@ -1151,34 +1160,34 @@ let rationCalcBases = {
|
|
return calcTools.labourDays(node, isTender);
|
|
return calcTools.labourDays(node, isTender);
|
|
},
|
|
},
|
|
'甲供定额基价人工费': function (node, isTender) {
|
|
'甲供定额基价人工费': function (node, isTender) {
|
|
- return calcTools.partASupplyFee(node, '甲供定额基价人工费', isTender);
|
|
|
|
|
|
+ return calcTools.partASupplyFee(node, '甲供定额基价人工费', isTender, true);
|
|
},
|
|
},
|
|
'甲供定额基价材料费': function (node, isTender) {
|
|
'甲供定额基价材料费': function (node, isTender) {
|
|
- return calcTools.partASupplyFee(node, '甲供定额基价材料费', isTender);
|
|
|
|
|
|
+ return calcTools.partASupplyFee(node, '甲供定额基价材料费', isTender, true);
|
|
},
|
|
},
|
|
'甲供定额基价机械费': function (node, isTender) {
|
|
'甲供定额基价机械费': function (node, isTender) {
|
|
- return calcTools.partASupplyFee(node, '甲供定额基价机械费', isTender);
|
|
|
|
|
|
+ return calcTools.partASupplyFee(node, '甲供定额基价机械费', isTender, true);
|
|
},
|
|
},
|
|
'甲供主材费': function (node, isTender) {
|
|
'甲供主材费': function (node, isTender) {
|
|
- return calcTools.partASupplyFee(node, '甲供主材费', isTender);
|
|
|
|
|
|
+ return calcTools.partASupplyFee(node, '甲供主材费', isTender, false);
|
|
},
|
|
},
|
|
'甲供设备费': function (node, isTender) {
|
|
'甲供设备费': function (node, isTender) {
|
|
- return calcTools.partASupplyFee(node, '甲供设备费', isTender);
|
|
|
|
|
|
+ return calcTools.partASupplyFee(node, '甲供设备费', isTender, false);
|
|
},
|
|
},
|
|
'甲定定额基价人工费': function (node, isTender) {
|
|
'甲定定额基价人工费': function (node, isTender) {
|
|
- return calcTools.partASupplyFee(node, '甲定定额基价人工费', isTender);
|
|
|
|
|
|
+ return calcTools.partASupplyFee(node, '甲定定额基价人工费', isTender, true);
|
|
},
|
|
},
|
|
'甲定定额基价材料费': function (node, isTender) {
|
|
'甲定定额基价材料费': function (node, isTender) {
|
|
- return calcTools.partASupplyFee(node, '甲定定额基价材料费', isTender);
|
|
|
|
|
|
+ return calcTools.partASupplyFee(node, '甲定定额基价材料费', isTender, true);
|
|
},
|
|
},
|
|
'甲定定额基价机械费': function (node, isTender) {
|
|
'甲定定额基价机械费': function (node, isTender) {
|
|
- return calcTools.partASupplyFee(node, '甲定定额基价机械费', isTender);
|
|
|
|
|
|
+ return calcTools.partASupplyFee(node, '甲定定额基价机械费', isTender, true);
|
|
},
|
|
},
|
|
'甲定主材费': function (node, isTender) {
|
|
'甲定主材费': function (node, isTender) {
|
|
- return calcTools.partASupplyFee(node, '甲定主材费', isTender);
|
|
|
|
|
|
+ return calcTools.partASupplyFee(node, '甲定主材费', isTender, false);
|
|
},
|
|
},
|
|
'甲定设备费': function (node, isTender) {
|
|
'甲定设备费': function (node, isTender) {
|
|
- return calcTools.partASupplyFee(node, '甲定设备费', isTender);
|
|
|
|
|
|
+ return calcTools.partASupplyFee(node, '甲定设备费', isTender, false);
|
|
},
|
|
},
|
|
'暂估材料费': function (node, isTender) {
|
|
'暂估材料费': function (node, isTender) {
|
|
return calcTools.estimateFee(node, true, isTender);
|
|
return calcTools.estimateFee(node, true, isTender);
|
|
@@ -1562,7 +1571,7 @@ let executeObj = {
|
|
let me = executeObj;
|
|
let me = executeObj;
|
|
|
|
|
|
// 量价、工料机形式的定额, 要把自己的市场单价用于计算程序中的基数。
|
|
// 量价、工料机形式的定额, 要把自己的市场单价用于计算程序中的基数。
|
|
- if (calcTools.isVolumePrice(me.treeNode) || calcTools.isGljRation(me.treeNode))
|
|
|
|
|
|
+ if (calcTools.isVP_or_GLJR(me.treeNode))
|
|
return calcTools.marketPriceToBase(me.treeNode, baseName, isTender)
|
|
return calcTools.marketPriceToBase(me.treeNode, baseName, isTender)
|
|
else{
|
|
else{
|
|
if (!rationCalcBases[baseName]){
|
|
if (!rationCalcBases[baseName]){
|
|
@@ -1799,6 +1808,16 @@ class CalcProgram {
|
|
return ['labour', 'material', 'machine', 'mainMaterial', 'equipment'].indexOf(type) > -1;
|
|
return ['labour', 'material', 'machine', 'mainMaterial', 'equipment'].indexOf(type) > -1;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ // 不能直接删除该属性,否则无法冲掉库中已存储的值。下同。
|
|
|
|
+ function deleteProperties (treeNode, propNamesArr){
|
|
|
|
+ for (let pn of propNamesArr){
|
|
|
|
+ if (treeNode.data[pn]){
|
|
|
|
+ treeNode.data[pn] = null;
|
|
|
|
+ treeNode.changed = true;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ };
|
|
|
|
+
|
|
/*删掉多余的费用。例如:从其它计算方式(有很多费)切换到公式计算方式(只需要common费),多出来的费要删除。
|
|
/*删掉多余的费用。例如:从其它计算方式(有很多费)切换到公式计算方式(只需要common费),多出来的费要删除。
|
|
fieldNameArr 值取自:遍历treeNode的计算规则,取有绑定的字段名。这些字段名以外的fee是因旧计算多出来的,需要删除。 */
|
|
fieldNameArr 值取自:遍历treeNode的计算规则,取有绑定的字段名。这些字段名以外的fee是因旧计算多出来的,需要删除。 */
|
|
function deleteUselessFees(treeNode, fieldNameArr){
|
|
function deleteUselessFees(treeNode, fieldNameArr){
|
|
@@ -1908,9 +1927,10 @@ class CalcProgram {
|
|
// 叶子清单无子结点、无公式计算(啥都没有时)
|
|
// 叶子清单无子结点、无公式计算(啥都没有时)
|
|
else if (treeNode.calcType == treeNodeCalcType.ctNull){
|
|
else if (treeNode.calcType == treeNodeCalcType.ctNull){
|
|
delete treeNode.data.gljList;
|
|
delete treeNode.data.gljList;
|
|
-
|
|
|
|
|
|
+ deleteProperties(treeNode, ['calcBase', 'calcBaseValue', 'tenderCalcBaseValue', 'programID']);
|
|
|
|
+ deleteUselessFees(treeNode, ['common', 'rationCommon']);
|
|
// 不能直接删除该属性,否则无法冲掉库中已存储的值。下同。
|
|
// 不能直接删除该属性,否则无法冲掉库中已存储的值。下同。
|
|
- if (treeNode.data.calcBase){
|
|
|
|
|
|
+/* if (treeNode.data.calcBase){
|
|
treeNode.data.calcBase = null;
|
|
treeNode.data.calcBase = null;
|
|
treeNode.changed = true;
|
|
treeNode.changed = true;
|
|
}
|
|
}
|
|
@@ -1928,7 +1948,7 @@ class CalcProgram {
|
|
if (treeNode.data.programID) {
|
|
if (treeNode.data.programID) {
|
|
treeNode.data.programID = null;
|
|
treeNode.data.programID = null;
|
|
treeNode.changed = true;
|
|
treeNode.changed = true;
|
|
- };
|
|
|
|
|
|
+ };*/
|
|
|
|
|
|
// 第1、2部分以外的叶子清单在没有公式的情况下可以手工修改综合单价并参与计算。
|
|
// 第1、2部分以外的叶子清单在没有公式的情况下可以手工修改综合单价并参与计算。
|
|
// 2017-09-27 需求改了,除了第 1 、 2.2部分以外,都可以手工修改综合单价、综合合价并参与计算
|
|
// 2017-09-27 需求改了,除了第 1 、 2.2部分以外,都可以手工修改综合单价、综合合价并参与计算
|
|
@@ -1996,7 +2016,7 @@ class CalcProgram {
|
|
|
|
|
|
if (treeNode.calcType == treeNodeCalcType.ctRationCalcProgram) {
|
|
if (treeNode.calcType == treeNodeCalcType.ctRationCalcProgram) {
|
|
// 量价、工料机类型的定额要求市场合价
|
|
// 量价、工料机类型的定额要求市场合价
|
|
- if (treeNode.data.type == rationType.volumePrice || treeNode.data.type == rationType.gljRation){
|
|
|
|
|
|
+ if (calcTools.isVP_or_GLJR(treeNode)){
|
|
let muf = treeNode.data.marketUnitFee ? treeNode.data.marketUnitFee : 0;
|
|
let muf = treeNode.data.marketUnitFee ? treeNode.data.marketUnitFee : 0;
|
|
let mtf = (muf * nQ).toDecimal(decimalObj.ration.totalPrice);
|
|
let mtf = (muf * nQ).toDecimal(decimalObj.ration.totalPrice);
|
|
if (treeNode.data.marketTotalFee != mtf){
|
|
if (treeNode.data.marketTotalFee != mtf){
|
|
@@ -2330,20 +2350,27 @@ class CalcProgram {
|
|
if (treeNode.data.feesIndex.common.totalFee != 0)
|
|
if (treeNode.data.feesIndex.common.totalFee != 0)
|
|
coe = (treeNode.data.targetUnitFee / treeNode.data.feesIndex.common.unitFee).toDecimal(decimalObj.process);
|
|
coe = (treeNode.data.targetUnitFee / treeNode.data.feesIndex.common.unitFee).toDecimal(decimalObj.process);
|
|
|
|
|
|
- if (tender == tenderTypes.ttReverseRation){
|
|
|
|
|
|
+ // 调价情况之————量价反调工料机(量价无工料机可调,还是按定额来调,即直接调树结点的消耗量)
|
|
|
|
+ let isVP_RevGLJ =(tender == tenderTypes.ttReverseGLJ) && calcTools.isVP_or_GLJR(treeNode);
|
|
|
|
+
|
|
|
|
+ if ((tender == tenderTypes.ttReverseRation) || isVP_RevGLJ){
|
|
treeNode.data.tenderQuantity = (treeNode.data.quantity * coe).toDecimal(decimalObj.decimal("quantity", treeNode));
|
|
treeNode.data.tenderQuantity = (treeNode.data.quantity * coe).toDecimal(decimalObj.decimal("quantity", treeNode));
|
|
if (treeNode.data.rationQuantityCoe != coe){
|
|
if (treeNode.data.rationQuantityCoe != coe){
|
|
treeNode.data.rationQuantityCoe = coe;
|
|
treeNode.data.rationQuantityCoe = coe;
|
|
treeNode.changed = true;
|
|
treeNode.changed = true;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ if (isVP_RevGLJ){
|
|
|
|
+ treeNode.data.quantityCoe = {labour: 0, material: 0, machine: 0, main: 0, equipment: 0};
|
|
|
|
+ treeNode.changed = true;
|
|
|
|
+ };
|
|
|
|
+
|
|
let ttf = (treeNode.data.tenderQuantity * treeNode.data.feesIndex.common.tenderUnitFee).toDecimal(decimalObj.decimal('totalPrice', treeNode));
|
|
let ttf = (treeNode.data.tenderQuantity * treeNode.data.feesIndex.common.tenderUnitFee).toDecimal(decimalObj.decimal('totalPrice', treeNode));
|
|
if (treeNode.data.feesIndex.common.tenderTotalFee != ttf){
|
|
if (treeNode.data.feesIndex.common.tenderTotalFee != ttf){
|
|
treeNode.data.feesIndex.common.tenderTotalFee = ttf;
|
|
treeNode.data.feesIndex.common.tenderTotalFee = ttf;
|
|
treeNode.changed = true;
|
|
treeNode.changed = true;
|
|
};
|
|
};
|
|
}else if (tender == tenderTypes.ttReverseGLJ){
|
|
}else if (tender == tenderTypes.ttReverseGLJ){
|
|
- // treeNode.data.tenderQuantity = treeNode.data.quantity; // 这句好像多余,因为调用calculate()时里面会重新计算tenderQuantity,有问题再放开AAAAA
|
|
|
|
let qcObj = treeNode.data.quantityCoe;
|
|
let qcObj = treeNode.data.quantityCoe;
|
|
if (!qcObj || calcTools.isEmptyObject(qcObj)){
|
|
if (!qcObj || calcTools.isEmptyObject(qcObj)){
|
|
treeNode.data.quantityCoe = {labour: coe, material: coe, machine: coe, main: coe, equipment: coe};
|
|
treeNode.data.quantityCoe = {labour: coe, material: coe, machine: coe, main: coe, equipment: coe};
|