| 
					
					
						
							
						
					
					
				 | 
				@ -109,18 +109,6 @@ class DemandBiddingController extends AdminController | 
			
		
		
	
		
			
				 | 
				 | 
							$form->disableViewButton(); | 
				 | 
				 | 
							$form->disableViewButton(); | 
			
		
		
	
		
			
				 | 
				 | 
							$form->disableViewCheck(); | 
				 | 
				 | 
							$form->disableViewCheck(); | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
							$demand_id = request('demand_id'); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
							$isBidding = \App\Models\DemandBidding::query() | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
								->where('demand_id',$demand_id) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
								->where([ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
									'bidding_user_type' => DemandTraits::$col[1], | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
									'bidding_user_id' => Admin::user()->id | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
								]) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
								->exists(); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
							if ($demand_id && $isBidding) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
								Admin::exit('你已经竞标过了,无需重复参加'); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
							} | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
							$form->display('id')->disable(); | 
				 | 
				 | 
							$form->display('id')->disable(); | 
			
		
		
	
		
			
				 | 
				 | 
							if(request('is_bidding',0)) { | 
				 | 
				 | 
							if(request('is_bidding',0)) { | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -145,6 +133,21 @@ class DemandBiddingController extends AdminController | 
			
		
		
	
		
			
				 | 
				 | 
								$form->bidding_user_id = Admin::user()->id; | 
				 | 
				 | 
								$form->bidding_user_id = Admin::user()->id; | 
			
		
		
	
		
			
				 | 
				 | 
							}); | 
				 | 
				 | 
							}); | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							$form->saving(function (Form $form) { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
								if ($form->isCreating()) { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
									$isBidding = \App\Models\DemandBidding::query() | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
										->where('demand_id',$form->demand_id) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
										->where([ | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
											'bidding_user_type' => DemandTraits::$col[1], | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
											'bidding_user_id' => Admin::user()->id | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
										]) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
										->exists(); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
									if ($isBidding) { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
										Admin::exit('你已经竞标过了,无需重复参加'); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
									} | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
								} | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
							}); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
							$form->saved(function (Form $form) { | 
				 | 
				 | 
							$form->saved(function (Form $form) { | 
			
		
		
	
		
			
				 | 
				 | 
								$provinceId = Demand::query()->where('id',$this->demand_id)->value('province_id'); | 
				 | 
				 | 
								$provinceId = Demand::query()->where('id',$this->demand_id)->value('province_id'); | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
					
				 | 
				
  |