| xqd
@@ -99,54 +99,33 @@ class ServicePacksController extends AdminController
|
|
|
$form->radio('is_need_insure', __('服务包是否包含保险'))->options([
|
|
|
0=>'否',
|
|
|
1=>'是'
|
|
|
- ])->rules('required',['required'=>'请选择是否包含保险']);;
|
|
|
- $form->radio('has_team','是否包含团队')->options([
|
|
|
- 0=>'否',
|
|
|
- 1=>'是'
|
|
|
- ])->when(0,function (Form $form){
|
|
|
- $form->checkbox('label','服务类型')
|
|
|
- ->options([
|
|
|
- 1 => '图文',
|
|
|
- 2 => '电话',
|
|
|
- 3 => '门诊',
|
|
|
- 4 => '计免',
|
|
|
- 5 => '儿保'
|
|
|
- ])->when('has',1,function (Form $form){
|
|
|
- $form->number('chat_num', __('图文次数'))->default(0);
|
|
|
- })->when('has',2,function (Form $form){
|
|
|
- $form->number('phone_minutes', __('电话次数'))->default(0);
|
|
|
- })->when('has',3,function (Form $form){
|
|
|
- $form->number('appoint_num', __('门诊次数'))->default(0);
|
|
|
- })->when('has',4,function (Form $form){
|
|
|
- $form->number('vaccine_limit_amount', __('计免次数'))->default(0);
|
|
|
- })->when('has',5,function (Form $form){
|
|
|
- //暂未完成,这里展示所有的自费的儿保项目
|
|
|
- $form->select('product', __('儿保项目'))->options(Nurse::where('type',2)->pluck('name','id'));
|
|
|
- })->rules('required',['required'=>'请选择服务类型']);
|
|
|
- })->when(1,function (Form $form)
|
|
|
- {
|
|
|
- $form->multipleSelect('team_id', __('团队选择'))->options(Team::all()->pluck('name','id'));
|
|
|
- $form->checkbox('label','服务类型')
|
|
|
- ->options([
|
|
|
- 1 => '图文',
|
|
|
- 2 => '电话',
|
|
|
- 3 => '门诊',
|
|
|
- 4 => '计免',
|
|
|
- 5 => '儿保'
|
|
|
- ])->when('has',1,function (Form $form){
|
|
|
- $form->number('chat_num', __('图文次数'))->default(0);
|
|
|
- })->when('has',2,function (Form $form){
|
|
|
- $form->number('phone_minutes', __('电话次数'))->default(0);
|
|
|
- })->when('has',3,function (Form $form){
|
|
|
- $form->number('appoint_num', __('门诊次数'))->default(0);
|
|
|
- })->when('has',4,function (Form $form){
|
|
|
- $form->number('vaccine_limit_amount', __('计免次数'))->default(0);
|
|
|
- })->when('has',5,function (Form $form){
|
|
|
- $form->select('product', __('儿保项目'))->options(Nurse::where('type',$form->team_id)->pluck('name','id'));
|
|
|
- })->rules('required',['required'=>'请选择服务类型']);
|
|
|
-
|
|
|
- })->rules('required',['required'=>'请选择是否包含团队']);;
|
|
|
- $form->ignore('has_team');
|
|
|
+ ])->rules('required',['required'=>'请选择是否包含保险']);
|
|
|
+ $form->radio('is_need_team', __('是否包含团队'))->options([
|
|
|
+ 0=>'否',
|
|
|
+ 1=>'是'
|
|
|
+ ])->when(1,function (Form $form){
|
|
|
+ $form->multipleSelect('team_id', __('团队选择'))->options(Team::all()->pluck('name','id'))->rules('required',['required'=>'请选择团队']);;
|
|
|
+ })->rules('required',['required'=>'请选择是否包含团队']);
|
|
|
+ $form->checkbox('label','服务类型')
|
|
|
+ ->options([
|
|
|
+ 1 => '图文',
|
|
|
+ 2 => '电话',
|
|
|
+ 3 => '门诊',
|
|
|
+ 4 => '计免',
|
|
|
+ 5 => '儿保'
|
|
|
+ ])->when('has',1,function (Form $form){
|
|
|
+ $form->number('chat_num', __('图文次数'))->default(0);
|
|
|
+ })->when('has',2,function (Form $form){
|
|
|
+ $form->number('phone_minutes', __('电话次数'))->default(0);
|
|
|
+ })->when('has',3,function (Form $form){
|
|
|
+ $form->number('appoint_num', __('门诊次数'))->default(0);
|
|
|
+ })->when('has',4,function (Form $form){
|
|
|
+ $form->number('vaccine_limit_amount', __('儿保金额'))->default(0);
|
|
|
+ })->when('has',5,function (Form $form){
|
|
|
+ //暂未完成,这里展示所有的自费的儿保项目
|
|
|
+ $form->number('nurses_limit_amount', __('计免金额'))->default(0);
|
|
|
+// $form->select('product', __('儿保项目'))->options(Nurse::where('type',2)->pluck('name','id'));
|
|
|
+ })->rules('required',['required'=>'请选择服务类型']);
|
|
|
$form->text('effective_days', __('服务时长(天)'))->default(0);
|
|
|
$form->saving(function (Form $form){
|
|
|
$form->price = $form->price*100;
|