|
@@ -818,13 +818,14 @@ var Bills = {
|
|
|
updateData.projectID = selected.data.projectID;
|
|
|
updateData.user_id = userID;
|
|
|
$.bootstrapLoading.start();
|
|
|
- CommonAjax.post("/bills/multiDelete", updateData, function () {
|
|
|
+ CommonAjax.post("/bills/multiDelete", updateData, async function () {
|
|
|
// 回收删除节点
|
|
|
BlockController.recycleBlock(selection);
|
|
|
let quantity_detail_datas = project.quantity_detail.datas;
|
|
|
let ration_datas = project.Ration.datas;
|
|
|
let nodes = controller.tree.nodes;
|
|
|
let prefix = controller.tree.prefix;
|
|
|
+ let deleteParentBillIDs = [];
|
|
|
//更新缓存
|
|
|
if(updateData['bills']){//更新bills
|
|
|
for(let b_key in updateData['bills']){
|
|
@@ -842,6 +843,8 @@ var Bills = {
|
|
|
for(let r_key in updateData['ration']){//定额只有删除,没有更新
|
|
|
_.remove(ration_datas,{'ID':r_key});
|
|
|
project.Ration.deleteSubListOfRation({ID:r_key});
|
|
|
+ let tnode = projectObj.project.mainTree.getNodeByID(r_key);
|
|
|
+ if(tnode) deleteParentBillIDs.push(tnode.data.billsItemID);
|
|
|
}
|
|
|
}
|
|
|
for(let r of refNodes){
|
|
@@ -858,7 +861,15 @@ var Bills = {
|
|
|
}
|
|
|
gljOprObj.refreshView();
|
|
|
});
|
|
|
- OVER_HEIGHT.reCalcOverHeightFee();
|
|
|
+ await OVER_HEIGHT.reCalcOverHeightFee();
|
|
|
+ //计算子目增加费
|
|
|
+ let tbns = [];
|
|
|
+ for(let bID of deleteParentBillIDs){
|
|
|
+ let bnode = projectObj.project.mainTree.getNodeByID(bID);
|
|
|
+ if(bnode) tbns.push(bnode);
|
|
|
+ }
|
|
|
+ await itemIncreaseFeeObj.calcItemIncreaseFeeByNodes(tbns);
|
|
|
+
|
|
|
//添加内容为定额子目时,根据特征及内容添加规则刷新清单
|
|
|
if(updateData['ration']){
|
|
|
let addRuleSetting = getAddRuleSetting();
|