diff --git a/app/Admin/Controllers/WithdrawalController.php b/app/Admin/Controllers/WithdrawalController.php index 2bf5810..32b8b36 100755 --- a/app/Admin/Controllers/WithdrawalController.php +++ b/app/Admin/Controllers/WithdrawalController.php @@ -2,6 +2,8 @@ namespace App\Admin\Controllers; +use App\Admin\Lazys\AlipayLazys; +use App\Admin\Lazys\BankLazys; use App\Admin\Repositories\Withdrawal; use App\Traits\WithdrawalTraits; use Dcat\Admin\Admin; @@ -26,6 +28,20 @@ class WithdrawalController extends AdminController $grid->column('price','提现金额'); $grid->column('user.name','用户名称'); $grid->column('pay_type','提现方式')->using(WithdrawalTraits::$userTypeText); + $grid->column('detail','提现信息') + ->display('查看') + ->if(fn() => $this->pay_type == WithdrawalTraits::$userType[0]) + ->then(function ($column) { + $column->modal('',function () { + return AlipayLazys::make(); + }); + }) + ->if(fn() => $this->pay_type == WithdrawalTraits::$userType[1]) + ->then(function ($column) { + $column->modal('',function () { + return BankLazys::make(); + }); + }); $grid->column('status','状态') ->if(fn() => $this->status == WithdrawalTraits::$state[0]) ->display('') diff --git a/app/Admin/Lazys/AlipayLazys.php b/app/Admin/Lazys/AlipayLazys.php new file mode 100644 index 0000000..fc65865 --- /dev/null +++ b/app/Admin/Lazys/AlipayLazys.php @@ -0,0 +1,30 @@ +model()->where('withdrawal_id',$this->key); + $grid->column('id'); + $grid->column('account','账户'); + $grid->column('name','账户名称'); + $grid->column('qrcode','收款码')->image(); + $grid->disableActions(); + $grid->disableRowSelector(); + $grid->disablePagination(); + }); + } +} diff --git a/app/Admin/Lazys/BankLazys.php b/app/Admin/Lazys/BankLazys.php new file mode 100644 index 0000000..1fa829c --- /dev/null +++ b/app/Admin/Lazys/BankLazys.php @@ -0,0 +1,32 @@ +model()->where('withdrawal_id',$this->key); + $grid->column('id'); + $grid->column('name','银行名称'); + $grid->column('branch','支行'); + $grid->column('card_number','卡号'); + $grid->column('account_name','开户人'); + $grid->disableActions(); + $grid->disableRowSelector(); + $grid->disablePagination(); + }); + } +} diff --git a/app/Admin/Repositories/WithdrawalAlipay.php b/app/Admin/Repositories/WithdrawalAlipay.php new file mode 100755 index 0000000..1bfa962 --- /dev/null +++ b/app/Admin/Repositories/WithdrawalAlipay.php @@ -0,0 +1,16 @@ +