| 
					
				 | 
			
			
				@@ -44,12 +44,13 @@ $(document).ready(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     function checkOverRange() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const sheet = gclSpread.getActiveSheet(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         const bQty = $('#customRadio1')[0].checked, bDealQty = $('#customRadio2')[0].checked; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const nPercent = Math.min(Math.max(ZhCalc.div(parseFloat($('#over-percent').val()), 100), 0.5), 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SpreadJsObj.beginMassOperation(sheet); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (let iRow = 0, iLength = sheet.getRowCount(); iRow < iLength; iRow++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const node = sheet.zh_data[iRow]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (node) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                const bOverRangeQty = node.quantity ? node.end_gather_qty > node.quantity : node.end_gather_qty; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                const bOverRangeDealQty = node.deal_qty ? node.end_gather_qty > node.deal_qty : node.end_gather_qty; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                const bOverRangeQty = node.quantity ? node.end_gather_qty > ZhCalc.mul(node.quantity, nPercent) : node.end_gather_qty; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                const bOverRangeDealQty = node.deal_bills_qty ? node.end_gather_qty > ZhCalc.mul(node.deal_bills_qty, nPercent) : node.end_gather_qty; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const bOverRange = bQty ? bOverRangeQty : (bDealQty ? bOverRangeDealQty : bOverRangeQty || bOverRangeDealQty); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const color = bOverRange ? '#f8d7da' : ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 sheet.getRange(iRow, -1, 1, -1).backColor(color); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -73,4 +74,7 @@ $(document).ready(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 收起菜单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $('.dropdown-menu').click(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('#over-percent').change(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        checkOverRange(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }); 
			 |