feat: 完善分销提现审核与转账流程,增强帖子详情交互
这个提交包含在:
@@ -153,7 +153,7 @@ class Post extends Backend
|
||||
$mediaList[] = $row->cover;
|
||||
}
|
||||
|
||||
// 获取用户画像
|
||||
// 获取用户画像与关联商家门店资料
|
||||
$userInfo = [
|
||||
'id' => $row->user_id,
|
||||
'nickname' => $row->user_name ?: '未知用户',
|
||||
@@ -169,6 +169,11 @@ class Post extends Backend
|
||||
$userInfo['post_count'] = Db::name('fc_post')->where('user_id', $user['id'])->count();
|
||||
}
|
||||
|
||||
$merchantInfo = null;
|
||||
if (!empty($row->user_id)) {
|
||||
$merchantInfo = Db::name('fc_merchant')->where('user_id', $row->user_id)->find();
|
||||
}
|
||||
|
||||
// 支持请求 JSON 详情
|
||||
if ($this->request->param('format') === 'json') {
|
||||
$data = [
|
||||
@@ -196,7 +201,8 @@ class Post extends Backend
|
||||
'likes' => $row->likes,
|
||||
'createtime_text' => date('Y-m-d H:i:s', $row->createtime),
|
||||
'media_list' => $mediaList,
|
||||
'user' => $userInfo
|
||||
'user' => $userInfo,
|
||||
'merchant' => $merchantInfo
|
||||
];
|
||||
$this->success('获取成功', null, $data);
|
||||
}
|
||||
@@ -207,6 +213,7 @@ class Post extends Backend
|
||||
$this->view->assign('mode', $mode);
|
||||
$this->view->assign('row', $row);
|
||||
$this->view->assign('userInfo', $userInfo);
|
||||
$this->view->assign('merchantInfo', $merchantInfo);
|
||||
$this->view->assign('mediaList', $mediaList);
|
||||
$this->view->assign('queue', $this->auditQueue($row->getData()));
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
|
||||
/**
|
||||
* 同城-提现
|
||||
* 同城-提现管理与审核控制器
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
@@ -19,6 +19,11 @@ class Withdraw extends Backend
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
/**
|
||||
* 初始化控制器
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
@@ -26,16 +31,115 @@ class Withdraw extends Backend
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
* 提现审核详情与核验
|
||||
*
|
||||
* @param mixed $ids 提现记录ID
|
||||
* @return string
|
||||
*/
|
||||
public function edit($ids = null)
|
||||
{
|
||||
$row = $this->model->get($ids);
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
|
||||
$this->error(__('You have no permission'));
|
||||
}
|
||||
|
||||
if ($this->request->isPost()) {
|
||||
$params = $this->request->post('row/a');
|
||||
if ($params) {
|
||||
$params = $this->preExcludeFields($params);
|
||||
// 资金安全:严禁在编辑中篡改提现单号、金额、用户ID、渠道与微信单号
|
||||
unset($params['withdraw_no'], $params['amount'], $params['user_id'], $params['channel'], $params['out_bill_no'], $params['transfer_id']);
|
||||
|
||||
$result = false;
|
||||
Db::startTrans();
|
||||
try {
|
||||
// 只允许修改备注、处理时间等辅助信息
|
||||
$result = $row->allowField(['reason', 'paytime', 'updatetime'])->save($params);
|
||||
Db::commit();
|
||||
} catch (\Throwable $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if ($result !== false) {
|
||||
$this->success();
|
||||
} else {
|
||||
$this->error(__('No rows were updated'));
|
||||
}
|
||||
}
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
|
||||
$userId = (int)$row['user_id'];
|
||||
|
||||
// 1. 获取申请用户信息
|
||||
$user = Db::name('user')
|
||||
->where('id', $userId)
|
||||
->field('id,username,nickname,mobile,avatar,money,score,createtime')
|
||||
->find();
|
||||
|
||||
// 2. 获取用户同城扩展信息(微信OpenID、实名认证等)
|
||||
$userExt = Db::name('fc_user_ext')
|
||||
->where('user_id', $userId)
|
||||
->field('openid,realname,realname_status,is_member,member_level')
|
||||
->find();
|
||||
|
||||
// 3. 计算用户分销佣金与提现对账数据
|
||||
$totalCommission = (float)Db::name('fc_commission')
|
||||
->where('user_id', $userId)
|
||||
->where('status', '<>', 2)
|
||||
->sum('amount');
|
||||
|
||||
$settledCommission = (float)Db::name('fc_commission')
|
||||
->where('user_id', $userId)
|
||||
->where('status', 1)
|
||||
->sum('amount');
|
||||
|
||||
$totalWithdrawn = (float)Db::name('fc_withdraw')
|
||||
->where('user_id', $userId)
|
||||
->where('status', 'paid')
|
||||
->sum('amount');
|
||||
|
||||
$appliedTotal = (float)Db::name('fc_withdraw')
|
||||
->where('user_id', $userId)
|
||||
->where('status', 'in', ['auditing', 'paying', 'paid'])
|
||||
->sum('amount');
|
||||
|
||||
// 当前剩余可提现金额
|
||||
$withdrawable = max(0, $settledCommission - $appliedTotal);
|
||||
|
||||
// 4. 预设快捷驳回原因模板
|
||||
$rejectReasons = [
|
||||
'微信未实名或实名与提现账户不一致',
|
||||
'提现用户未绑定微信或OpenID失效',
|
||||
'关联分销订单存在售后退款,佣金核验中',
|
||||
'账号涉嫌虚假刷单/违规套现,暂缓打款',
|
||||
'用户联系客服主动申请撤回提现',
|
||||
'微信商家转账账户余额不足,请稍后重试',
|
||||
];
|
||||
|
||||
$this->view->assign([
|
||||
'row' => $row,
|
||||
'userInfo' => $user ?: [],
|
||||
'userExt' => $userExt ?: [],
|
||||
'totalCommission' => round($totalCommission, 2),
|
||||
'settledCommission' => round($settledCommission, 2),
|
||||
'totalWithdrawn' => round($totalWithdrawn, 2),
|
||||
'withdrawable' => round($withdrawable, 2),
|
||||
'rejectReasons' => $rejectReasons,
|
||||
]);
|
||||
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现打款/驳回
|
||||
* 提现打款/驳回操作处理
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function pay()
|
||||
{
|
||||
@@ -134,6 +238,63 @@ class Withdraw extends Backend
|
||||
$this->success($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步微信商家转账状态(主动查询)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function sync()
|
||||
{
|
||||
$ids = $this->request->post('ids');
|
||||
$ids = is_array($ids) ? $ids : explode(',', (string)$ids);
|
||||
$ids = array_filter($ids);
|
||||
if (!$ids) {
|
||||
$this->error('请选择要同步的提现记录');
|
||||
}
|
||||
|
||||
$withdraws = Db::name('fc_withdraw')
|
||||
->where('id', 'in', $ids)
|
||||
->where('status', 'paying')
|
||||
->select();
|
||||
|
||||
if (!$withdraws) {
|
||||
$this->error('选中的记录中没有处于「转账中」的提现单');
|
||||
}
|
||||
|
||||
$successCount = 0;
|
||||
$failedCount = 0;
|
||||
$payingCount = 0;
|
||||
$errors = [];
|
||||
|
||||
foreach ($withdraws as $withdraw) {
|
||||
try {
|
||||
$state = \app\common\library\WxTransfer::sync((int)$withdraw['id']);
|
||||
if ($state === 'paid') {
|
||||
$successCount++;
|
||||
} elseif ($state === 'failed') {
|
||||
$failedCount++;
|
||||
} else {
|
||||
$payingCount++;
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
$errors[] = $withdraw['withdraw_no'] . ':' . $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
$msg = '状态同步完成:';
|
||||
if ($successCount > 0) {
|
||||
$msg .= $successCount . ' 笔已确认到账;';
|
||||
}
|
||||
if ($payingCount > 0) {
|
||||
$msg .= $payingCount . ' 笔仍待用户确认或处理中;';
|
||||
}
|
||||
if ($failedCount > 0) {
|
||||
$msg .= $failedCount . ' 笔转账失败;';
|
||||
}
|
||||
if ($errors) {
|
||||
$msg .= ' 异常:' . implode(';', $errors);
|
||||
}
|
||||
|
||||
$this->success($msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 商家门店资料(仅商家发布或有关联门店时展示) -->
|
||||
{if !empty($merchantInfo)}
|
||||
<div class="panel panel-default" style="border: 1px solid #BBF7D0; background: #F0FDF4; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 15px;">
|
||||
<div class="panel-body" style="padding: 14px 16px;">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px;">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<span class="label label-warning" style="font-size: 11px; padding: 3px 8px;"><i class="fa fa-briefcase"></i> 认证商家门店</span>
|
||||
<strong style="font-size: 15px; color: #166534;">{$merchantInfo.name|htmlentities}</strong>
|
||||
{if $merchantInfo.audit_status == 1}
|
||||
<span class="badge" style="background: #15803D; font-size: 10px;">资质已核验</span>
|
||||
{/if}
|
||||
</div>
|
||||
{if !empty($merchantInfo.category)}
|
||||
<span style="font-size: 12px; color: #166534; background: #DCFCE7; padding: 2px 8px; border-radius: 4px;">经营类目:{$merchantInfo.category|htmlentities}</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="row" style="font-size: 12px; color: #166534; line-height: 1.8;">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<i class="fa fa-map-marker text-success"></i> 门店地址:<strong>{$merchantInfo.address|default='未填写实体地址'|htmlentities}</strong>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<i class="fa fa-phone text-success"></i> 门店联系人:{$merchantInfo.contact|default='-'|htmlentities}
|
||||
</div>
|
||||
{if !empty($merchantInfo.notice)}
|
||||
<div class="col-xs-12" style="margin-top: 4px;">
|
||||
<i class="fa fa-bullhorn text-warning"></i> 门店公告:<span style="color: #14532D;">{$merchantInfo.notice|htmlentities}</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- 送审核心内容核验卡 -->
|
||||
<div class="panel panel-default" style="border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 15px;">
|
||||
<div class="panel-body" style="padding: 20px;">
|
||||
|
||||
@@ -102,6 +102,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 商家门店资料(仅商家发布或有关联门店时展示) -->
|
||||
{if !empty($merchantInfo)}
|
||||
<div class="panel panel-default" style="border: 1px solid #BBF7D0; background: #F0FDF4; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 15px;">
|
||||
<div class="panel-body" style="padding: 14px 16px;">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px;">
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<span class="label label-warning" style="font-size: 11px; padding: 3px 8px;"><i class="fa fa-briefcase"></i> 认证商家门店</span>
|
||||
<strong style="font-size: 15px; color: #166534;">{$merchantInfo.name|htmlentities}</strong>
|
||||
{if $merchantInfo.audit_status == 1}
|
||||
<span class="badge" style="background: #15803D; font-size: 10px;">资质已核验</span>
|
||||
{/if}
|
||||
</div>
|
||||
{if !empty($merchantInfo.category)}
|
||||
<span style="font-size: 12px; color: #166534; background: #DCFCE7; padding: 2px 8px; border-radius: 4px;">经营类目:{$merchantInfo.category|htmlentities}</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="row" style="font-size: 12px; color: #166534; line-height: 1.8;">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<i class="fa fa-map-marker text-success"></i> 门店地址:<strong>{$merchantInfo.address|default='未填写实体地址'|htmlentities}</strong>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<i class="fa fa-phone text-success"></i> 门店联系人:{$merchantInfo.contact|default='-'|htmlentities}
|
||||
</div>
|
||||
{if !empty($merchantInfo.notice)}
|
||||
<div class="col-xs-12" style="margin-top: 4px;">
|
||||
<i class="fa fa-bullhorn text-warning"></i> 门店公告:<span style="color: #14532D;">{$merchantInfo.notice|htmlentities}</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<!-- 业务核心卡片 -->
|
||||
<div class="panel panel-default" style="border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 15px;">
|
||||
<div class="panel-body" style="padding: 20px;">
|
||||
|
||||
@@ -1,26 +1,95 @@
|
||||
<form id="edit-form" class="form-horizontal fc-modal-form" role="form" data-toggle="validator" method="POST" action="">
|
||||
<div class="fc-modal-form" style="padding-bottom:70px;">
|
||||
|
||||
<!-- 提现申请核心凭据 -->
|
||||
<!-- 1. 核心账单凭据详情 -->
|
||||
<div class="fc-form-section">
|
||||
<div class="fc-form-section__header">
|
||||
<span class="fc-form-section__badge">1</span>
|
||||
<span class="fc-form-section__title">提现账单详情</span>
|
||||
<div class="fc-form-section__header" style="justify-content:space-between;">
|
||||
<div style="display:flex;align-items:center;">
|
||||
<span class="fc-form-section__badge" style="background:#04874A;">1</span>
|
||||
<span class="fc-form-section__title">提现核心账单凭据</span>
|
||||
</div>
|
||||
<div>
|
||||
{switch name="row.status"}
|
||||
{case value="auditing"}<span class="label label-warning" style="font-size:12px;padding:4px 8px;"><i class="fa fa-clock-o"></i> 待审核</span>{/case}
|
||||
{case value="paying"}<span class="label label-info" style="font-size:12px;padding:4px 8px;"><i class="fa fa-spinner fa-spin"></i> 微信转账中</span>{/case}
|
||||
{case value="paid"}<span class="label label-success" style="font-size:12px;padding:4px 8px;background:#04874A;"><i class="fa fa-check"></i> 已成功到账</span>{/case}
|
||||
{case value="failed"}<span class="label label-danger" style="font-size:12px;padding:4px 8px;"><i class="fa fa-exclamation-triangle"></i> 转账失败</span>{/case}
|
||||
{case value="rejected"}<span class="label label-default" style="font-size:12px;padding:4px 8px;"><i class="fa fa-ban"></i> 已拒绝</span>{/case}
|
||||
{/switch}
|
||||
</div>
|
||||
</div>
|
||||
<div class="fc-form-section__body">
|
||||
<!-- 核心金额突出展示 -->
|
||||
<div style="background:#F2FEF7;border:1px solid #C8F2DD;border-radius:6px;padding:14px 18px;margin-bottom:16px;display:flex;align-items:center;justify-content:space-between;">
|
||||
<div>
|
||||
<div style="font-size:12px;color:#04874A;font-weight:600;margin-bottom:4px;">申请提现金额</div>
|
||||
<div style="font-size:28px;font-weight:700;color:#F5A623;line-height:1.2;">
|
||||
<span style="font-size:18px;">¥</span> {$row.amount|htmlentities}
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align:right;">
|
||||
<div style="font-size:12px;color:#64748B;">提现渠道</div>
|
||||
<div style="font-size:14px;font-weight:600;color:#04301E;margin-top:2px;">
|
||||
<i class="fa fa-wechat" style="color:#09BB07;"></i> 微信零钱 / 商家转账
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">提现单号:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-withdraw_no" class="form-control" name="row[withdraw_no]" type="text" value="{$row.withdraw_no|htmlentities}" readonly>
|
||||
<div class="form-group" style="margin-bottom:8px;">
|
||||
<label class="control-label col-xs-4" style="color:#64748B;">提现单号:</label>
|
||||
<div class="col-xs-8" style="padding-top:7px;">
|
||||
<span class="font-bold text-navy" style="font-family:monospace;font-size:13px;">{$row.withdraw_no|htmlentities}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">申请用户:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-user_id" data-rule="required" min="0" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
|
||||
<div class="form-group" style="margin-bottom:8px;">
|
||||
<label class="control-label col-xs-4" style="color:#64748B;">申请时间:</label>
|
||||
<div class="col-xs-8" style="padding-top:7px;">
|
||||
<span>{if $row.createtime}{:date('Y-m-d H:i:s', $row.createtime)}{else/}-{/if}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if condition="!empty($row.paytime)"}
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group" style="margin-bottom:8px;">
|
||||
<label class="control-label col-xs-4" style="color:#64748B;">打款到账时间:</label>
|
||||
<div class="col-xs-8" style="padding-top:7px;">
|
||||
<span class="text-success font-bold">{:date('Y-m-d H:i:s', $row.paytime)}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 2. 申请人与资金对账核验详情 -->
|
||||
<div class="fc-form-section">
|
||||
<div class="fc-form-section__header">
|
||||
<span class="fc-form-section__badge" style="background:#04874A;">2</span>
|
||||
<span class="fc-form-section__title">申请人与资金风控核验</span>
|
||||
</div>
|
||||
<div class="fc-form-section__body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group" style="margin-bottom:8px;">
|
||||
<label class="control-label col-xs-4" style="color:#64748B;">用户昵称:</label>
|
||||
<div class="col-xs-8" style="padding-top:7px;">
|
||||
<span class="text-primary font-bold">{$userInfo.nickname|default='-'}</span>
|
||||
<span class="text-muted" style="font-size:12px;">(ID: {$row.user_id})</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group" style="margin-bottom:8px;">
|
||||
<label class="control-label col-xs-4" style="color:#64748B;">绑定手机号:</label>
|
||||
<div class="col-xs-8" style="padding-top:7px;">
|
||||
<span>{$userInfo.mobile|default='未绑定手机'}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,73 +97,127 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">申请提现金额:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">¥</span>
|
||||
<input id="c-amount" data-rule="required" class="form-control font-bold" step="0.01" name="row[amount]" type="number" value="{$row.amount|htmlentities}" style="color:#EA580C;font-size:15px;">
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom:8px;">
|
||||
<label class="control-label col-xs-4" style="color:#64748B;">微信OpenID:</label>
|
||||
<div class="col-xs-8" style="padding-top:7px;">
|
||||
{if condition="!empty($userExt.openid) && strpos($userExt.openid, 'h5_') !== 0"}
|
||||
<span class="label label-success" title="{$userExt.openid}"><i class="fa fa-check-circle"></i> 已绑定微信小程序</span>
|
||||
{else/}
|
||||
<span class="label label-danger"><i class="fa fa-warning"></i> 未获取有效微信OpenID(打款将失败)</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">提现渠道:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<select id="c-channel" class="form-control" name="row[channel]">
|
||||
<option value="wechat" {eq name="$row.channel" value="wechat"}selected{/eq}>微信零钱 / 商户转账</option>
|
||||
<option value="bank" {eq name="$row.channel" value="bank"}selected{/eq}>银行卡转账</option>
|
||||
<option value="alipay" {eq name="$row.channel" value="alipay"}selected{/eq}>支付宝转账</option>
|
||||
<option value="balance" {eq name="$row.channel" value="balance"}selected{/eq}>站内账户余额</option>
|
||||
</select>
|
||||
<div class="form-group" style="margin-bottom:8px;">
|
||||
<label class="control-label col-xs-4" style="color:#64748B;">实名姓名:</label>
|
||||
<div class="col-xs-8" style="padding-top:7px;">
|
||||
{if condition="!empty($userExt.realname)"}
|
||||
<span class="font-bold text-success"><i class="fa fa-shield"></i> {$userExt.realname}</span>
|
||||
{else/}
|
||||
<span class="text-muted">未实名</span>
|
||||
{if condition="$row.amount >= 2000"}
|
||||
<span class="text-danger font-bold" style="font-size:12px;">(微信限制:≥2000元必须实名)</span>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 审核与打款处理 -->
|
||||
<div class="fc-form-section">
|
||||
<div class="fc-form-section__header">
|
||||
<span class="fc-form-section__badge">2</span>
|
||||
<span class="fc-form-section__title">审核状态与打款记录</span>
|
||||
</div>
|
||||
<div class="fc-form-section__body">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">审核状态:</label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<div class="radio-group" style="padding-top:7px;">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<label class="radio-inline"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
<!-- 分销资产与可提现对账微卡片 -->
|
||||
<div style="background:#F8FAFC;border:1px solid #E2E8F0;border-radius:6px;padding:12px 14px;margin-top:8px;">
|
||||
<div style="font-size:12px;font-weight:700;color:#334155;margin-bottom:8px;display:flex;justify-content:space-between;align-items:center;">
|
||||
<span><i class="fa fa-database text-info"></i> 用户分销账户对账核算</span>
|
||||
{if condition="$row.amount > $withdrawable && $row.status eq 'auditing'"}
|
||||
<span class="text-danger font-bold" style="font-size:11px;"><i class="fa fa-warning"></i> 提示:申请金额超出当前可提余额</span>
|
||||
{else/}
|
||||
<span class="text-success" style="font-size:11px;"><i class="fa fa-check"></i> 佣金账户对账正常</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="row text-center" style="margin-left:0;margin-right:0;">
|
||||
<div class="col-xs-3" style="padding:4px;border-right:1px solid #E2E8F0;">
|
||||
<div style="font-size:11px;color:#64748B;">累计分销佣金</div>
|
||||
<div style="font-size:14px;font-weight:700;color:#0F172A;margin-top:2px;">¥{$totalCommission}</div>
|
||||
</div>
|
||||
<div class="col-xs-3" style="padding:4px;border-right:1px solid #E2E8F0;">
|
||||
<div style="font-size:11px;color:#64748B;">已结算佣金</div>
|
||||
<div style="font-size:14px;font-weight:700;color:#0F172A;margin-top:2px;">¥{$settledCommission}</div>
|
||||
</div>
|
||||
<div class="col-xs-3" style="padding:4px;border-right:1px solid #E2E8F0;">
|
||||
<div style="font-size:11px;color:#64748B;">历史已提现总额</div>
|
||||
<div style="font-size:14px;font-weight:700;color:#0F172A;margin-top:2px;">¥{$totalWithdrawn}</div>
|
||||
</div>
|
||||
<div class="col-xs-3" style="padding:4px;">
|
||||
<div style="font-size:11px;color:#64748B;">当前可提余额</div>
|
||||
<div style="font-size:14px;font-weight:700;color:#04874A;margin-top:2px;">¥{$withdrawable}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">审核/驳回备注:</label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<input id="c-reason" class="form-control" name="row[reason]" type="text" value="{$row.reason|htmlentities}" placeholder="若驳回提现,请注明原因(如账户信息不符等)">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">实际打款到账时间:</label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<input id="c-paytime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" name="row[paytime]" type="text" value="{if $row.paytime}{:date('Y-m-d H:i:s', $row.paytime)}{/if}" placeholder="打款完成时间">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 弹窗底部操作按钮 -->
|
||||
<div class="form-group layer-footer fc-modal-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">保存</button>
|
||||
<button type="reset" class="btn btn-default btn-embossed">重置</button>
|
||||
<!-- 3. 转账凭证与处理记录详情 -->
|
||||
{if condition="!empty($row.out_bill_no) || !empty($row.transfer_id) || !empty($row.reason) || !empty($row.fail_reason)"}
|
||||
<div class="fc-form-section">
|
||||
<div class="fc-form-section__header">
|
||||
<span class="fc-form-section__badge" style="background:#04874A;">3</span>
|
||||
<span class="fc-form-section__title">转账单据与处理记录</span>
|
||||
</div>
|
||||
<div class="fc-form-section__body">
|
||||
{if condition="!empty($row.out_bill_no) || !empty($row.transfer_id)"}
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group" style="margin-bottom:8px;">
|
||||
<label class="control-label col-xs-4" style="color:#64748B;">微信商户单号:</label>
|
||||
<div class="col-xs-8" style="padding-top:7px;">
|
||||
<span style="font-family:monospace;font-size:12px;">{$row.out_bill_no|htmlentities}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group" style="margin-bottom:8px;">
|
||||
<label class="control-label col-xs-4" style="color:#64748B;">微信转账单号:</label>
|
||||
<div class="col-xs-8" style="padding-top:7px;">
|
||||
<span style="font-family:monospace;font-size:12px;">{$row.transfer_id|htmlentities}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if condition="!empty($row.fail_reason)"}
|
||||
<div class="alert alert-danger" style="margin-top:6px;margin-bottom:8px;padding:10px 14px;">
|
||||
<i class="fa fa-exclamation-triangle"></i> <strong>打款失败说明:</strong>{$row.fail_reason|htmlentities}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if condition="!empty($row.reason)"}
|
||||
<div class="alert alert-warning" style="margin-top:6px;margin-bottom:8px;padding:10px 14px;">
|
||||
<i class="fa fa-info-circle"></i> <strong>拒绝/驳回原因:</strong>{$row.reason|htmlentities}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
<!-- 4. 底部审核决策操作栏(吸底) -->
|
||||
<div class="fc-modal-footer" style="position:fixed;bottom:0;left:0;right:0;background:#FFFFFF;border-top:1px solid #E2E8F0;padding:12px 20px;z-index:99;display:flex;justify-content:flex-end;align-items:center;gap:12px;">
|
||||
{if condition="$row.status eq 'auditing'"}
|
||||
<button type="button" class="btn btn-success btn-action-approve" data-id="{$row.id}" data-amount="{$row.amount}" data-user="{$userInfo.nickname|default='用户#' . $row.user_id}" style="background:#00E070;border-color:#00E070;color:#04301E;font-weight:700;padding:6px 18px;">
|
||||
<i class="fa fa-check"></i> 审核通过并打款
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger btn-action-reject" data-id="{$row.id}" style="padding:6px 18px;">
|
||||
<i class="fa fa-times"></i> 拒绝申请
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
{if condition="$row.status eq 'paying'"}
|
||||
<button type="button" class="btn btn-info btn-action-sync" data-id="{$row.id}" style="padding:6px 16px;">
|
||||
<i class="fa fa-refresh"></i> 查询微信转账最新状态
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<button type="button" class="btn btn-default" onclick="parent.Layer.close(parent.Layer.getFrameIndex(window.name));" style="padding:6px 16px;">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}">刷新</a>
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}"><i class="fa fa-refresh"></i> {:__('Refresh')}</a>
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
data-operate-edit="{:$auth->check('fc/withdraw/edit')}"
|
||||
data-operate-del="{:$auth->check('fc/withdraw/del')}"
|
||||
data-operate-edit="false"
|
||||
data-operate-del="false"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
|
||||
在新工单中引用
屏蔽一个用户