diff --git a/application/admin/controller/user/withdrawal/UserwithdrawalLog.php b/application/admin/controller/user/withdrawal/UserwithdrawalLog.php
index 6dd5f66..07dce48 100644
--- a/application/admin/controller/user/withdrawal/UserwithdrawalLog.php
+++ b/application/admin/controller/user/withdrawal/UserwithdrawalLog.php
@@ -133,8 +133,12 @@ class UserwithdrawalLog extends Backend
$remark = $params["remark"];
+ $real_have_price = $params["real_have_price"];
+ if($real_have_price <= 0) $this->error("请输入正确的打款金额");
+
+
$model = (new \app\common\model\user\withdrawal\UserwithdrawalLog);
- $model->paidAlready($ids,$remark,true);
+ $model->paidAlready($ids,$real_have_price,$remark,true);
}catch (\Throwable $e){
$this->error($e->getMessage());
diff --git a/application/admin/lang/zh-cn/user/withdrawal/userwithdrawal_log.php b/application/admin/lang/zh-cn/user/withdrawal/userwithdrawal_log.php
index 4c359d8..8808c11 100644
--- a/application/admin/lang/zh-cn/user/withdrawal/userwithdrawal_log.php
+++ b/application/admin/lang/zh-cn/user/withdrawal/userwithdrawal_log.php
@@ -2,8 +2,12 @@
return [
'Price' => '提现金额',
- 'Fee_price' => '手续费',
- 'Real_price' => '实际应打款额',
+ 'Fee_price' => '平台手续费',
+ 'Real_price' => '预计应打款额(扣除手续费)',
+
+ 'Real_have_price' => '最终打款额',
+ 'Real_fee_price' => '最终扣除手续费(包含各行转账手续费)',
+
'Status' => '提现申请状态',
'Status 1' => '待审核',
'Set status to 1' => '设为待审核',
diff --git a/application/admin/view/user/withdrawal/userwithdrawal_log/paid.html b/application/admin/view/user/withdrawal/userwithdrawal_log/paid.html
index c76711c..681ac36 100644
--- a/application/admin/view/user/withdrawal/userwithdrawal_log/paid.html
+++ b/application/admin/view/user/withdrawal/userwithdrawal_log/paid.html
@@ -71,6 +71,16 @@
+
+
+
+
diff --git a/application/common/model/user/withdrawal/UserwithdrawalLog.php b/application/common/model/user/withdrawal/UserwithdrawalLog.php
index 3edca47..2744071 100644
--- a/application/common/model/user/withdrawal/UserwithdrawalLog.php
+++ b/application/common/model/user/withdrawal/UserwithdrawalLog.php
@@ -343,7 +343,7 @@ class UserwithdrawalLog extends BaseModel
* @return true
* @throws \Exception
*/
- public function paidAlready($id,$remark="",$trans=false){
+ public function paidAlready($id,$real_have_price,$remark="",$trans=false){
//找到需要审核的提现记录
$userwithdrawalLog = self::where('id',$id)
@@ -353,6 +353,12 @@ class UserwithdrawalLog extends BaseModel
if(!$userwithdrawalLog) throw new \Exception("提现记录不存在");
if($userwithdrawalLog['status']!='2') throw new \Exception("审核通过的订单才能标记打款");
if(!$remark) throw new \Exception("打款备注不能为空");
+ if($real_have_price <= 0) throw new \Exception("请输入正确的打款金额");
+ if($real_have_price > $userwithdrawalLog['price']) throw new \Exception("打款金额不能大于提现金额");
+
+ //提现金额 - 实际到账金额 = 实际的手续费
+ $real_fee_price = bcsub($userwithdrawalLog['price'],$real_have_price,2);
+
//判断逻辑
if($trans){
self::beginTrans();
@@ -362,6 +368,10 @@ class UserwithdrawalLog extends BaseModel
//更新状态
$userwithdrawalLog["withdrawal_status"] = '3';
$userwithdrawalLog["paytime"] = time();
+ $userwithdrawalLog["real_fee_price"] = $real_fee_price;
+ $userwithdrawalLog["real_have_price"] = $real_have_price;
+
+
$userwithdrawalLog["remark"] = $remark;
$userwithdrawalLog->save();
//调用事件
diff --git a/public/assets/js/backend/user/withdrawal/userwithdrawal_log.js b/public/assets/js/backend/user/withdrawal/userwithdrawal_log.js
index 3fb7952..ff3f570 100644
--- a/public/assets/js/backend/user/withdrawal/userwithdrawal_log.js
+++ b/public/assets/js/backend/user/withdrawal/userwithdrawal_log.js
@@ -36,6 +36,11 @@ define(['jquery', 'bootstrap', 'backend', 'csmtable', 'form'], function ($, unde
{field: 'price', title: __('Price'), operate:'BETWEEN'},
{field: 'fee_price', title: __('Fee_price'), operate:'BETWEEN'},
{field: 'real_price', title: __('Real_price'), operate:'BETWEEN'},
+ {field: 'real_have_price', title: __('Real_have_price'), operate:'BETWEEN'},
+ {field: 'real_fee_price', title: __('Real_fee_price'), operate:'BETWEEN'},
+
+
+
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3')}, formatter: Table.api.formatter.status},
{field: 'withdrawal_status', title: __('Withdrawal_status'), searchList: {"1":__('Withdrawal_status 1'),"2":__('Withdrawal_status 2'),"3":__('Withdrawal_status 3')}, formatter: Table.api.formatter.status},