调整后台财务拒绝可提金额未复原问题
parent
2aa8717ba7
commit
6eab051dc2
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
namespace App\Admin\Forms;
|
||||
|
||||
use App\Models\WalletLog;
|
||||
use App\Models\WalletToBankLog;
|
||||
use App\Services\WalletService;
|
||||
use Dcat\Admin\Contracts\LazyRenderable;
|
||||
use Dcat\Admin\Traits\LazyWidget;
|
||||
use Dcat\Admin\Widgets\Form;
|
||||
|
|
@ -37,6 +39,12 @@ class WalletToBankLogVerify extends Form implements LazyRenderable
|
|||
try {
|
||||
DB::beginTransaction();
|
||||
$log->update($input);
|
||||
//如果拒绝,重新添加对应可提金额
|
||||
if ($log->status == 2) {
|
||||
$walletService = new WalletService();
|
||||
$walletService->changeBalance($log->user, $log->amount, WalletLog::ACTION_WITHDRAW_FAILED, '提现-失败', $log);
|
||||
}
|
||||
|
||||
DB::commit();
|
||||
} catch (Throwable $th) {
|
||||
DB::rollBack();
|
||||
|
|
@ -63,6 +71,9 @@ class WalletToBankLogVerify extends Form implements LazyRenderable
|
|||
$this->text('username')->value($log->username)->disable();
|
||||
$this->text('bank_description')->value($log->bank_description)->disable();
|
||||
$this->currency('amount')->symbol('¥')->value(bcdiv($log->amount, 100, 2))->disable();
|
||||
$this->rate('rate')->value($log->rate)->disable();
|
||||
$this->currency('service_amount')->symbol('¥')->value(bcdiv($log->service_amount, 100, 2))->disable();
|
||||
$this->currency('account_amount')->symbol('¥')->value(bcdiv($log->account_amount, 100, 2))->disable();
|
||||
|
||||
$this->radio('status')->options([
|
||||
1 => '成功',
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ class WalletLog extends Model
|
|||
public const ACTION_ORDER_AFTER_SALE = 3;
|
||||
public const ACTION_WITHDRAW_BANK = 4;
|
||||
public const ACTION_WITHDRAW_BALACNE = 5;
|
||||
public const ACTION_WITHDRAW_FAILED = 6;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ return [
|
|||
'bank_description' => '收款银行开户行',
|
||||
'username' => '持卡人',
|
||||
'amount' => '提现金额',
|
||||
'rate' => '费率',
|
||||
'service_amount' => '手续费',
|
||||
'account_amount' => '到账金额',
|
||||
'status' => '状态',
|
||||
|
|
|
|||
Loading…
Reference in New Issue