ChenWuJie 4 jaren geleden
bovenliggende
commit
5c1b4d51a2

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

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;
@@ -57,7 +58,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){

+ 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();

+ 2 - 3
app/Models/Doctertimes.php

xqd
@@ -10,9 +10,8 @@ namespace App\Models;
 
 class DocterTimes extends BaseModel
 {
-
-
-    public function docter(){
+  	public function docter(){
         return $this->hasOne(Docter::class,'id','docter_id');
     }
+
 }