| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -33,7 +33,7 @@ class DemandController extends AdminController | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    protected function grid() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return Grid::make(new Demand(['publisher','biddingUser']), function (Grid $grid) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return Grid::make(new Demand(['publisher','biddingUser', 'bidding']), function (Grid $grid) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        	if (\request('self',0)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									$grid->model()->where(['publisher_id' => Admin::user()->id,'publisher_type' => DemandTraits::$col[1]]); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								} | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -72,7 +72,8 @@ class DemandController extends AdminController | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								}else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									$grid->column('bidding','竞标') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										->if(function (){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											return $this->state == 1 && $this->bidding_user_type == DemandTraits::$col[1]; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											// $this->bidding 表示参加过竞标后不再显示
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											return $this->state == 1 && $this->bidding_user_type == DemandTraits::$col[1] && $this->bidding; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										}) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										->then(function (Grid\Column $column) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$column->append('<a class="btn btn-sm btn-primary" href="'.admin_url('/demand_bidding/create?demand_id='.$this->id).'">发起竞标</a>'); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |