Bläddra i källkod

Merge branch 'master' of ssh://git.9026.com:2212/swdz-WangHaijun/BaoMa

zilong 4 år sedan
förälder
incheckning
ced045751b

+ 19 - 0
app/Admin/Actions/backstage/Orders/Evaluate.php

xqd
@@ -0,0 +1,19 @@
+<?php
+
+namespace App\Admin\Actions\backstage\Orders;
+
+use Encore\Admin\Actions\RowAction;
+use Illuminate\Database\Eloquent\Model;
+
+class Evaluate extends RowAction
+{
+    public $name = '评价管理';
+
+    public function handle(Model $model)
+    {
+        // $model ...
+
+        return $this->response()->success('跳转评价管理成功')->redirect('/admin/orders_evaluates?order_id='.$this->row->id.'');
+    }
+
+}

+ 1 - 1
app/Admin/Actions/backstage/User/Suggests.php

xqd
@@ -12,7 +12,7 @@ class Suggests extends RowAction
     public function handle(Model $model)
     {
         // $model ...
-        return $this->response()->success('跳转病例意见单成功')->redirect('/admin/user_suggests?patient_id='.$this->row->patient_id.'');
+        return $this->response()->success('跳转病例意见单成功')->redirect('/admin/user_suggests?order_id='.$this->row->order_id.'');
     }
 
 }

+ 74 - 25
app/Admin/Controllers/OrdersManagement/BookingOrderController.php

xqd xqd xqd xqd
@@ -2,6 +2,7 @@
 
 namespace App\Admin\Controllers\OrdersManagement;
 
+use App\Admin\Actions\backstage\Orders\Evaluate;
 use App\Models\Order;
 use App\Admin\Actions\backstage\Orders\OrderDetails;
 use Encore\Admin\Controllers\AdminController;
@@ -71,19 +72,14 @@ class BookingOrderController extends AdminController
             $actions->disableDelete();
             // 去掉编辑
             $actions->disableEdit();
-            // 去掉查看
-            $actions->disableView();
-            $actions->add(new OrderDetails());
             $actions->add(new MapDepot());
+            $actions->add(new Evaluate());
             $actions->add(new Suggests());
         });
 
         $grid->column('id', __('Id'))->sortable();
-        $grid->column('user_id', __('用户id'));
         $grid->column('user.nickname', __('用户姓名'));
-        $grid->column('docter_id', __('医生id'));
         $grid->column('docter.name', __('医生姓名'));
