| 
					
				 | 
			
			
				@@ -169,8 +169,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         current_stage_id = STAGE_ID; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        current_stage_status = STAGE_STATUS; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } else if (STAGE_LIST.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        current_stage_order = STAGE_LIST[STAGE_LIST.length - 1].order; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        current_stage_id = STAGE_LIST[STAGE_LIST.length - 1].id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (let i = STAGE_LIST.length; i > 0; i--) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (parseInt(STAGE_LIST[i - 1].status) === 3) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                current_stage_order = STAGE_LIST[i - 1].order; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                current_stage_id = STAGE_LIST[i - 1].id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        current_stage_order = STAGE_LIST[STAGE_LIST.length - 1].order; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        current_stage_id = STAGE_LIST[STAGE_LIST.length - 1].id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        current_stage_status = STAGE_LIST[STAGE_LIST.length - 1].status; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -248,10 +255,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $("#optionSelectableStages")[0].style.display = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $("#btnCurrentStage")[0].innerText = '第' + current_stage_order + '期'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $("#optionSelectableStages").empty(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (STAGE_LIST.length > 0 && STAGE_ID < 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 for (let i = STAGE_LIST.length; i > 0; i--) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (parseInt(STAGE_LIST[i - 1].order) !== current_stage_order) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (parseInt(STAGE_LIST[i - 1].status) === 3 && parseInt(STAGE_LIST[i - 1].order) !== current_stage_order) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         const str = '<a class="dropdown-item" style="cursor:pointer" onclick="changeCurrentStage(this)" stg_id = "' + STAGE_LIST[i - 1].id + '" stg_order="' + STAGE_LIST[i - 1].order + '">第' + STAGE_LIST[i - 1].order + '期</a>'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         $("#optionSelectableStages").append(str); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 |