From cc8838de140701b72929446b76530d2a5e0ced28 Mon Sep 17 00:00:00 2001 From: liapples Date: Wed, 22 Sep 2021 17:54:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E7=BB=B4=E6=95=B0=E7=BB=84=E6=94=B9?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/IndustryProductController.php | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/AdminSupplier/Controllers/IndustryProductController.php b/app/AdminSupplier/Controllers/IndustryProductController.php index 172a8a3..6b8cb38 100644 --- a/app/AdminSupplier/Controllers/IndustryProductController.php +++ b/app/AdminSupplier/Controllers/IndustryProductController.php @@ -141,13 +141,13 @@ class IndustryProductController extends AdminController if ($form->isEditing() && $form->model()->type != 0) { return; } - $form->table('extends.field_0.project', '包含项目', function (NestedForm $table) { + $form->table('extends.field_0_project', '包含项目', function (NestedForm $table) { $table->text('name', '字段1'); $table->text('num', '字段2'); $table->text('price', '字段3'); })->help('第一行数据默认是表头,如:项目名称、数量、额外费用'); - $form->dateRange('extends.field_0.date.start', 'extends.field_0.date.end', '行程时间'); + $form->dateRange('extends.field_0_date.start', 'extends.field_0_date.end', '行程时间'); })->when(1, function (Form $form) { //酒店 if ($form->isEditing() && $form->model()->type != 1) { return; @@ -158,51 +158,51 @@ class IndustryProductController extends AdminController ['tag' => '新风系统'], ['tag' => '24小时热水'], ['tag' => '吹风机'], ['tag' => '加湿器'], ['tag' => '自动售货机'], ['tag' => '健身房'], ['tag' => '桌球室'], ['tag' => '洗衣服务'] ]; - $form->table('extends.field_1.tags', '酒店设施', function (NestedForm $table) { + $form->table('extends.field_1_tags', '酒店设施', function (NestedForm $table) { $table->text('tag', '包含项目')->placeholder('如:24小时热水、干洗服务等'); })->value($default)->help('首次创建时,系统会默认填充基本服务,请根据本酒店情况进行删减或新增'); - $form->text('extends.field_1.name', '酒店名'); - $form->text('extends.field_1.address', '地址'); - $form->map('extends.field_1.latitude', 'extends.field_1.longitude', '位置'); + $form->text('extends.field_1_name', '酒店名'); + $form->text('extends.field_1_address', '地址'); + $form->map('extends.field_1_latitude', 'extends.field_1_longitude', '位置'); })->when(2, function (Form $form) { //景区 if ($form->isEditing() && $form->model()->type != 2) { return; } - $form->table('extends.field_2.open_time', '开放时间', function (NestedForm $table) { + $form->table('extends.field_2_open_time', '开放时间', function (NestedForm $table) { $table->text('node', '字段1')->placeholder('如:周一至周五'); $table->text('summer', '字段2')->placeholder('如:08:00~19:00'); $table->text('winter', '字段3')->placeholder('如:08:00~18:00'); })->help('第一行数据默认是表头,如:项目名称、数量、额外费用'); - $form->table('extends.field_2.project', '包含项目', function (NestedForm $table) { + $form->table('extends.field_2_project', '包含项目', function (NestedForm $table) { $table->text('name', '字段1'); $table->text('num', '字段2'); $table->text('price', '字段3'); })->help('第一行数据默认是表头,如:项目名称、数量、额外费用'); - $form->text('extends.field_2.name', '景区名'); - $form->text('extends.field_2.address', '地址'); - $form->map('extends.field_2.latitude', 'extends.field_2.longitude', '位置'); + $form->text('extends.field_2_name', '景区名'); + $form->text('extends.field_2_address', '地址'); + $form->map('extends.field_2_latitude', 'extends.field_2_longitude', '位置'); })->when(3, function (Form $form) { //餐厅 if ($form->isEditing() && $form->model()->type != 3) { return; } - $form->table('extends.field_3.open_time', '开放时间', function (NestedForm $table) { + $form->table('extends.field_3_open_time', '开放时间', function (NestedForm $table) { $table->text('week', '字段1')->placeholder('如:周一至周五'); $table->text('section', '字段2')->placeholder('如:上午/下午'); $table->text('time', '字段3')->placeholder('如:08:00~18:00'); })->help('第一行数据默认是表头,如:项目名称、数量、额外费用'); - $form->table('extends.field_3.package', '包含套餐', function (NestedForm $table) { + $form->table('extends.field_3_package', '包含套餐', function (NestedForm $table) { $table->text('name', '字段1')->placeholder('如:清蒸鱿鱼'); $table->text('num', '字段2')->placeholder('如:1条'); $table->text('price', '字段3')->placeholder('如:99元'); })->help('第一行数据默认是表头,如:项目名称、数量、额外费用'); - $form->text('extends.field_3.name', '餐厅名'); - $form->text('extends.field_3.address', '地址'); - $form->map('extends.field_3.latitude', 'extends.field_3.longitude', '位置'); + $form->text('extends.field_3_name', '餐厅名'); + $form->text('extends.field_3_address', '地址'); + $form->map('extends.field_3_latitude', 'extends.field_3_longitude', '位置'); }); })->saving(function (Form $form) use (&$change_deposit, &$old_deposit) { //不允许编辑非自己数据