| 
					
				 | 
			
			
				@@ -33,27 +33,29 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     xmjSpread.bind(spreadNS.Events.SelectionChanged, function (e, info) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         unitTreeObj.loadCurUnitData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    postData(window.location.pathname + '/load', {}, function (result) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const setting = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            id: 'ledger_id', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            pid: 'ledger_pid', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            order: 'order', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            level: 'level', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            rootId: -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            fullPath: 'full_path', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        const xmjTree = createNewPathTree('base', setting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        xmjTree.loadDatas(result); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        for (const n of xmjTree.nodes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (n.unitTreeData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                n.unitTree = createNewPathTree('base', setting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                n.unitTree.loadDatas(n.unitTreeData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const loadData = function (dataType) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        postData(window.location.pathname + '/load', {filter: dataType}, function (result) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const setting = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                id: 'ledger_id', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                pid: 'ledger_pid', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                order: 'order', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                level: 'level', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                rootId: -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                fullPath: 'full_path', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const xmjTree = createNewPathTree('base', setting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            xmjTree.loadDatas(result); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (const n of xmjTree.nodes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (n.unitTreeData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    n.unitTree = createNewPathTree('base', setting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    n.unitTree.loadDatas(n.unitTreeData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        SpreadJsObj.loadSheetData(xmjSheet, SpreadJsObj.DataType.Tree, xmjTree); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        unitTreeObj.loadCurUnitData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            SpreadJsObj.loadSheetData(xmjSheet, SpreadJsObj.DataType.Tree, xmjTree); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            unitTreeObj.loadCurUnitData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    loadData('all'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $.subMenu({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -102,7 +104,23 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     tree.expandByCustom(() => { return true; }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     SpreadJsObj.refreshTreeRowVisible(sheet); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                case "curMeasure": 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    tree.expandByCustom(function (node) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        for (const field of ['contract_tp', 'qc_tp', 'gather_tp']) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if (node[field]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        return false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    SpreadJsObj.refreshTreeRowVisible(sheet); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     })('a[name=showLevel]', xmjSheet); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 过滤数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('a[name=load-data]').click(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const tag = $(this).attr('tag'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        loadData(tag); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }); 
			 |