| 
					
				 | 
			
			
				@@ -1151,7 +1151,7 @@ $(document).ready(function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             {title: '单价', field: 'unit_price', hAlign: 2, width: 50, readOnly: true}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             {title: '数量', field: 'quantity', hAlign: 2, width: 50, readOnly: true}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         ], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        emptyRows: 3, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        emptyRows: 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         headRows: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         headRowHeight: [40], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         defaultRowHeight: 21, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1220,7 +1220,8 @@ $(document).ready(function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.spreadSetting = spreadSetting; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.spread = SpreadJsObj.createNewSpread(this.obj); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             SpreadJsObj.initSheet(this.spread.getActiveSheet(), this.spreadSetting); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.spread.bind(spreadNS.Events.CellDoubleClick, function (e, info) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!readOnly) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                this.spread.bind(spreadNS.Events.CellDoubleClick, function (e, info) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const dealSheet = info.sheet; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const mainSheet = ledgerSpread.getActiveSheet(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1248,20 +1249,21 @@ $(document).ready(function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     treeOperationObj.refreshOperationValid(mainSheet); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             SpreadJsObj.forbiddenSpreadContextMenu(selector, this.spread); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $('#upload-deal-bills').click(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                const file = $('#deal-bills-file')[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                const formData = new FormData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                formData.append('file', file.files[0]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                postDataWithFile(self.url+'/upload-excel', formData, function (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    self.data = data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    //self.calculateData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    SpreadJsObj.loadSheetData(self.spread.getActiveSheet(), 'data', data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $('#upload-deal').modal('hide'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }, function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    $('#upload-deal').modal('hide'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    const file = $('#deal-bills-file')[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    const formData = new FormData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    formData.append('file', file.files[0]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    postDataWithFile(self.url+'/upload-excel', formData, function (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        self.data = data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //self.calculateData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        SpreadJsObj.loadSheetData(self.spread.getActiveSheet(), 'data', data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $('#upload-deal').modal('hide'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }, function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        $('#upload-deal').modal('hide'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         loadData () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const self = this; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1461,7 +1463,9 @@ $(document).ready(function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if ((node.code && node.code.indexOf(keyword) > -1) || 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         node.b_code && node.b_code.indexOf(keyword) > -1 || 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         node.name && node.name.indexOf(keyword) > -1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        this.searchResult.push(node); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        const data = JSON.parse(JSON.stringify(node)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        data.visible = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        this.searchResult.push(data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 SpreadJsObj.loadSheetData(self.spread.getActiveSheet(), 'data', this.searchResult); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1474,7 +1478,7 @@ $(document).ready(function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const curBills = data[info.row]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (!curBills) { return } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                SpreadJsObj.locateTreeNode(ledgerSpread.getActiveSheet(), curBills.ledger_id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                SpreadJsObj.locateTreeNode(ledgerSpread.getActiveSheet(), curBills.ledger_id, true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 |