Browse Source

code mgere

Mike 4 years ago
parent
commit
3d70861ed1

+ 1 - 1
app/Admin/Controllers/ServicePacksManagment/ServicePacksController.php

xqd
@@ -45,7 +45,7 @@ class ServicePacksController extends AdminController
                 }
                 return $label;
                     }
-            return 0;
+            return '无';
         })->label('info');
         $grid->column('price', __('价格'));
         $grid->column('team_id', __('团队名称'))->display(function (){

+ 22 - 3
app/Admin/Controllers/UserManagement/BmUser/UserServiceController.php

xqd xqd xqd
@@ -6,6 +6,7 @@ use App\Models\Order;
 use App\Models\OrderPack;
 use App\Models\Patient;
 use App\Admin\Actions\backstage\User\Insurance ;
+use App\Models\Team;
 use Encore\Admin\Controllers\AdminController;
 use Encore\Admin\Form;
 use Encore\Admin\Grid;
@@ -42,8 +43,6 @@ class UserServiceController extends AdminController
 
             // 去掉编辑
             $actions->disableEdit();
-            //保险单链接
-            $actions->add(new Insurance());
         });
         $grid->model()->orderBy('id','desc');
         $grid->column('orderPack.id', __('Id'));
@@ -57,7 +56,27 @@ class UserServiceController extends AdminController
         $grid->column('orderPack.pack_price', __('服务包价格'))->display(function ($price){
             return $price/100;
         });
-        $grid->column('orderPack.team_id', __('医生团队ID'));
+        $grid->column('orderPack.team_id', __('医生团队'))->display(function ($team)
+        {
+            $team = json_decode($team);
+            if (empty($team))
+            {
+                return '无';
+            }else
+            {
+                $team1 =[];
+//                if (is_array($team))
+//                {
+//                    foreach ($team as $value)
+//                    {
+//                        $value = (int)$value;
+//                        array_push($team1,$value);
+//                    }
+                    $res = Team::whereIn('id',$team)->pluck('name')->toArray();
+                    return $res;
+//                }
+            }
+        })->label('info');
 
         $grid->column('orderPack.effective_days', __('有效天数'));
         $grid->column('orderPack.start_time', __('开始时间'))->display(function ($start_time){

+ 15 - 0
app/Admin/Controllers/UserManagement/DocterManagement/ApproveController.php

xqd
@@ -46,6 +46,21 @@ class ApproveController extends AdminController
         $grid->column('office.name', __('科室'));
         $grid->column('qualification.name', __('医生资质'));
         $grid->column('remarks', __('备注'));
+        $grid->column('docter.practice','医生照片和执业证书')->display(function ($img) {
+            $arr = explode(',',$img);
+            return $arr;
+        })->lightbox(['width' =>'', 'height' => 30]);
+
+        $grid->column('docter.card_photo','	身份证正反面')->display(function ($img) {
+            $arr = explode(',',$img);
+            return $arr;
+        })->lightbox(['width' =>'', 'height' => 30]);
+
+        $grid->column('docter.is_quail','照片和资格证书')->display(function ($img) {
+            $arr = explode(',',$img);
+            return $arr;
+        })->lightbox(['width' =>'', 'height' => 30]);
+
         $grid->column('state', __('认证状态'))->using([1=>'已认证',2=>'审核驳回',3=>'待审核'])->label('info');
         $grid->column('authentication_time', __('签约时间'))->display(function ($time){
             if ($time == 0){

+ 2 - 1
app/Admin/Controllers/UserManagement/DocterManagement/DoctorManagementController.php

xqd
@@ -113,11 +113,12 @@ class DoctorManagementController extends AdminController
             return $type_arr;
         })->label('info');
         $grid->column('label', __('标签'))->display(function ($label){
+//            dd($label);
             if($label==null)
             {
                 return '无';
             }
-            if($label = '无'){
+            if($label == '无'){
                 return '无';
             }
             $label_value = DocterLabel::whereIn('id',$label)->where('status',1)->pluck('label_name')->toArray();

+ 1 - 15
app/Admin/Controllers/VaccinesManagement/VaccinesController.php

xqd
@@ -74,21 +74,7 @@ class VaccinesController extends AdminController
             });
             $filter->column(1/2, function ($filter) {
                $filter->equal('name','疫苗名称');
-//               $filter->in('organizations','机构名称')->select(Organization::all()->pluck('name','id'));
-                $filter->where(function ($query) {
-                    $query->join('organization_vaccines', 'organization_vaccines.vaccine_id', '=', 'vaccines.id')
-                        ->where('organization_vaccines.org_id',$this->input);
-                },'机构名称')->select(Organization::all()->pluck('name','id'));
-
-//                $filter->where(function ($model){
-//                    $model->whereHas('organizationvaccines',function ($model) {
-//                    $model->join('vaccines', 'organization_vaccines.vaccine_id', '=', 'vaccines.id')
-//                        ->where('vaccines.id',$this->input)
-//                        ->get();
-//                    });
-//
-//                },'机构名称1')->select(Organization::all()->pluck('name','id'));
-
+                $filter->equal('organizationvaccines.org_id','机构')->select(Organization::pluck('name','id'));
             });
         });
         //按关键字查询

+ 17 - 0
app/Models/Doctertimes.php

xqd
@@ -0,0 +1,17 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: zilongs
+ * Date: 20-9-29
+ * Time: 上午11:12
+ */
+
+namespace App\Models;
+
+class DocterTimes extends BaseModel
+{
+  	public function docter(){
+        return $this->hasOne(Docter::class,'id','docter_id');
+    }
+
+}