|
@@ -723,9 +723,7 @@ var quantity_detail = {
|
|
|
me.updateRationQuantity(value,node,null,editingText);
|
|
me.updateRationQuantity(value,node,null,editingText);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- quantity_detail.prototype.updateBillQuantity=function (value,node,quantityEXP,editingText) {
|
|
|
|
|
|
|
+ quantity_detail.prototype.updateBillQuantity=function (value,node,quantityEXP,editingText,batchGLGL = false) {//batchGLLC是否批量更新公路公里为单位的所有清单
|
|
|
let oldQuantityEXP = node.data.quantityEXP;
|
|
let oldQuantityEXP = node.data.quantityEXP;
|
|
|
node.updateData.quantityEXP = quantityEXP?quantityEXP:editingText;
|
|
node.updateData.quantityEXP = quantityEXP?quantityEXP:editingText;
|
|
|
value = scMathUtil.roundForObj(value,getDecimal("quantity",node));
|
|
value = scMathUtil.roundForObj(value,getDecimal("quantity",node));
|
|
@@ -737,7 +735,10 @@ var quantity_detail = {
|
|
|
node.updateData.quantity = newQuantity;
|
|
node.updateData.quantity = newQuantity;
|
|
|
let needUpdateChildren = [];//需更新的子定额
|
|
let needUpdateChildren = [];//需更新的子定额
|
|
|
let gljNodes=[];//当定额工程量改变时需刷新的子工料机
|
|
let gljNodes=[];//当定额工程量改变时需刷新的子工料机
|
|
|
- if(node.children.length>0){//如果有子项
|
|
|
|
|
|
|
+ let batchBillNodes = [];
|
|
|
|
|
+ if(batchGLGL==true){//批量更新公路公里的时候不考虑清单下的子定额工程量的更新
|
|
|
|
|
+ this.batchUpdateGLGLNodes(batchBillNodes,node);
|
|
|
|
|
+ }else if(node.children.length>0){//如果有子项
|
|
|
for(let rationNode of node.children){
|
|
for(let rationNode of node.children){
|
|
|
let EXPString = rationNode.data.quantityEXP+"";
|
|
let EXPString = rationNode.data.quantityEXP+"";
|
|
|
if(EXPString.indexOf("QDL")!=-1){//包含了清单量的定额才要再重新计算
|
|
if(EXPString.indexOf("QDL")!=-1){//包含了清单量的定额才要再重新计算
|
|
@@ -770,9 +771,6 @@ var quantity_detail = {
|
|
|
}
|
|
}
|
|
|
if(needUpdateChildren.length>0){//清单下的定额工程量发生了改变
|
|
if(needUpdateChildren.length>0){//清单下的定额工程量发生了改变
|
|
|
node.changed = true;//本身发生了改变,需要存储。
|
|
node.changed = true;//本身发生了改变,需要存储。
|
|
|
- /*project.calcProgram.calcNodesAndSave(needUpdateChildren, function () {
|
|
|
|
|
- project.projectGLJ.loadData();
|
|
|
|
|
- });*/
|
|
|
|
|
needUpdateChildren.push(node);
|
|
needUpdateChildren.push(node);
|
|
|
project.calcProgram.calcNodesAndSave(needUpdateChildren, function () {
|
|
project.calcProgram.calcNodesAndSave(needUpdateChildren, function () {
|
|
|
project.projectGLJ.calcQuantity();
|
|
project.projectGLJ.calcQuantity();
|
|
@@ -786,10 +784,10 @@ var quantity_detail = {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
}else {
|
|
}else {
|
|
|
node.changed = true;
|
|
node.changed = true;
|
|
|
- project.calcProgram.calcAndSave(node, function () {
|
|
|
|
|
|
|
+ batchBillNodes.push(node);
|
|
|
|
|
+ project.calcProgram.calcNodesAndSave(batchBillNodes, function () {
|
|
|
project.projectGLJ.calcQuantity();
|
|
project.projectGLJ.calcQuantity();
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -798,6 +796,19 @@ var quantity_detail = {
|
|
|
}
|
|
}
|
|
|
gljOprObj.refreshView();
|
|
gljOprObj.refreshView();
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ quantity_detail.prototype.batchUpdateGLGLNodes = function (batchUpdateGLGLNodes,node) {
|
|
|
|
|
+ for(let b of projectObj.project.Bills.datas){
|
|
|
|
|
+ if(b.ID == node.data.ID) continue;
|
|
|
|
|
+ let bNode = projectObj.project.mainTree.getNodeByID(b.ID);
|
|
|
|
|
+ if(bNode && b.unit == "公路公里"){
|
|
|
|
|
+ bNode.updateData.quantityEXP = node.updateData.quantityEXP;
|
|
|
|
|
+ bNode.updateData.quantity = node.updateData.quantity;
|
|
|
|
|
+ bNode.changed = true;
|
|
|
|
|
+ batchUpdateGLGLNodes.push(bNode);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
quantity_detail.prototype.updateRationQuantity=function(value,node,quantityEXP,editingText){
|
|
quantity_detail.prototype.updateRationQuantity=function(value,node,quantityEXP,editingText){
|
|
|
let oldQuantityEXP = node.data.quantityEXP;
|
|
let oldQuantityEXP = node.data.quantityEXP;
|
|
|
node.updateData.quantityEXP = quantityEXP?quantityEXP:editingText;
|
|
node.updateData.quantityEXP = quantityEXP?quantityEXP:editingText;
|