Bladeren bron

图文资讯订单

wanghaijun 4 jaren geleden
bovenliggende
commit
f524e23710

+ 2 - 0
app/Community/Controllers/DocterChatController.php

xqd xqd
@@ -36,6 +36,7 @@ class DocterChatController extends AdminController
         $user = Admin::user();
         $org_id = $user->org_id;
         $docter_id = $user->docter_id;
+
         $grid->model()->orderByDesc('id');
 
         $is_admin = Admin::user()->inRoles(['administrator','devloper']);
@@ -48,6 +49,7 @@ class DocterChatController extends AdminController
                 $where['docter_id'] = $docter_id;
             }
         }
+
         $grid->model()->where($where);
 
         $grid->column('order_sn', __('订单号'));

+ 1 - 1
app/Http/Controllers/ScheDuleController.php

xqd
@@ -207,7 +207,7 @@ class ScheDuleController  extends Controller
 
         }
 
-        $list = Order::where(['organization_id'=>$org_id,'docter_id'=>$docter_id,'order_status'=>3])->with('orderUser')->distinct('user_id')->get('user_id');
+        $list = Order::where(['docter_id'=>$docter_id,'order_status'=>3])->with('orderUser')->distinct('user_id')->get('user_id');
         $user_list = [];
         foreach ($list as $val){
             $user_list[] = [

+ 5 - 2
resources/views/cdms/order_detail.blade.php

xqd xqd xqd
@@ -53,9 +53,11 @@
             <span>订单状态:  {{$status[$data->order_status]}}@if($data->order_status == 2)  <a class = "a_btn add m-l-30" href="javascript:void(0)">接单</a> @endif </span>
             <span>病情描述:  {{$data->orderPatient->symptoms}}</span>
             <span>图片: </span>
+            @if(!empty($data->orderPatient) && !empty($ddata->orderPatient->medical_imgs ))
             @foreach($data->orderPatient->medical_imgs as $img)
                 <img class="imgs" src="{{$img}}" alt="">
             @endforeach
+            @endif
         @else
             <span>患者:</span>
             <span>年龄:</span>
@@ -73,13 +75,14 @@
     $('.complet').click(function () {
         $.post('/cdms/api/update_order',{'id':id,'status':4},function (res) {
             console.log(res)
+            console.log(typeof(res.code))
             if(res.code == 200){
                 alert('操作成功')
                 location.reload();
             } else{
                 alert('操作失敗')
             }
-        });
+        },'json');
     })
     $('.add').click(function () {
         $.post('/cdms/api/update_order',{'id':id,'status':3},function (res) {
@@ -89,6 +92,6 @@
             } else{
                 alert('接单失敗')
             }
-        });
+        },'json');
     })
 </script>