|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace App\Admin\Controllers\OrdersManagement;
|
|
namespace App\Admin\Controllers\OrdersManagement;
|
|
|
|
|
|
|
|
+use App\Admin\Actions\backstage\Orders\Evaluate;
|
|
use App\Admin\Actions\backstage\Orders\OrderDetails;
|
|
use App\Admin\Actions\backstage\Orders\OrderDetails;
|
|
use App\Admin\Actions\backstage\User\MapDepot;
|
|
use App\Admin\Actions\backstage\User\MapDepot;
|
|
use App\Admin\Actions\backstage\User\Suggests;
|
|
use App\Admin\Actions\backstage\User\Suggests;
|
|
@@ -68,25 +69,38 @@ class ConsultingOrdersController extends AdminController
|
|
$actions->disableDelete();
|
|
$actions->disableDelete();
|
|
// 去掉编辑
|
|
// 去掉编辑
|
|
$actions->disableEdit();
|
|
$actions->disableEdit();
|
|
- // 去掉查看
|
|
|
|
- $actions->disableView();
|
|
|
|
- $actions->add(new OrderDetails());
|
|
|
|
$actions->add(new MapDepot());
|
|
$actions->add(new MapDepot());
|
|
|
|
+ $actions->add(new Evaluate());
|
|
$actions->add(new Suggests());
|
|
$actions->add(new Suggests());
|
|
|
|
|
|
});
|
|
});
|
|
$grid->column('id', __('Id'))->sortable();
|
|
$grid->column('id', __('Id'))->sortable();
|
|
- $grid->column('user_id', __('用户id'));
|
|
|
|
$grid->column('user.nickname', __('用户姓名'));
|
|
$grid->column('user.nickname', __('用户姓名'));
|
|
- $grid->column('docter_id', __('医生id'));
|
|
|
|
$grid->column('docter.name', __('医生姓名'));
|
|
$grid->column('docter.name', __('医生姓名'));
|
|
- $grid->column('patient_id', __('患者id'));
|
|
|
|
$grid->column('orderPatient.name', __('患者姓名'));
|
|
$grid->column('orderPatient.name', __('患者姓名'));
|
|
$grid->column('orderPatient.symptoms', __('患者描述'));
|
|
$grid->column('orderPatient.symptoms', __('患者描述'));
|
|
$grid->column('product_type', __('产品类型'))->using([1=>'电话咨询',2=>'图文咨询']);
|
|
$grid->column('product_type', __('产品类型'))->using([1=>'电话咨询',2=>'图文咨询']);
|
|
$grid->column('payment_type', __('支付方式'))->using([1=>'微信支付',2=>'余额支付']);
|
|
$grid->column('payment_type', __('支付方式'))->using([1=>'微信支付',2=>'余额支付']);
|
|
$grid->column('order_status', __('订单状态'))->using([1=>'未支付',2=>'待接单',3=>'进行中',4=>'已完成',5=>'已取消']);
|
|
$grid->column('order_status', __('订单状态'))->using([1=>'未支付',2=>'待接单',3=>'进行中',4=>'已完成',5=>'已取消']);
|
|
$grid->column('payment_status', __('支付状态'))->using([1=>'待付款',2=>'已付款',3=>'退款中',4=>'已退款']);
|
|
$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;
|
|
return $grid;
|
|
}
|
|
}
|
|
@@ -100,25 +114,62 @@ class ConsultingOrdersController extends AdminController
|
|
protected function detail($id)
|
|
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([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;
|
|
return $show;
|
|
}
|
|
}
|