|
@@ -949,17 +949,21 @@ let calcTools = {
|
|
|
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 (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 {
|
|
|
if (treeNode.data.rationQuantityCoe)
|
|
|
qCoe = treeNode.data.rationQuantityCoe;
|
|
|
- };
|
|
|
+ // };
|
|
|
if (qCoe == '0' || qCoe == 0) qCoe = 1;
|
|
|
treeNode.data.tenderQuantity = (this.uiNodeQty(treeNode) * qCoe).toDecimal(decimalObj.decimal("quantity", treeNode));
|
|
|
return treeNode.data.tenderQuantity;
|
|
@@ -2330,20 +2334,27 @@ class CalcProgram {
|
|
|
if (treeNode.data.feesIndex.common.totalFee != 0)
|
|
|
coe = (treeNode.data.targetUnitFee / treeNode.data.feesIndex.common.unitFee).toDecimal(decimalObj.process);
|
|
|
|
|
|
- if (tender == tenderTypes.ttReverseRation){
|
|
|
+ // 调价情况之————量价反调工料机(量价无工料机可调,还是按定额来调,即直接调树结点的消耗量)
|
|
|
+ let isVP_RevGLJ =(tender == tenderTypes.ttReverseGLJ) && (treeNode.data.type == rationType.volumePrice || treeNode.data.type == rationType.gljRation);
|
|
|
+
|
|
|
+ if ((tender == tenderTypes.ttReverseRation) || isVP_RevGLJ){
|
|
|
treeNode.data.tenderQuantity = (treeNode.data.quantity * coe).toDecimal(decimalObj.decimal("quantity", treeNode));
|
|
|
if (treeNode.data.rationQuantityCoe != coe){
|
|
|
treeNode.data.rationQuantityCoe = coe;
|
|
|
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));
|
|
|
if (treeNode.data.feesIndex.common.tenderTotalFee != ttf){
|
|
|
treeNode.data.feesIndex.common.tenderTotalFee = ttf;
|
|
|
treeNode.changed = true;
|
|
|
};
|
|
|
}else if (tender == tenderTypes.ttReverseGLJ){
|
|
|
- // treeNode.data.tenderQuantity = treeNode.data.quantity; // 这句好像多余,因为调用calculate()时里面会重新计算tenderQuantity,有问题再放开AAAAA
|
|
|
let qcObj = treeNode.data.quantityCoe;
|
|
|
if (!qcObj || calcTools.isEmptyObject(qcObj)){
|
|
|
treeNode.data.quantityCoe = {labour: coe, material: coe, machine: coe, main: coe, equipment: coe};
|