| xqd
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace App\Admin\Controllers\UserManagement\BmUser;
|
|
|
|
|
|
+use App\Admin\Actions\backstage\Orders\ServicePack;
|
|
|
use App\Models\Order;
|
|
|
use Encore\Admin\Controllers\AdminController;
|
|
|
use Encore\Admin\Form;
|
| xqd
@@ -43,22 +44,20 @@ class UserOrdersController extends AdminController
|
|
|
return date('Y-m-d H:i:s',$time);
|
|
|
});
|
|
|
$grid->column('product_type', __('产品类型'))->using([1=>'电话咨询',2=>'图文咨询',3=>'门诊预约',4=>'疫苗接种预约',5=>'儿保预约',6=>'服务包',7=>'充值']);
|
|
|
- $grid->column('payment_type', __('支付方式'))->using([1=>'微信支付',2=>'余额支付',3=>'服务包支付']);
|
|
|
-// $grid->column('payment_type', __('支付方式'))->display(function ($payment_type){
|
|
|
-// if ($payment_type == 1)
|
|
|
-// {
|
|
|
-// return '微信支付';
|
|
|
-// }
|
|
|
-// if ($payment_type == 2){
|
|
|
-// return '余额支付';
|
|
|
-// }
|
|
|
-// if ($payment_type == 3){
|
|
|
-////// dd($this);
|
|
|
-//// $patient_id = $this->patient_id;
|
|
|
-//// $orde_id = Order::where('patient_id',$patient_id)->where('product_type',6)->get('id');
|
|
|
-// return '服务包支付';
|
|
|
-// }
|
|
|
-// });
|
|
|
+ $grid->column('payment_type', __('支付方式'))->display(function ($payment_type){
|
|
|
+ if ($payment_type == 1)
|
|
|
+ {
|
|
|
+ return '微信支付';
|
|
|
+ }
|
|
|
+ if ($payment_type == 2){
|
|
|
+ return '余额支付';
|
|
|
+ }
|
|
|
+ if ($payment_type == 3){
|
|
|
+ $name = ServicePack::where('id',$this->pay_order_pack_id)->pluck('name');
|
|
|
+ return '服务包支付('.$name[0].')';
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+ });
|
|
|
$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){
|