|
@@ -25,7 +25,7 @@ class ServiceController extends AdminController
|
|
*
|
|
*
|
|
* @var string
|
|
* @var string
|
|
*/
|
|
*/
|
|
- protected $title = '服务审核';
|
|
|
|
|
|
+ protected $title = '服务开通';
|
|
|
|
|
|
/**
|
|
/**
|
|
* Make a grid builder.
|
|
* Make a grid builder.
|
|
@@ -38,31 +38,34 @@ class ServiceController extends AdminController
|
|
|
|
|
|
// $status = request('status',2);
|
|
// $status = request('status',2);
|
|
|
|
|
|
- $grid->tools(function ($tools) {
|
|
|
|
- $tools->batch(function ($batch) {
|
|
|
|
- $batch->disableDelete();
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
|
|
+// $grid->tools(function ($tools) {
|
|
|
|
+// $tools->batch(function ($batch) {
|
|
|
|
+// $batch->disableDelete();
|
|
|
|
+// });
|
|
|
|
+// });
|
|
|
|
+ $grid->disableBatchActions();
|
|
$grid->model()->where('status','!=',3)->orderBy('id','desc');
|
|
$grid->model()->where('status','!=',3)->orderBy('id','desc');
|
|
$grid->column('id', __('Id'));
|
|
$grid->column('id', __('Id'));
|
|
- $grid->column('ondocter.avatar', __('头像'))->lightbox(['width' =>'', 'height' => 30]);
|
|
|
|
|
|
+// $grid->column('ondocter.avatar', __('头像'))->lightbox(['width' =>'', 'height' => 30]);
|
|
$grid->column('ondocter.id', __('医生ID'));
|
|
$grid->column('ondocter.id', __('医生ID'));
|
|
$grid->column('ondocter.name','医生名称');
|
|
$grid->column('ondocter.name','医生名称');
|
|
- $grid->column('service_type','服务类别')->using([1=>'图文咨询',2=>'电话咨询',3=>'门诊预约'])->label('default');
|
|
|
|
|
|
+ $grid->column('ondocter.phone','医生电话');
|
|
$grid->column('ondocter.sex','性别')->using([1=>'男',2=>'女']);
|
|
$grid->column('ondocter.sex','性别')->using([1=>'男',2=>'女']);
|
|
|
|
+
|
|
|
|
+ $grid->column('service_type','服务类别')->using([1=>'图文咨询',2=>'电话咨询',3=>'门诊预约'])->label('default');
|
|
$grid->column('docterorganization', __('所属机构'))->where('state',1)->pluck('organization_id')->display(function ($organization){
|
|
$grid->column('docterorganization', __('所属机构'))->where('state',1)->pluck('organization_id')->display(function ($organization){
|
|
$value = Organization::whereIn('id',$organization->toArray())->pluck('intro')->toArray();
|
|
$value = Organization::whereIn('id',$organization->toArray())->pluck('intro')->toArray();
|
|
return $value;
|
|
return $value;
|
|
})->label('info')->width(300);
|
|
})->label('info')->width(300);
|
|
- $grid->column('ondocter.label', __('标签'))->display(function ($label){
|
|
|
|
- if($label==null || $label == '无')
|
|
|
|
- {
|
|
|
|
- return '无';
|
|
|
|
- }else{
|
|
|
|
- $label_value = DocterLabel::whereIn('id',$label)->pluck('label_name')->toArray();
|
|
|
|
- return $label_value;
|
|
|
|
- }
|
|
|
|
- })->label(['info']);
|
|
|
|
|
|
+// $grid->column('ondocter.label', __('标签'))->display(function ($label){
|
|
|
|
+// if($label==null || $label == '无')
|
|
|
|
+// {
|
|
|
|
+// return '无';
|
|
|
|
+// }else{
|
|
|
|
+// $label_value = DocterLabel::whereIn('id',$label)->pluck('label_name')->toArray();
|
|
|
|
+// return $label_value;
|
|
|
|
+// }
|
|
|
|
+// })->label(['info']);
|
|
|
|
|
|
|
|
|
|
$grid->column('status', __('状态'))->using([1=>'待审核',2=>'已开通',3=>'未开通'])->label([
|
|
$grid->column('status', __('状态'))->using([1=>'待审核',2=>'已开通',3=>'未开通'])->label([
|
|
@@ -78,6 +81,8 @@ class ServiceController extends AdminController
|
|
$filter->equal('service_type','服务类别')->select([1 => '图文咨询', 2 => '电话咨询', 3 => '门诊预约']);
|
|
$filter->equal('service_type','服务类别')->select([1 => '图文咨询', 2 => '电话咨询', 3 => '门诊预约']);
|
|
$filter->equal('status','状态')->select([1=>'待审核',2 =>'已开通 ']);
|
|
$filter->equal('status','状态')->select([1=>'待审核',2 =>'已开通 ']);
|
|
$filter->equal('docterorganization.organization_id','所属机构')->select(Organization::pluck('intro','id'));
|
|
$filter->equal('docterorganization.organization_id','所属机构')->select(Organization::pluck('intro','id'));
|
|
|
|
+ $filter->like('ondocter.name','医生名称');
|
|
|
|
+ $filter->equal('ondocter.phone','医生电话');
|
|
});
|
|
});
|
|
$grid->actions(function ($actions) {
|
|
$grid->actions(function ($actions) {
|
|
$actions->disableEdit();
|
|
$actions->disableEdit();
|