|
|
@ -67,44 +67,55 @@ class StoreController extends AdminController |
|
|
return Show::make($id, new Store(), function (Show $show) { |
|
|
return Show::make($id, new Store(), function (Show $show) { |
|
|
|
|
|
|
|
|
$show->row(function (Show\Row $show) { |
|
|
$show->row(function (Show\Row $show) { |
|
|
|
|
|
|
|
|
|
|
|
$show->width(6)->id; |
|
|
|
|
|
$show->width(6)->mm_user_id->as(function ($mmUserId){ |
|
|
|
|
|
$item = MminfoModel::getMmInfo($mmUserId,'name'); |
|
|
|
|
|
return empty($item) ? '' : $item->name; |
|
|
|
|
|
}); |
|
|
|
|
|
$show->width(6)->market_id->as(function ($marketId){ |
|
|
|
|
|
$item = MarketModel::getMarketInfo($marketId,'name'); |
|
|
|
|
|
return empty($item) ? '' : $item->name; |
|
|
|
|
|
}); |
|
|
|
|
|
$show->width(6)->category_id->as(function ($categoryId){ |
|
|
|
|
|
$item = CategoryModel::getCategoryInfo($categoryId,'title'); |
|
|
|
|
|
return empty($item) ? '' : $item->title; |
|
|
|
|
|
}); |
|
|
|
|
|
$show->width(6)->name; |
|
|
|
|
|
$show->width(6)->logo->image(); |
|
|
|
|
|
$show->width(6)->user_id->as(function ($userId){ |
|
|
|
|
|
$item = UserModel::getUserInfo($userId,'nick_name'); |
|
|
|
|
|
return empty($item) ? '' : $item->nick_name; |
|
|
|
|
|
}); |
|
|
|
|
|
$show->width(6)->admin_id->as(function ($userId){ |
|
|
|
|
|
$item = UserModel::getUserInfo($userId,'nick_name'); |
|
|
|
|
|
return empty($item) ? '' : $item->nick_name; |
|
|
|
|
|
}); |
|
|
|
|
|
$show->width(6)->business_license->image(); |
|
|
|
|
|
$show->width(6)->zm_img->image(); |
|
|
|
|
|
$show->width(6)->fm_img->image(); |
|
|
|
|
|
$show->width(6)->tel; |
|
|
|
|
|
$show->width(6)->link_name; |
|
|
|
|
|
$show->width(6)->link_tel; |
|
|
|
|
|
$show->width(6)->time; |
|
|
|
|
|
$show->width(6)->time2; |
|
|
|
|
|
$show->width(6)->time3; |
|
|
|
|
|
$show->width(6)->time4; |
|
|
}); |
|
|
}); |
|
|
$show->row(function (Show\Row $show) { |
|
|
$show->row(function (Show\Row $show) { |
|
|
|
|
|
|
|
|
|
|
|
$show->width(6)->announcement; |
|
|
|
|
|
$show->width(6)->address; |
|
|
|
|
|
$show->width(6)->coordinates; |
|
|
|
|
|
|
|
|
|
|
|
$show->width(6)->is_rest_text; |
|
|
|
|
|
$show->width(6)->is_open_text; |
|
|
|
|
|
$show->width(6)->sort; |
|
|
|
|
|
// $show->width(6)->environment;
|
|
|
|
|
|
$show->width(6)->expire_time; |
|
|
|
|
|
$show->width(6)->loudspeaker_imei; |
|
|
}); |
|
|
}); |
|
|
$show->id; |
|
|
|
|
|
$show->mm_user_id; |
|
|
|
|
|
$show->market_id; |
|
|
|
|
|
$show->name; |
|
|
|
|
|
$show->address; |
|
|
|
|
|
|
|
|
|
|
|
$show->tel; |
|
|
|
|
|
$show->announcement; |
|
|
|
|
|
$show->is_rest; |
|
|
|
|
|
$show->logo; |
|
|
|
|
|
$show->details; |
|
|
|
|
|
$show->coordinates; |
|
|
|
|
|
$show->business_license; |
|
|
|
|
|
$show->store_type_id; |
|
|
|
|
|
$show->is_open; |
|
|
|
|
|
$show->sort; |
|
|
|
|
|
$show->user_id; |
|
|
|
|
|
$show->environment; |
|
|
|
|
|
$show->expire_time; |
|
|
|
|
|
$show->zm_img; |
|
|
|
|
|
$show->fm_img; |
|
|
|
|
|
$show->link_name; |
|
|
|
|
|
$show->link_tel; |
|
|
|
|
|
$show->admin_id; |
|
|
|
|
|
$show->loudspeaker_imei; |
|
|
|
|
|
|
|
|
|
|
|
$show->time; |
|
|
|
|
|
$show->time2; |
|
|
|
|
|
$show->time3; |
|
|
|
|
|
$show->time4; |
|
|
|
|
|
|
|
|
|
|
|
$show->created_at; |
|
|
|
|
|
$show->updated_at; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $show->created_at;
|
|
|
|
|
|
// $show->updated_at;
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -152,12 +163,12 @@ class StoreController extends AdminController |
|
|
})->default(1); |
|
|
})->default(1); |
|
|
$form->text('address'); |
|
|
$form->text('address'); |
|
|
}); |
|
|
}); |
|
|
$form->column(6, function (Form $form) { |
|
|
|
|
|
|
|
|
$form->column(6, function (Form $form) use($userList){ |
|
|
$form->image('business_license')->required(); |
|
|
$form->image('business_license')->required(); |
|
|
$form->image('zm_img')->required(); |
|
|
$form->image('zm_img')->required(); |
|
|
$form->image('fm_img')->required(); |
|
|
$form->image('fm_img')->required(); |
|
|
$form->text('admin_id')->required();/*需要优化 一个用户只能绑定一家店铺*/ |
|
|
|
|
|
$form->text('user_id')->required();/*需要优化 一个用户只能绑定一家店铺*/ |
|
|
|
|
|
|
|
|
$form->select('admin_id')->options($userList)->required();/*需要优化 一个用户只能绑定一家店铺*/ |
|
|
|
|
|
$form->select('user_id')->options($userList)->required();/*需要优化 一个用户只能绑定一家店铺*/ |
|
|
$form->timeRange('time1','time2','营业时间段一')->required(); |
|
|
$form->timeRange('time1','time2','营业时间段一')->required(); |
|
|
$form->timeRange('time3','time4','营业时间段二'); |
|
|
$form->timeRange('time3','time4','营业时间段二'); |
|
|
}); |
|
|
}); |
|
|
|