Prechádzať zdrojové kódy

医生管理中的认证管理

ChenWuJie 4 rokov pred
rodič
commit
09e023b72d

+ 2 - 0
app/Admin/Actions/backstage/Pass.php

xqd xqd
@@ -2,6 +2,7 @@
 
 namespace App\Admin\Actions\backstage;
 
+use App\Models\Docter;
 use App\Models\DocterOrganization;
 use Encore\Admin\Actions\RowAction;
 use Illuminate\Database\Eloquent\Model;
@@ -15,6 +16,7 @@ class Pass extends RowAction
 //         $model ...
 //        dd($model);
         DocterOrganization::where('id',$model->id)->update(['state'=>2]);
+        Docter::where('id',$model->docter_id)->update(['is_then'=>1]);
         return $this->response()->success('审核通过')->refresh();
     }
 

+ 1 - 0
app/Admin/Actions/backstage/Refuse.php

xqd
@@ -13,6 +13,7 @@ class Refuse extends RowAction
     {
         // $model ...
         DocterOrganization::where('id',$model->id)->update(['state'=>3]);
+        
         return $this->response()->success('审核拒绝')->refresh();
     }
 

+ 5 - 2
app/Admin/Controllers/ApproveController.php

xqd
@@ -33,17 +33,20 @@ class ApproveController extends AdminController
         $grid ->model()->where('state','>=','1');
         $grid->column('id', __('Id'));
         $grid->column('docter.id', __('医生ID'));
-        $grid->column('docter.name', __('名字'));
+        $grid->column('docter.name', __('医生姓名'));
+        $grid->column('docter.avatar', __('医生头像'))->image(50,50);
         $grid->column('docter.sex', __('性别'))->using([0=>'未知',1=>'男',2=>'女']);
-        $grid->column('docter.card_id', __('身份证'));
         $grid->column('organization.name', __('机构'));
         $grid->column('office.name', __('科室'));
         $grid->column('qualification.name', __('医生资质'));
         $grid->column('state', __('状态'))->using([1=>'待审核',2=>'已认证',3=>'已驳回']);
 
         $grid->actions(function ($actions) {
+            //通过申请
             $actions->add(new Pass());
+            //驳回申请
             $actions->add(new Refuse());
+            //撤销申请
             $actions->add(new Revoke());
         });
         return $grid;