From ce621ecae036b3535f92e3848c9a5370dc790409 Mon Sep 17 00:00:00 2001 From: lemon <15040771@qq.com> Date: Mon, 13 Sep 2021 13:25:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/WithdrawalController.php | 16 ++++++++++ app/Admin/Lazys/AlipayLazys.php | 30 +++++++++++++++++ app/Admin/Lazys/BankLazys.php | 32 +++++++++++++++++++ app/Admin/Repositories/WithdrawalAlipay.php | 16 ++++++++++ app/Admin/Repositories/WithdrawalBank.php | 16 ++++++++++ 5 files changed, 110 insertions(+) create mode 100644 app/Admin/Lazys/AlipayLazys.php create mode 100644 app/Admin/Lazys/BankLazys.php create mode 100755 app/Admin/Repositories/WithdrawalAlipay.php create mode 100755 app/Admin/Repositories/WithdrawalBank.php 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 @@ +