| xqd
@@ -29,9 +29,6 @@ class ServicePacksController extends AdminController
|
|
|
protected function grid()
|
|
|
{
|
|
|
$grid = new Grid(new ServicePack());
|
|
|
- $grid->actions(function ($actions){
|
|
|
- $actions->disableView();
|
|
|
- });
|
|
|
$grid->filter(function ($filter){
|
|
|
$filter->disableIdFilter();
|
|
|
$filter->like('name','服务包名称');
|
| xqd
@@ -40,7 +37,7 @@ class ServicePacksController extends AdminController
|
|
|
$grid->column('id', __('Id'));
|
|
|
$grid->column('name', __('服务包名称'));
|
|
|
$grid->column('intro', __('简介'));
|
|
|
- $grid->column('desc', __('详细内容'))->limit(100);
|
|
|
+// $grid->column('desc', __('详细内容'))->limit();
|
|
|
$grid->column('label','服务类型')->display(function (){
|
|
|
$tag = [1 => '图文',2 => '电话',3 => '门诊',4 => '计免',5 => '儿保'];
|
|
|
$datas = $this -> label;
|
| xqd
@@ -83,6 +80,75 @@ class ServicePacksController extends AdminController
|
|
|
|
|
|
return $grid;
|
|
|
}
|
|
|
+
|
|
|
+ protected function detail($id)
|
|
|
+ {
|
|
|
+ $show = new Show(ServicePack::findOrFail($id));
|
|
|
+
|
|
|
+ $show->field('id', 'ID');
|
|
|
+ $show->field('name', __('服务包名称'));
|
|
|
+ $show->field('intro', __('简介'));
|
|
|
+ $show->field('desc', '详细内容')->unescape()->as(function ($avatar) {
|
|
|
+ return $avatar;
|
|
|
+ });
|
|
|
+ $show->field('label', __('服务类型'))->unescape()->as(function ($label) {
|
|
|
+ $arr = [];
|
|
|
+ foreach ($label as $value){
|
|
|
+ switch ($value)
|
|
|
+ {
|
|
|
+ case 1 :
|
|
|
+ array_push($arr,'图文');
|
|
|
+ break;
|
|
|
+ case 2 :
|
|
|
+ array_push($arr,'电话');
|
|
|
+ break;
|
|
|
+ case 3 :
|
|
|
+ array_push($arr,'门诊');
|
|
|
+ break;
|
|
|
+ case 4 :
|
|
|
+ array_push($arr,'门诊');
|
|
|
+ break;
|
|
|
+ case 5 :
|
|
|
+ array_push($arr,'儿保');
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return $arr;
|
|
|
+ })->label('info');
|
|
|
+ $show->field('price','价格')->as(function ($price){
|
|
|
+ return $price/100;
|
|
|
+ });
|
|
|
+ $show->field('team_id')->as(function ($team_id){
|
|
|
+ $arr = [];
|
|
|
+ if ($team_id == 0)
|
|
|
+ {
|
|
|
+ array_push($arr,'通用');
|
|
|
+ return $arr;
|
|
|
+ }
|
|
|
+ foreach ($team_id as $value){
|
|
|
+ $name = Team::where('id',$value)->value('name');
|
|
|
+ array_push($arr,$name);
|
|
|
+ }
|
|
|
+ return $arr;
|
|
|
+ })->label();
|
|
|
+
|
|
|
+ $show->field('image','图片')->image();
|
|
|
+ $show->field('is_need_insure', __('是否包含保险'))->using([0=>'不包含',1=>'包含']);
|
|
|
+ $show->field('insuranceagreement.name', __('保险协议名称'));
|
|
|
+ $show->field('phone_minutes', __('电话次数'));
|
|
|
+ $show->field('chat_num', __('图文次数'));
|
|
|
+ $show->field('appoint_num', __('门诊次数'));
|
|
|
+ $show->field('vaccine_limit_amount', __('计免次数'));
|
|
|
+ $show->field('nurses_limit_amount', __('儿保次数'));
|
|
|
+ $show->field('effective_days', __('服务时长'));
|
|
|
+ $show->field('created_at', __('创建时间'));
|
|
|
+ $show->field('updated_at', __('更新时间'));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return $show;
|
|
|
+ }
|
|
|
/**
|
|
|
* Make a form builder.
|
|
|
*
|