-        $grid->column('patient_id', __('患者id'));
         $grid->column('orderPatient.name', __('患者姓名'));
         $grid->column('orderPatient.appoint_start_time', __('预约日期'))->display(function ($time){
             return date('Y-m-d H:i:s',$time);
@@ -95,7 +91,24 @@ class BookingOrderController extends AdminController
         $grid->column('payment_type', __('支付方式'))->using([1=>'微信支付',2=>'余额支付']);
         $grid->column('order_status', __('订单状态'))->using([1=>'未支付',2=>'待接单',3=>'进行中',4=>'已完成',5=>'已取消']);
         $grid->column('payment_status', __('支付状态'))->using([1=>'待付款',2=>'已付款',3=>'退款中',4=>'已退款']);
-
+        $grid->column('total_amount', __('订单总金额'))->display(function ($money){
+            return $money/100;
+        });
+        $grid->column('payment_amount', __('用户实际支付的金额'))->display(function ($money){
+            return $money/100;
+        });
+        $grid->column('discount_amount', __('折扣金额'))->display(function ($money){
+            return $money/100;
+        });
+        $grid->column('payment_time', __('支付时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
+        $grid->column('receiving_time', __('接单时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
+        $grid->column('end_time', __('订单完成时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
         return $grid;
     }
 
@@ -108,25 +121,61 @@ class BookingOrderController extends AdminController
     protected function detail($id)
     {
         $show = new Show(Order::findOrFail($id));
-
         $show->field('id', __('Id'));
-        $show->field('user_id', __('User id'));
-        $show->field('docter_id', __('Docter id'));
-        $show->field('patient_id', __('Patient id'));
-        $show->field('organization_id', __('Organization id'));
-        $show->field('order_sn', __('Order sn'));
-        $show->field('payment_type', __('Payment type'));
-        $show->field('product_type', __('Product type'));
-        $show->field('order_status', __('Order status'));
-        $show->field('payment_status', __('Payment status'));
-        $show->field('total_amount', __('Total amount'));
-        $show->field('payment_amount', __('Payment amount'));
-        $show->field('discount_amount', __('Discount amount'));
-        $show->field('payment_time', __('Payment time'));
-        $show->field('created_at', __('Created at'));
-        $show->field('updated_at', __('Updated at'));
-        $show->field('outtime', __('Outtime'));
-        $show->field('receiving_time', __('Receiving time'));
+        $show->field('user_id', __('用户id'));
+        $show->field('user.nickname', __('用户姓名'));
+        $show->field('docter_id', __('医生id'));
+        $show->field('docter.name', __('医生姓名'));
+        $show->field('patient_id', __('患者id'));
+        $show->field('orderPatient.name', __('患者姓名'));
+        $show->field('organization_id', __('机构id'));
+        $show->field('organization.name', __('机构名'));
+        $show->field('order_sn', __('订单号'));
+        $show->field('product_type', __('产品类型'))->using([3=>'门诊预约',4=>'疫苗接种预约',5=>'儿保预约']);
+        $show->field('payment_type', __('支付类型'))->using([1=>'微信支付',2=>'余额支付']);
+        $show->field('order_status', __('订单状态'))->using([1=>'未支付',2=>'待接单',3=>'进行中',4=>'已完成',5=>'已取消']);
+        $show->field('payment_status', __('支付状态'))->using([1=>'待付款',2=>'已付款',3=>'退款中',4=>'已退款']);
+        $show->field('total_amount', __('	订单总金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('payment_amount', __('用户实际支付的金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('discount_amount', __('折扣金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('payment_time', __('支付时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('receiving_time', __('接单时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('end_time', __('订单完成时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('created_at', __('创建时间'));
+        $show->field('updated_at', __('更新时间'));
 
         return $show;
     }

+ 75 - 24
app/Admin/Controllers/OrdersManagement/ConsultingOrdersController.php

xqd xqd xqd
@@ -2,6 +2,7 @@
 
 namespace App\Admin\Controllers\OrdersManagement;
 
+use App\Admin\Actions\backstage\Orders\Evaluate;
 use App\Admin\Actions\backstage\Orders\OrderDetails;
 use App\Admin\Actions\backstage\User\MapDepot;
 use App\Admin\Actions\backstage\User\Suggests;
@@ -68,25 +69,38 @@ class ConsultingOrdersController extends AdminController
             $actions->disableDelete();
             // 去掉编辑
             $actions->disableEdit();
-            // 去掉查看
-            $actions->disableView();
-            $actions->add(new OrderDetails());
             $actions->add(new MapDepot());
+            $actions->add(new Evaluate());
             $actions->add(new Suggests());
 
         });
         $grid->column('id', __('Id'))->sortable();
-        $grid->column('user_id', __('用户id'));
         $grid->column('user.nickname', __('用户姓名'));
-        $grid->column('docter_id', __('医生id'));
         $grid->column('docter.name', __('医生姓名'));
-        $grid->column('patient_id', __('患者id'));
         $grid->column('orderPatient.name', __('患者姓名'));
         $grid->column('orderPatient.symptoms', __('患者描述'));
         $grid->column('product_type', __('产品类型'))->using([1=>'电话咨询',2=>'图文咨询']);
         $grid->column('payment_type', __('支付方式'))->using([1=>'微信支付',2=>'余额支付']);
         $grid->column('order_status', __('订单状态'))->using([1=>'未支付',2=>'待接单',3=>'进行中',4=>'已完成',5=>'已取消']);
         $grid->column('payment_status', __('支付状态'))->using([1=>'待付款',2=>'已付款',3=>'退款中',4=>'已退款']);
+        $grid->column('total_amount', __('订单总金额'))->display(function ($money){
+            return $money/100;
+        });
+        $grid->column('payment_amount', __('用户实际支付的金额'))->display(function ($money){
+            return $money/100;
+        });
+        $grid->column('discount_amount', __('折扣金额'))->display(function ($money){
+            return $money/100;
+        });
+        $grid->column('payment_time', __('支付时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
+        $grid->column('receiving_time', __('接单时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
+        $grid->column('end_time', __('订单完成时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
 
         return $grid;
     }
@@ -100,25 +114,62 @@ class ConsultingOrdersController extends AdminController
     protected function detail($id)
     {
         $show = new Show(Order::findOrFail($id));
-
         $show->field('id', __('Id'));
-        $show->field('user_id', __('User id'));
-        $show->field('docter_id', __('Docter id'));
-        $show->field('patient_id', __('Patient id'));
-        $show->field('organization_id', __('Organization id'));
-        $show->field('order_sn', __('Order sn'));
-        $show->field('payment_type', __('Payment type'));
-        $show->field('product_type', __('Product type'));
-        $show->field('order_status', __('Order status'));
-        $show->field('payment_status', __('Payment status'));
-        $show->field('total_amount', __('Total amount'));
-        $show->field('payment_amount', __('Payment amount'));
-        $show->field('discount_amount', __('Discount amount'));
-        $show->field('payment_time', __('Payment time'));
-        $show->field('created_at', __('Created at'));
-        $show->field('updated_at', __('Updated at'));
-        $show->field('outtime', __('Outtime'));
-        $show->field('receiving_time', __('Receiving time'));
+        $show->field('user_id', __('用户id'));
+        $show->field('user.nickname', __('用户姓名'));
+        $show->field('docter_id', __('医生id'));
+        $show->field('docter.name', __('医生姓名'));
+        $show->field('patient_id', __('患者id'));
+        $show->field('orderPatient.name', __('患者姓名'));
+        $show->field('organization_id', __('机构id'));
+        $show->field('organization.name', __('机构名'));
+        $show->field('order_sn', __('订单号'));
+        $show->field('product_type', __('产品类型'))->using([1=>'电话咨询',2=>'图文咨询']);
+        $show->field('payment_type', __('支付类型'))->using([1=>'微信支付',2=>'余额支付']);
+        $show->field('order_status', __('订单状态'))->using([1=>'未支付',2=>'待接单',3=>'进行中',4=>'已完成',5=>'已取消']);
+        $show->field('payment_status', __('支付状态'))->using([1=>'待付款',2=>'已付款',3=>'退款中',4=>'已退款']);
+        $show->field('total_amount', __('	订单总金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('payment_amount', __('用户实际支付的金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('discount_amount', __('折扣金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('payment_time', __('支付时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('receiving_time', __('接单时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('end_time', __('订单完成时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('created_at', __('创建时间'));
+        $show->field('updated_at', __('更新时间'));
+
 
         return $show;
     }

+ 105 - 0
app/Admin/Controllers/OrdersManagement/OrdersEvaluate.php

xqd
@@ -0,0 +1,105 @@
+<?php
+
+namespace App\Admin\Controllers\OrdersManagement;
+
+use App\Models\Evaluate;
+use Encore\Admin\Controllers\AdminController;
+use Encore\Admin\Form;
+use Encore\Admin\Grid;
+use Encore\Admin\Show;
+
+class OrdersEvaluate extends AdminController
+{
+    /**
+     * Title for current resource.
+     *
+     * @var string
+     */
+    protected $title = '评价管理';
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        $grid = new Grid(new Evaluate());
+        $grid->filter(function ($filter){
+            $filter->disableIdFilter();
+            $filter->like('user.nickname','用户名字');
+            $filter->like('docter.name','医生名字');
+            $filter->like('content','评价内容');
+            $filter->equal('order_id','订单id');
+            $filter->equal('status','审核状态')->select([
+                1   => '待审核',
+                2    => '审核通过',
+                3    => '忽略',
+            ]);
+        });
+        $grid->disableActions();
+        $grid->column('id', __('Id'));
+        $grid->column('order_id', __('订单ID'));
+        $grid->column('user.nickname', __('用户姓名'));
+        $grid->column('docter.name', __('医生名称'));
+        $grid->column('content', __('评价内容'));
+        $grid->column('score', __('评分'));
+        $grid->column('status', __('状态'))->using([1=>'待审核',2=>'审核通过',3=>'忽略']);
+        $grid->column('audit_time', __('审核时间'))->display(function ($time){
+            if($time == 0)
+                return '';
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $grid->column('created_at', __('创建时间'));
+        $grid->column('updated_at', __('更新时间'));
+
+        return $grid;
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        $show = new Show(Evaluate::findOrFail($id));
+
+        $show->field('id', __('Id'));
+        $show->field('user_id', __('User id'));
+        $show->field('order_id', __('Order id'));
+        $show->field('docter_id', __('Docter id'));
+        $show->field('status', __('Status'));
+        $show->field('audit_time', __('Audit time'));
+        $show->field('content', __('Content'));
+        $show->field('score', __('Score'));
+        $show->field('created_at', __('Created at'));
+        $show->field('updated_at', __('Updated at'));
+
+        return $show;
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        $form = new Form(new Evaluate());
+
+        $form->number('user_id', __('User id'));
+        $form->number('order_id', __('Order id'));
+        $form->number('docter_id', __('Docter id'));
+        $form->switch('status', __('Status'))->default(1);
+        $form->number('audit_time', __('Audit time'));
+        $form->text('content', __('Content'));
+        $form->switch('score', __('Score'));
+
+        return $form;
+    }
+}

+ 69 - 25
app/Admin/Controllers/OrdersManagement/RechargeOrderController.php

xqd xqd xqd xqd xqd
@@ -2,6 +2,7 @@
 
 namespace App\Admin\Controllers\OrdersManagement;
 
+use App\Admin\Actions\backstage\Orders\Evaluate;
 use App\Models\Order;
 use App\Admin\Actions\backstage\Orders\OrderDetails;
 use Encore\Admin\Controllers\AdminController;
@@ -52,9 +53,7 @@ class RechargeOrderController extends AdminController
             $actions->disableDelete();
             // 去掉编辑
             $actions->disableEdit();
-            // 去掉查看
-            $actions->disableView();
-            $actions->add(new OrderDetails());
+            $actions->add(new Evaluate());
         });
 
         $grid->column('id', __('Id'))->sortable();
@@ -62,6 +61,8 @@ class RechargeOrderController extends AdminController
         $grid->column('user.nickname', __('用户姓名'));
         $grid->column('product_type', __('产品类型'))->using([7=>'充值订单']);
         $grid->column('payment_type', __('支付方式'))->using([1=>'微信支付',2=>'余额支付']);
+        $grid->column('order_status', __('订单状态'))->using([1=>'未支付',2=>'待接单',3=>'进行中',4=>'已完成',5=>'已取消']);
+        $grid->column('payment_status', __('支付状态'))->using([1=>'待付款',2=>'已付款',3=>'退款中',4=>'已退款']);
         $grid->column('total_amount', __('订单总金额'))->display(function ($money){
             return $money/100;
         });
@@ -71,9 +72,15 @@ class RechargeOrderController extends AdminController
         $grid->column('discount_amount', __('折扣金额'))->display(function ($money){
             return $money/100;
         });
-        $grid->column('order_status', __('订单状态'))->using([1=>'未支付',2=>'待接单',3=>'进行中',4=>'已完成',5=>'已取消']);
-        $grid->column('payment_status', __('支付状态'))->using([1=>'待付款',2=>'已付款',3=>'退款中',4=>'已退款']);
-
+        $grid->column('payment_time', __('支付时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
+        $grid->column('receiving_time', __('接单时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
+        $grid->column('end_time', __('订单完成时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
         return $grid;
     }
 
@@ -85,26 +92,63 @@ class RechargeOrderController extends AdminController
      */
     protected function detail($id)
     {
-        $show = new Show(Order::findOrFail($id));
-
+        $show = new Show(Order::findOrFail($id));        $show->field('id', __('Id'));
         $show->field('id', __('Id'));
-        $show->field('user_id', __('User id'));
-        $show->field('docter_id', __('Docter id'));
-        $show->field('patient_id', __('Patient id'));
-        $show->field('organization_id', __('Organization id'));
-        $show->field('order_sn', __('Order sn'));
-        $show->field('payment_type', __('Payment type'));
-        $show->field('product_type', __('Product type'));
-        $show->field('order_status', __('Order status'));
-        $show->field('payment_status', __('Payment status'));
-        $show->field('total_amount', __('Total amount'));
-        $show->field('payment_amount', __('Payment amount'));
-        $show->field('discount_amount', __('Discount amount'));
-        $show->field('payment_time', __('Payment time'));
-        $show->field('created_at', __('Created at'));
-        $show->field('updated_at', __('Updated at'));
-        $show->field('outtime', __('Outtime'));
-        $show->field('receiving_time', __('Receiving time'));
+        $show->field('user_id', __('用户id'));
+        $show->field('user.nickname', __('用户姓名'));
+        $show->field('docter_id', __('医生id'));
+        $show->field('docter.name', __('医生姓名'));
+        $show->field('patient_id', __('患者id'));
+        $show->field('orderPatient.name', __('患者姓名'));
+        $show->field('organization_id', __('机构id'));
+        $show->field('organization.name', __('机构名'));
+        $show->field('order_sn', __('订单号'));
+        $show->field('product_type', __('产品类型'))->using([7=>'充值订单']);
+        $show->field('payment_type', __('支付类型'))->using([1=>'微信支付',2=>'余额支付']);
+        $show->field('order_status', __('订单状态'))->using([1=>'未支付',2=>'待接单',3=>'进行中',4=>'已完成',5=>'已取消']);
+        $show->field('payment_status', __('支付状态'))->using([1=>'待付款',2=>'已付款',3=>'退款中',4=>'已退款']);
+        $show->field('total_amount', __('	订单总金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('payment_amount', __('用户实际支付的金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('discount_amount', __('折扣金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('payment_time', __('支付时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('receiving_time', __('接单时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('end_time', __('订单完成时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('created_at', __('创建时间'));
+        $show->field('updated_at', __('更新时间'));
+
 
         return $show;
     }

+ 74 - 24
app/Admin/Controllers/OrdersManagement/ServicePackOrderController.php

xqd xqd xqd xqd
@@ -2,6 +2,7 @@
 
 namespace App\Admin\Controllers\OrdersManagement;
 
+use App\Admin\Actions\backstage\Orders\Evaluate;
 use App\Models\Order;
 use App\Admin\Actions\backstage\Orders\OrderDetails;
 use Encore\Admin\Controllers\AdminController;
@@ -59,16 +60,12 @@ class ServicePackOrderController extends AdminController
             $actions->disableDelete();
             // 去掉编辑
             $actions->disableEdit();
-            // 去掉查看
-            $actions->disableView();
-            $actions->add(new OrderDetails());
             $actions->add(new MapDepot());
             $actions->add(new Suggests());
+            $actions->add(new Evaluate());
         });
         $grid->column('id', __('Id'))->sortable();
-        $grid->column('user_id', __('用户id'));
         $grid->column('user.nickname', __('用户姓名'));
-        $grid->column('patient_id', __('患者id'));
         $grid->column('orderPatient.name', __('患者姓名'));
         $grid->column('orderPack.service_pack_id', __('服务包id'));
         $grid->column('orderPack.pack_name', __('服务包名称'));
@@ -79,7 +76,24 @@ class ServicePackOrderController extends AdminController
         $grid->column('payment_type', __('支付方式'))->using([1=>'微信支付',2=>'余额支付']);
         $grid->column('order_status', __('订单状态'))->using([1=>'未支付',2=>'待接单',3=>'进行中',4=>'已完成',5=>'已取消']);
         $grid->column('payment_status', __('支付状态'))->using([1=>'待付款',2=>'已付款',3=>'退款中',4=>'已退款']);
-
+        $grid->column('total_amount', __('订单总金额'))->display(function ($money){
+            return $money/100;
+        });
+        $grid->column('payment_amount', __('用户实际支付的金额'))->display(function ($money){
+            return $money/100;
+        });
+        $grid->column('discount_amount', __('折扣金额'))->display(function ($money){
+            return $money/100;
+        });
+        $grid->column('payment_time', __('支付时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
+        $grid->column('receiving_time', __('接单时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
+        $grid->column('end_time', __('订单完成时间'))->display(function ($time){
+            return date('Y-m-d H:i:s',$time);
+        });
         return $grid;
     }
 
@@ -92,25 +106,61 @@ class ServicePackOrderController extends AdminController
     protected function detail($id)
     {
         $show = new Show(Order::findOrFail($id));
-
         $show->field('id', __('Id'));
-        $show->field('user_id', __('User id'));
-        $show->field('docter_id', __('Docter id'));
-        $show->field('patient_id', __('Patient id'));
-        $show->field('organization_id', __('Organization id'));
-        $show->field('order_sn', __('Order sn'));
-        $show->field('payment_type', __('Payment type'));
-        $show->field('product_type', __('Product type'));
-        $show->field('order_status', __('Order status'));
-        $show->field('payment_status', __('Payment status'));
-        $show->field('total_amount', __('Total amount'));
-        $show->field('payment_amount', __('Payment amount'));
-        $show->field('discount_amount', __('Discount amount'));
-        $show->field('payment_time', __('Payment time'));
-        $show->field('created_at', __('Created at'));
-        $show->field('updated_at', __('Updated at'));
-        $show->field('outtime', __('Outtime'));
-        $show->field('receiving_time', __('Receiving time'));
+        $show->field('user_id', __('用户id'));
+        $show->field('user.nickname', __('用户姓名'));
+        $show->field('docter_id', __('医生id'));
+        $show->field('docter.name', __('医生姓名'));
+        $show->field('patient_id', __('患者id'));
+        $show->field('orderPatient.name', __('患者姓名'));
+        $show->field('organization_id', __('机构id'));
+        $show->field('organization.name', __('机构名'));
+        $show->field('order_sn', __('订单号'));
+        $show->field('product_type', __('产品类型'))->using([6=>'服务包订单']);
+        $show->field('payment_type', __('支付类型'))->using([1=>'微信支付',2=>'余额支付']);
+        $show->field('order_status', __('订单状态'))->using([1=>'未支付',2=>'待接单',3=>'进行中',4=>'已完成',5=>'已取消']);
+        $show->field('payment_status', __('支付状态'))->using([1=>'待付款',2=>'已付款',3=>'退款中',4=>'已退款']);
+        $show->field('total_amount', __('	订单总金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('payment_amount', __('用户实际支付的金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('discount_amount', __('折扣金额'))->as(function ($money){
+            return $money/100;
+        });
+        $show->field('payment_time', __('支付时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('receiving_time', __('接单时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('end_time', __('订单完成时间'))->as(function ($time){
+            if($time == 0)
+            {
+                return '';
+            }
+            else
+            {
+                return date('Y-m-d H:i:s',$time);
+            }
+        });
+        $show->field('created_at', __('创建时间'));
+        $show->field('updated_at', __('更新时间'));
 
         return $show;
     }

+ 3 - 2
app/Admin/Controllers/OrdersManagement/UserSuggestsController.php

xqd
@@ -27,10 +27,11 @@ class UserSuggestsController extends AdminController
     {
         $grid = new Grid(new Suggest());
         $grid->disableCreateButton();
-        $uesr_id = \request('patient_id');
+        $grid->disableActions();
+        $uesr_id = \request('order_id');
         $grid->filter(function ($filter){
             $filter->disableIdFilter();
-            $filter->equal('patient_id','档案id');
+            $filter->equal('order_id','订单id');
         });
         $grid->column('id', __('Id'));
         $grid->column('order_id', __('订单id'));

+ 1 - 1
app/Admin/Controllers/UserManagement/BmUser/UserListController.php

xqd
@@ -76,7 +76,7 @@ class UserListController extends AdminController
                 return date("Y-m-d H:i",$time);
             });
 //            $grid->column('patient', __('患者姓名'))->pluck('name')->map('ucwords')->implode(',');
-            $grid->column('patient', __('患者姓名'))->pluck('name')->label('default');
+//            $grid->column('patient', __('患者姓名'))->pluck('name')->label('default');
         return $grid;
     }
 

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

xqd
@@ -46,7 +46,8 @@ class UserEvaluatesController extends AdminController
             $filter->like('user.nickname','用户名字');
             $filter->like('docter.name','医生名字');
             $filter->like('content','评价内容');
-            $filter->equal('status','审核状态')->select([
+//            $filter->equal('id','订单id');
+                $filter->equal('status','审核状态')->select([
                 1   => '待审核',
                 2    => '审核通过',
                 3    => '忽略',

+ 2 - 0
app/Admin/routes.php

xqd
@@ -116,6 +116,8 @@ Route::group([
     $router->resource('orders_details', OrdersManagement\OrdersDetailsController::class);
     //订单记录中->病例意见单
     $router->resource('user_suggests', OrdersManagement\UserSuggestsController::class);
+    //评价管理
+    $router->resource('orders_evaluates', OrdersManagement\OrdersEvaluate::class);
 
     /*
      * 优惠券管理