|
@@ -173,6 +173,12 @@ let tender_obj={
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ cleanCacheCoes: function (){
|
|
|
+ for(let node of tender_obj.tenderTree.items){
|
|
|
+ if (node.data.rationQuantityCoe) node.data.rationQuantityCoe = null;
|
|
|
+ if (node.data.quantityCoe) node.data.quantityCoe = null;
|
|
|
+ };
|
|
|
+ },
|
|
|
|
|
|
calcOptionsChecking:function (option) {//调整选项检查,返回需要更新的数组
|
|
|
let datas = [];
|
|
@@ -317,6 +323,12 @@ let tender_obj={
|
|
|
$('#tenderRationQuantity').removeAttr("disabled");
|
|
|
}
|
|
|
//gljPriceTenderCoe
|
|
|
+ },
|
|
|
+ doTenderCalc: function(tender){
|
|
|
+ if (tender != tenderTypes.ttCalc)
|
|
|
+ tender_obj.cleanCacheCoes();
|
|
|
+ let callback = function () { tender_obj.showTenderData() };
|
|
|
+ projectObj.project.calcProgram.calcAllNodesAndSave(calcAllType.catAll, callback, tender);
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -378,12 +390,15 @@ $(function () {
|
|
|
});
|
|
|
|
|
|
$('#tenderPrice').on('click', function () {
|
|
|
- let callback = function () {tender_obj.showTenderData()};
|
|
|
- projectObj.project.calcProgram.calcAllNodesAndSave(calcAllType.catAll, callback, tenderTypes.ttCalc);
|
|
|
+ tender_obj.doTenderCalc(tenderTypes.ttCalc);
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#tenderGLJQuantity').on('click', function () {
|
|
|
+ tender_obj.doTenderCalc(tenderTypes.ttReverseGLJ);
|
|
|
});
|
|
|
|
|
|
$('#tenderRationQuantity').on('click', function () {
|
|
|
- let callback = function () {tender_obj.showTenderData()};
|
|
|
- projectObj.project.calcProgram.calcAllNodesAndSave(calcAllType.catAll, callback, tenderTypes.ttReverseRation);
|
|
|
+ tender_obj.doTenderCalc(tenderTypes.ttReverseRation);
|
|
|
});
|
|
|
+
|
|
|
});
|