| xqd
@@ -2,9 +2,9 @@
|
|
|
|
|
|
namespace App\Community\Controllers;
|
|
|
|
|
|
-use App\Community\Actions\Nurse\Finished;
|
|
|
-use App\Community\Actions\Nurse\OrderCance;
|
|
|
-use App\Community\Actions\Nurse\Reserved;
|
|
|
+use App\Community\Actions\Clinc\Finished;
|
|
|
+use App\Community\Actions\Clinc\OrderCancel;
|
|
|
+use App\Community\Actions\Clinc\Reserved;
|
|
|
use App\Models\Docter;
|
|
|
use App\Models\Order;
|
|
|
use Encore\Admin\Controllers\AdminController;
|
| xqd
@@ -46,10 +46,10 @@ class OrderController extends AdminController
|
|
|
}
|
|
|
$grid->column('id', __('Id'));
|
|
|
$grid->column('orderUser.nickname', __('预约用户'));
|
|
|
- $grid->column('orderPatient.appoint_start_time', __('预约时间'))->display(function ($w){
|
|
|
+ $grid->column('orderPatient.appoint_start_time', __('预约开始时间'))->display(function ($w){
|
|
|
return date('Y-m-d H:i:s',$w);
|
|
|
});
|
|
|
- $grid->column('orderPatient.appoint_end_time', __('门诊时间'))->display(function ($w){
|
|
|
+ $grid->column('orderPatient.appoint_end_time', __('预约结束时间'))->display(function ($w){
|
|
|
if(empty($w)) return '';
|
|
|
return date('Y-m-d H:i:s',$w);
|
|
|
});
|
| xqd
@@ -57,7 +57,7 @@ class OrderController extends AdminController
|
|
|
|
|
|
$grid->column('orderPatient.name', __('预约患者'))->display(function ($w){
|
|
|
return $w==1?'男':'女';
|
|
|
- });;
|
|
|
+ });
|
|
|
$grid->column('orderPatient.sex', __('患者性别'));
|
|
|
$grid->column('orderPatient.birthday', __('患者年龄'))->display(function ($w){
|
|
|
return birthday_to_age($w);
|
| xqd
@@ -77,10 +77,11 @@ class OrderController extends AdminController
|
|
|
$actions->add(new Reserved());
|
|
|
}
|
|
|
if(!empty($actions->row->order_status) && $actions->row->order_status<= 3){
|
|
|
- $actions->add(new OrderCance());
|
|
|
+ $actions->add(new OrderCancel());
|
|
|
$actions->add(new Finished());
|
|
|
}
|
|
|
- $actions->disableView();
|
|
|
+// $actions->disableView();
|
|
|
+ $actions->disableEdit();
|
|
|
$actions->disableDelete();
|
|
|
});
|
|
|
$grid->filter(function (Grid\Filter $filter) {
|
| xqd
@@ -105,21 +106,23 @@ class OrderController extends AdminController
|
|
|
$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('orderUser.nickname', __('预约用户'));
|
|
|
+ $show->field('orderPatient.sex', __('患者性别'))->as(function ($w){
|
|
|
+ return $w==1?'男':'女';
|
|
|
+ });
|
|
|
+ $show->field('orderPatient.appoint_start_time', __('开始时间'));
|
|
|
+ $show->field('orderPatient.appoint_end_time', __('结束时间'));
|
|
|
+ $show->field('orderPatient.birthday', __('患者年龄'));
|
|
|
+ $show->field('docter.name', __('预约医生'));
|
|
|
+ $show->field('order_status', __('订单状态'))->using(Order::getStatus());
|
|
|
+ $show->field('payment_status', __('支付状态'))->using([1=>'待付款',2=>'已付款',3=>'退款中',4=>'已退款']);
|
|
|
+ $show->panel()->tools(function ($tools) {
|
|
|
+ $tools->disableEdit();
|
|
|
+ $tools->disableDelete();
|
|
|
+ });
|
|
|
+
|
|
|
+ $show->field('created_at', __('创建时间'));
|
|
|
+ $show->field('updated_at', __('更新时间'));
|
|
|
|
|
|
return $show;
|
|
|
}
|