Browse Source

bug fixed

zhangweicheng 7 năm trước cách đây
mục cha
commit
e7c588954e

+ 1 - 2
web/building_saas/main/js/models/ration.js

@@ -406,13 +406,12 @@ var Ration = {
                        }
                        node.data.feesIndex = {};
                        //删除定额节点下的主材和设备节点
-                       project.Ration.removeNodeByRation(recode.ration,projectObj.mainController);
+                       project.ration_glj.removeNodeByRation(recode.ration,projectObj.mainController);
                        project.Ration.deleteSubListOfRation(recode.ration);//删除旧定额下的相关记录
                        //添加新的记录
                        project.ration_glj.addDatasToList(recode.ration_gljs);
                        project.ration_coe.addDatasToList(recode.ration_coes);
                        project.ration_installation.addDatasToList(recode.ration_installs);
-                       //to do 添加增加安装费
 
                        project.ration_glj.addToMainTree(recode.ration_gljs);
                    }

+ 5 - 2
web/building_saas/main/js/models/ration_glj.js

@@ -206,9 +206,12 @@ var ration_glj = {
                 }
             }
             if(deleteNodes.length > 0){
+                let rowIndex = deleteNodes[0].serialNo();
                 if(controller.tree.m_delete(deleteNodes)){
-                    let rowCount = deleteNodes.length;
-                    controller.sheet.deleteRows(deleteNodes[0].serialNo(), rowCount);
+                    TREE_SHEET_HELPER.massOperationSheet(controller.sheet, function () {
+                        let rowCount = deleteNodes.length;
+                        controller.sheet.deleteRows(rowIndex, rowCount);
+                    });
                 }
             }
         };