瀏覽代碼

定额库自动展开后需点击一次才能获取定额

zhangweicheng 4 年之前
父節點
當前提交
eb41d8885a
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      web/building_saas/main/js/views/std_ration_lib.js

+ 8 - 0
web/building_saas/main/js/views/std_ration_lib.js

@@ -187,6 +187,14 @@ var rationLibObj = {
     },
     loadSectionRations: function (sectionID) {
         let me = this;
+        if(sectionID === undefined && me.rationChapterSpread){
+           let sel = me.rationChapterSpread.getSheet(0).getSelections();
+           if(sel && sel.length > 0){
+              let node = me.tree.items[sel[0].row];
+              if(node) sectionID = node.data.ID;  
+            }
+        }
+        // rationLibObj.rationChapterSpread.getSheet(0)
         var showDatas = function (datas, setting) {
             let rationSheet = rationLibObj.sectionRationsSpread.getActiveSheet();
             /*TREE_SHEET_HELPER.massOperationSheet(rationSheet, function () {