| xqd
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace App\Admin\Controllers;
|
|
|
|
|
|
+use App\Admin\Actions\backstage\Docters\SignUp;
|
|
|
use App\Models\Docter;
|
|
|
use App\Models\DocterOrganization;
|
|
|
use App\Models\Organization;
|
| xqd
@@ -29,26 +30,36 @@ class DoctorManagementController extends AdminController
|
|
|
{
|
|
|
$grid = new Grid(new Docter());
|
|
|
|
|
|
+ $grid->filter(function ($filter){
|
|
|
+ $filter->disableIdFilter();
|
|
|
+ $filter->like('name','昵称');
|
|
|
+ $filter->equal('status','工作状态')->select([
|
|
|
+ 0 => '禁用',
|
|
|
+ 1 => '启用',
|
|
|
+ ]);
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ $grid->actions(function ($actions) {
|
|
|
+ // 去掉编辑
|
|
|
+ $actions->disableEdit();
|
|
|
+ // 去掉查看
|
|
|
+ $actions->disableView();
|
|
|
+ $actions->add(new SignUp());
|
|
|
+ });
|
|
|
+
|
|
|
$grid->column('id', __('Id'))->sortable();
|
|
|
$grid->column('name', __('姓名'));
|
|
|
$grid->column('avatar', __('头像'))->image('',50,50);
|
|
|
$grid->column('score', __('评分'));
|
|
|
$grid->column('service_persons', __('服务人数'));
|
|
|
- $grid->column('DocterOrganization', __('所属机构'));
|
|
|
-// $grid->column('DocterOrganization', __('所属机构'))->pluck('organization_id')->display(function ($organization_id){
|
|
|
-// $str = '';
|
|
|
-// foreach ($organization_id as $value)
|
|
|
-// {
|
|
|
-// $name = Organization::where('id',$value)->value('name');
|
|
|
-// $str = $str.','.$name;
|
|
|
-// }
|
|
|
-// $str = ltrim($str, ",");
|
|
|
-// return $str;
|
|
|
-// });
|
|
|
- $grid->column('teamdocter.team_id', __('团队id'));
|
|
|
-
|
|
|
- $grid->column('label', __('标签'))->label(info);
|
|
|
-
|
|
|
+ $states = [
|
|
|
+ 'on' => ['value' => 1, 'text' => '启用', 'color' => 'primary'],
|
|
|
+ 'off' => ['value' => 0, 'text' => '禁用', 'color' => 'danger'],
|
|
|
+ ];
|
|
|
+ $grid->column('status', __('工作状态'))->switch($states);
|
|
|
+ $grid->column('is_then', __('认证状态'))->using([0=>'未认证',1=>'已认证']);
|
|
|
+ $grid->column('label', __('标签'))->label('info');
|
|
|
return $grid;
|
|
|
}
|
|
|
|
| xqd
@@ -111,40 +122,7 @@ class DoctorManagementController extends AdminController
|
|
|
{
|
|
|
$form = new Form(new Docter());
|
|
|
|
|
|
- $form->switch('type', __('Type'));
|
|
|
- $form->text('name', __('Name'));
|
|
|
- $form->mobile('phone', __('Phone'));
|
|
|
- $form->switch('sex', __('Sex'));
|
|
|
- $form->text('birthday', __('Birthday'));
|
|
|
- $form->image('avatar', __('Avatar'));
|
|
|
- $form->switch('status', __('Status'))->default(1);
|
|
|
- $form->text('label', __('Label'));
|
|
|
- $form->text('sign', __('Sign'));
|
|
|
- $form->text('intro', __('Intro'));
|
|
|
- $form->number('office_id', __('Office id'));
|
|
|
- $form->number('qualification_id', __('Qualification id'));
|
|
|
- $form->decimal('score', __('Score'))->default(0.0);
|
|
|
- $form->number('service_persons', __('Service persons'));
|
|
|
- $form->number('eva_num', __('Eva num'));
|
|
|
- $form->number('service_days', __('Service days'));
|
|
|
- $form->number('phone_minutes', __('Phone minutes'));
|
|
|
- $form->number('chat_price', __('Chat price'));
|
|
|
- $form->number('phone_price', __('Phone price'));
|
|
|
- $form->number('appoint_price', __('Appoint price'));
|
|
|
- $form->switch('is_chat', __('Is chat'))->default(1);
|
|
|
- $form->switch('is_phone', __('Is phone'))->default(1);
|
|
|
- $form->switch('is_appoint', __('Is appoint'))->default(1);
|
|
|
- $form->decimal('latitude', __('Latitude'))->default(0.0000000);
|
|
|
- $form->decimal('longitude', __('Longitude'))->default(0.0000000);
|
|
|
- $form->number('user_id', __('User id'));
|
|
|
- $form->password('password', __('Password'));
|
|
|
- $form->number('is_then', __('Is then'));
|
|
|
- $form->text('practice', __('Practice'));
|
|
|
- $form->text('card_photo', __('Card photo'));
|
|
|
- $form->text('is_quail', __('Is quail'));
|
|
|
- $form->text('card_id', __('Card id'));
|
|
|
- $form->number('receiving_time', __('Receiving time'));
|
|
|
-
|
|
|
+ $form->switch('status', __('状态'));
|
|
|
return $form;
|
|
|
}
|
|
|
}
|