|
@@ -64,7 +64,8 @@ class ServicePacksController extends AdminController
|
|
})->label('success');
|
|
})->label('success');
|
|
|
|
|
|
$grid->column('image','图片')->lightbox(['width' =>'', 'height' => 30]);
|
|
$grid->column('image','图片')->lightbox(['width' =>'', 'height' => 30]);
|
|
- $grid->column('phone_minutes', __('电话次数(分钟)'));
|
|
|
|
|
|
+ $grid->column('is_need_insure', __('是否包含保险'))->using([0=>'不包含',1=>'包含']);
|
|
|
|
+ $grid->column('phone_minutes', __('电话次数'));
|
|
$grid->column('chat_num', __('图文次数'));
|
|
$grid->column('chat_num', __('图文次数'));
|
|
$grid->column('appoint_num', __('门诊次数'));
|
|
$grid->column('appoint_num', __('门诊次数'));
|
|
$grid->column('vaccine_limit_amount', __('计免次数'));
|
|
$grid->column('vaccine_limit_amount', __('计免次数'));
|
|
@@ -83,16 +84,22 @@ class ServicePacksController extends AdminController
|
|
protected function form()
|
|
protected function form()
|
|
{
|
|
{
|
|
$form = new Form(new ServicePack());
|
|
$form = new Form(new ServicePack());
|
|
-
|
|
|
|
|
|
+ $form->editing(function ($f){
|
|
|
|
+ $f->model()->price /=100;
|
|
|
|
+ });
|
|
$form->text('name', __('服务包名称'))->rules('required' ,['required'=>'请填写名称!']);
|
|
$form->text('name', __('服务包名称'))->rules('required' ,['required'=>'请填写名称!']);
|
|
$form->image('image','图片')->rules('required' ,['required'=>'请选择图片!']);
|
|
$form->image('image','图片')->rules('required' ,['required'=>'请选择图片!']);
|
|
$form->text('intro', __('简介'))->rules('required' ,['required'=>'请填写简介!']);;
|
|
$form->text('intro', __('简介'))->rules('required' ,['required'=>'请填写简介!']);;
|
|
$form->editor('desc', __('详情内容'))->rules('required' ,['required'=>'请填写内容!']);;
|
|
$form->editor('desc', __('详情内容'))->rules('required' ,['required'=>'请填写内容!']);;
|
|
$form->number('price', __('价钱'))->default(0);
|
|
$form->number('price', __('价钱'))->default(0);
|
|
|
|
+ $form->radio('is_need_insure', __('服务包是否包含保险'))->options([
|
|
|
|
+ 0=>'否',
|
|
|
|
+ 1=>'是'
|
|
|
|
+ ])->rules('required',['required'=>'请选择是否包含保险']);;
|
|
$form->radio('has_team','是否包含团队')->options([
|
|
$form->radio('has_team','是否包含团队')->options([
|
|
0=>'否',
|
|
0=>'否',
|
|
1=>'是'
|
|
1=>'是'
|
|
- ])->default(1)->when(0,function (Form $form){
|
|
|
|
|
|
+ ])->when(0,function (Form $form){
|
|
$form->checkbox('label','服务类型')
|
|
$form->checkbox('label','服务类型')
|
|
->options([
|
|
->options([
|
|
1 => '图文',
|
|
1 => '图文',
|
|
@@ -103,7 +110,7 @@ class ServicePacksController extends AdminController
|
|
])->when('has',1,function (Form $form){
|
|
])->when('has',1,function (Form $form){
|
|
$form->number('chat_num', __('图文次数'))->default(0);
|
|
$form->number('chat_num', __('图文次数'))->default(0);
|
|
})->when('has',2,function (Form $form){
|
|
})->when('has',2,function (Form $form){
|
|
- $form->number('phone_minutes', __('电话分钟数'))->default(0);
|
|
|
|
|
|
+ $form->number('phone_minutes', __('电话次数'))->default(0);
|
|
})->when('has',3,function (Form $form){
|
|
})->when('has',3,function (Form $form){
|
|
$form->number('appoint_num', __('门诊次数'))->default(0);
|
|
$form->number('appoint_num', __('门诊次数'))->default(0);
|
|
})->when('has',4,function (Form $form){
|
|
})->when('has',4,function (Form $form){
|
|
@@ -125,7 +132,7 @@ class ServicePacksController extends AdminController
|
|
])->when('has',1,function (Form $form){
|
|
])->when('has',1,function (Form $form){
|
|
$form->number('chat_num', __('图文次数'))->default(0);
|
|
$form->number('chat_num', __('图文次数'))->default(0);
|
|
})->when('has',2,function (Form $form){
|
|
})->when('has',2,function (Form $form){
|
|
- $form->number('phone_minutes', __('电话分钟数'))->default(0);
|
|
|
|
|
|
+ $form->number('phone_minutes', __('电话次数'))->default(0);
|
|
})->when('has',3,function (Form $form){
|
|
})->when('has',3,function (Form $form){
|
|
$form->number('appoint_num', __('门诊次数'))->default(0);
|
|
$form->number('appoint_num', __('门诊次数'))->default(0);
|
|
})->when('has',4,function (Form $form){
|
|
})->when('has',4,function (Form $form){
|
|
@@ -134,7 +141,7 @@ class ServicePacksController extends AdminController
|
|
$form->select('product', __('儿保项目'))->options(Nurse::where('type',$form->team_id)->pluck('name','id'));
|
|
$form->select('product', __('儿保项目'))->options(Nurse::where('type',$form->team_id)->pluck('name','id'));
|
|
})->rules('required',['required'=>'请选择服务类型']);
|
|
})->rules('required',['required'=>'请选择服务类型']);
|
|
|
|
|
|
- });
|
|
|
|
|
|
+ })->rules('required',['required'=>'请选择是否包含团队']);;
|
|
$form->ignore('has_team');
|
|
$form->ignore('has_team');
|
|
$form->text('effective_days', __('服务时长(天)'))->default(0);
|
|
$form->text('effective_days', __('服务时长(天)'))->default(0);
|
|
$form->saving(function (Form $form){
|
|
$form->saving(function (Form $form){
|