Swdz-WangHaiJun 4 роки тому
батько
коміт
01483597d3

+ 1 - 1
app/Admin/Actions/Service/ApplysAction.php

xqd
@@ -18,7 +18,7 @@ class ApplysAction extends RowAction
         Serviceapplys::where('id',$model->id)->update(['status'=>2]);
         $filter = [1=>'is_chat',2=>'is_phone',3=>'is_appoint'];
 
-        Docter::where('id',$model->docter_id)->upd3ate([$filter[$model->service_type]=>1]);
+        Docter::where('id',$model->docter_id)->update([$filter[$model->service_type]=>1]);
 
         return $this->response()->success('审核通过')->refresh();
     }

+ 9 - 7
app/Community/Controllers/DocterChatController.php

xqd xqd
@@ -41,13 +41,14 @@ class DocterChatController extends AdminController
             $batch->add(new sendNotice());
         });
         if(!$is_admin){
-            $grid->model()->whereHas('orders',function ($query) use ($org_id,$docter_id) {
-                $where['organization_id']=$org_id;
-                if($docter_id){
-                    $where['docter_id'] = $docter_id;
-                }
-                $query->where($where);
-            });
+            $where['organization_id']=$org_id;
+            if($docter_id){
+                $where['docter_id'] = $docter_id;
+            }
+            $grid->model()->where($where);
+//            $grid->model()->whereHas('orders',function ($query) use ($org_id,$docter_id) {
+//                $query->where($where);
+//            });
         }
 
         $grid->column('order_sn', __('订单号'));
@@ -103,6 +104,7 @@ class DocterChatController extends AdminController
         $org_id = $user->org_id;
         $docter_id = $user->docter_id;
         $url = '/cdms/chat_view?docter_id='.$docter_id;
+//        $content->body('<iframe src="/cdms/chat_view?docter_id='.$docter_id.'" style="width: 100%;height:800px;border: none"></iframe>');
         $content->body('<iframe src="/cdms/chat_view?docter_id='.$docter_id.'" style="width: 100%;height:800px;border: none"></iframe>');
         return $content;
     }

+ 21 - 9
resources/views/cdms/order_detail.blade.php

xqd
@@ -32,18 +32,30 @@
 <div class="contet">
     <div class="center">
         <h2 style="display: inline-block">订单详情</h2>
-        <a class = "a_btn m-l-30" href="/cdms/chats">会话</a>
-        <a class = "a_btn m-l-30" href="javascript:void(0)">完成</a>
+        @if($data->orderPatient)
+            <a class = "a_btn m-l-30" href="/cdms/chats">会话</a>
+            <a class = "a_btn m-l-30" href="javascript:void(0)">完成</a>
+        @endif
     </div>
     <div class="center">
         <span>订单号:{{$data->order_sn}}</span>
-        <span>患者:{{$data->orderPatient->name}}</span>
-        <span>年龄:{{birthday_to_age($data->orderPatient->birthday)}}</span>
-        <span>身份证号:{{$data->orderPatient->card_number}}</span>
-        <span>下单时间:{{$data->orderPatient->created_at}}</span>
-        <span>订单状态:{{$status[$data->order_status]}}接单</span>
-        <span>病情描述:{{$data->orderPatient->symptoms}}</span>
-        <span>图片:{{$data->orderPatient->medical_imgs}}</span>
+        @if(!empty($data->orderPatient))
+            <span>患者:{{$data->orderPatient->name}}</span>
+            <span>年龄:{{birthday_to_age($data->orderPatient->birthday)}}</span>
+            <span>身份证号:{{$data->orderPatient->card_number}}</span>
+            <span>下单时间:{{$data->orderPatient->created_at}}</span>
+            <span>订单状态:{{$status[$data->order_status]}}接单</span>
+            <span>病情描述:{{$data->orderPatient->symptoms}}</span>
+            <span>图片:{{$data->orderPatient->medical_imgs}}</span>
+        @else
+            <span>患者:</span>
+            <span>年龄:</span>
+            <span>身份证号:</span>
+            <span>下单时间:</span>
+            <span>订单状态:</span>
+            <span>病情描述:</span>
+            <span>图片:</span>
+        @endif
     </div>
 </div>