|
@@ -580,10 +580,19 @@ var quantity_detail = {
|
|
|
if(node.children.length>0){//如果有子项则
|
|
|
for(let rationNode of node.children){
|
|
|
let EXPString = rationNode.data.quantityEXP+"";
|
|
|
- if(EXPString.indexOf("QDL")!=-1){//如果定额的工程量是通过计算出来的,则应该重新计算。
|
|
|
- let tem_contain = scMathUtil.roundForObj(rationNode.data.contain,getDecimal("process"));
|
|
|
- let tem_quantity = scMathUtil.roundForObj(value*tem_contain,getDecimal("quantity",rationNode));
|
|
|
- rationNode.data.quantity = this.autoTransformQuantity(tem_quantity,rationNode);
|
|
|
+ if(EXPString.indexOf("QDL")!=-1){
|
|
|
+ if(EXPString=="QDL"){//定额的工程量是直接通过清单量填进来的;
|
|
|
+ let times = parseInt(rationNode.data.unit);
|
|
|
+ if(isNaN(times)){
|
|
|
+ times = 1;
|
|
|
+ }
|
|
|
+ rationNode.data.quantity = scMathUtil.roundForObj(value / times,getDecimal("quantity",rationNode));
|
|
|
+ rationNode.data.contain = scMathUtil.roundForObj(rationNode.data.quantity/value,getDecimal("process"));
|
|
|
+ }else {//如果定额的工程量是通过计算出来的,则应该重新计算。
|
|
|
+ let tem_contain = scMathUtil.roundForObj(rationNode.data.contain,getDecimal("process"));
|
|
|
+ let tem_quantity = scMathUtil.roundForObj(value*tem_contain,getDecimal("quantity",rationNode)); //this.autoTransformQuantity(tem_quantity,rationNode);
|
|
|
+ rationNode.data.quantity = tem_quantity;
|
|
|
+ }
|
|
|
rationNode.changed = true;
|
|
|
needUpdateChildren.push(rationNode);
|
|
|
if (rationNode.children.length>0){//如果有子工料机
|
|
@@ -593,7 +602,7 @@ var quantity_detail = {
|
|
|
let tem_contain=0;
|
|
|
if(value&&value!=0){
|
|
|
let children_quantity = scMathUtil.roundForObj(rationNode.data.quantity,getDecimal("quantity"),rationNode);
|
|
|
- children_quantity = scMathUtil.roundForObj(this.reverseQuantity(children_quantity,rationNode),getDecimal("quantity",rationNode));
|
|
|
+ // children_quantity = scMathUtil.roundForObj(this.reverseQuantity(children_quantity,rationNode),getDecimal("quantity",rationNode)); 原先是要反算的,现在改成不用反算了
|
|
|
tem_contain =scMathUtil.roundForObj(children_quantity/value,getDecimal("process"));
|
|
|
}
|
|
|
rationNode.data.contain = tem_contain;
|