| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -24,7 +24,6 @@ class IndustryProductController extends AdminController | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return Grid::make(new IndustryProduct(['category']), function (Grid $grid) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$grid->disableCreateButton(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$grid->disableDeleteButton(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$grid->disableEditButton(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								//如果是审核页面,多加where条件判断
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								if (strpos(Route::current()->uri, 'audit')) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -77,7 +76,6 @@ class IndustryProductController extends AdminController | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return Show::make($id, new IndustryProduct(['category:id,name', 'supplier:id,company_name,contact_phone']), function (Show $show) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$show->disableDeleteButton(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$show->disableEditButton(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$show->field('id'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$show->field('supplier.company_name', '供应商'); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -114,6 +112,10 @@ class IndustryProductController extends AdminController | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            $form->display('id'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            $form->select('status')->options(ProductStatus::array()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        })->saving(function (Form $form) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        	if (!is_null($form->status) && array_key_exists($form->status, ProductStatus::array())) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									$form->model()->update(['status' => $form->status]); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									return $form->response()->success('操作成功!')->script('history.go(-1)'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								return $form->response()->error('操作禁止!')->refresh(); //禁止编辑,如果非要编辑的话,记录冻结和解决交易金
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							})->deleting(function (Form $form) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								return $form->response()->error('操作禁止!')->refresh(); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |