| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -13,7 +13,6 @@ use Dcat\Admin\Form\NestedForm; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use Dcat\Admin\Grid; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use Dcat\Admin\Show; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use Dcat\Admin\Http\Controllers\AdminController; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use Dcat\Admin\Widgets\Alert; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use Dcat\Admin\Widgets\Card; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use Dcat\Admin\Widgets\Table; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use Illuminate\Support\Facades\DB; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -105,6 +104,7 @@ class ProductController extends AdminController | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    protected function form() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							Form\Field\Map::requireAssets(); //地图
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							Admin::user()->publish_type = json_decode(Admin::user()->publish_type, true); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return Form::make(new Product(), function (Form $form) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								//不允许编辑非自己数据
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -150,6 +150,7 @@ class ProductController extends AdminController | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										$form->table('extends.field_1.tags', '酒店设施', function (NestedForm $table) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$table->text('tag', '包含项目')->placeholder('如:24小时热水、干洗服务等'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										})->value($default); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										$form->map('extends.field_1.latitude', 'extends.field_1.longitude', '位置'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									})->when(2, function (Form $form) { //景区
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										$form->table('extends.field_2.open_time', '开放时间', function (NestedForm $table) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$table->text('node', '节点')->placeholder('如:周一至周五'); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -161,6 +162,7 @@ class ProductController extends AdminController | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$table->text('num', '数量'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$table->text('price', '费用'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										}); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										$form->map('extends.field_2.latitude', 'extends.field_2.longitude', '位置'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									})->when(3, function (Form $form) { //餐厅
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										$form->table('extends.field_3.open_time', '开放时间', function (NestedForm $table) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$table->text('week', '星期')->placeholder('如:周一至周五'); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -172,10 +174,9 @@ class ProductController extends AdminController | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$table->text('num', '数量')->placeholder('如:1条'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											$table->text('price', '价格')->placeholder('如:99元'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										}); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										$form->map('extends.field_3.latitude', 'extends.field_3.longitude', '位置'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									}); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$form->map('latitude', 'longitude', '位置'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if ($form->isEditing()) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									$form->confirm('提示', '修改标题、价格、产品图片、旅游须知、产品详情需要重新审核,同时<span class="btn-danger">下架所有</span>关联的代理商产品,是否继续?'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								} | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |