update(admin): 优化财务菜单结构与功能体验
- 调整财务相关菜单名称、排序与权限逻辑 - 新增充值订单与退款记录的页签切换功能 - 修改结算时间、状态等术语表述,优化理解性 - 隐藏非核心列表字段,简化页面展示 - 完善钱包流水统计说明,明确数据口径 - 新增企业资质审核相关关联入口 - 修复充值退款菜单重复显示问题 - 新增相关测试用例保障功能稳定性
这个提交包含在:
@@ -55,7 +55,8 @@ class PayOrder extends Backend
|
||||
'total_paid_amount' => (float)$base()->whereIn('status', ['paid', 'refunded', 'refunding', 'refund_failed'])->sum('amount'),
|
||||
'total_refund_amount' => (float)$base()->sum('refund_amount'),
|
||||
'refunding_count' => $base()->where(function ($q) { $q->where('status', 'refunding')->whereOr('refund_status', 'processing'); })->count(),
|
||||
'abnormal_count' => $base()->where(function ($q) { $q->whereIn('status', ['pay_failed', 'refund_failed'])->whereOr('refund_status', 'abnormal'); })->count(),
|
||||
'abnormal_count' => $base()->where(function ($q) { $q->where('status', 'refund_failed')->whereOr('refund_status', 'abnormal'); })->count(),
|
||||
'pay_failed_count' => $base()->where('status', 'pay_failed')->count(),
|
||||
];
|
||||
$this->view->assign('stats', $stats);
|
||||
return $this->view->fetch('index');
|
||||
|
||||
@@ -13,10 +13,18 @@ class RechargeRefund extends Backend
|
||||
$query = Db::name('recharge_refund')->alias('r')
|
||||
->join('pay_order p', 'p.id=r.pay_order_id', 'LEFT')
|
||||
->join('user u', 'u.id=r.user_id', 'LEFT')
|
||||
->field('r.*,p.out_trade_no,u.mobile,u.nickname');
|
||||
->join('admin operator', 'operator.id=r.operator_id', 'LEFT')
|
||||
->join('admin reviewer', 'reviewer.id=r.reviewer_id', 'LEFT')
|
||||
->field('r.*,p.out_trade_no,u.mobile,u.nickname,operator.nickname AS operator_name,reviewer.nickname AS reviewer_name');
|
||||
if ($status !== '') $query->where('r.status', $status);
|
||||
$list = $query->order('r.id desc')->paginate(20, false, ['query'=>$this->request->get()]);
|
||||
$this->view->assign('list', $list);
|
||||
$this->view->assign('selectedStatus', $status);
|
||||
$this->view->assign('statusLabels', [
|
||||
'pending' => '待提交', 'submitting' => '提交中', 'processing' => '退款处理中',
|
||||
'unknown' => '结果待核查', 'abnormal' => '异常待处理', 'success' => '退款成功',
|
||||
'closed' => '微信关闭', 'rejected' => '已取消',
|
||||
]);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ return [
|
||||
'Commission' => '平台抽佣金额(元)',
|
||||
'Settle_amount' => '师傅应结所得(元)',
|
||||
'Status' => '结算流转状态',
|
||||
'Settle_time' => '实际打款时间',
|
||||
'Settle_time' => '结算时间',
|
||||
'Wait' => '待财务结算',
|
||||
'Settled' => '已划扣结算',
|
||||
'Settled' => '已入师傅钱包',
|
||||
'Offline' => '线下特殊结算',
|
||||
];
|
||||
|
||||
@@ -476,6 +476,13 @@ class Auth extends \fast\Auth
|
||||
unset($ruleList[$k]);
|
||||
continue;
|
||||
}
|
||||
// 合并充值入口;仅有退款权限的角色仍保留原菜单入口。
|
||||
if ($v['name'] === 'recharge_refund'
|
||||
&& in_array('pay_order/recharges', $userRule)
|
||||
&& $this->check('pay_order/recharges')) {
|
||||
unset($ruleList[$k]);
|
||||
continue;
|
||||
}
|
||||
$v['icon'] = $v['icon'] . ' fa-fw';
|
||||
$v['url'] = isset($v['url']) && $v['url'] ? $v['url'] : '/' . $module . '/' . $v['name'];
|
||||
$v['badge'] = $badgeList[$v['name']] ?? '';
|
||||
|
||||
@@ -448,7 +448,7 @@
|
||||
</a>
|
||||
|
||||
<!-- 商家待审 -->
|
||||
<a href="{:url('merchant/certificates')}" class="action-card addtabsit" title="企业资质认证">
|
||||
<a href="{:url('merchant/certificates')}" class="action-card addtabsit" title="企业资质审核">
|
||||
<div class="action-info">
|
||||
<div class="action-icon" style="background: #f0fdf4; color: #16a34a;">
|
||||
<i class="fa fa-building-o"></i>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="panel panel-default panel-intro">
|
||||
<div class="panel-heading"><strong>企业资质认证</strong><p class="text-muted">个人用户和商家用户均可提交企业资质认证;认证不会改变用户类型。</p></div>
|
||||
<div class="panel-heading"><strong>企业资质审核</strong><p class="text-muted">个人用户和商家用户均可提交企业资质认证;认证不会改变用户类型。</p></div>
|
||||
<div class="panel-body">
|
||||
<form id="cert-audit-token">{:token()}</form>
|
||||
<div id="certs-toolbar" class="toolbar"><a href="javascript:;" class="btn btn-primary" id="certs-refresh" title="刷新"><i class="fa fa-refresh"></i></a></div>
|
||||
|
||||
@@ -126,6 +126,12 @@
|
||||
|
||||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
{if $rechargeOnly}
|
||||
<ul class="nav nav-tabs" style="padding:0 15px;">
|
||||
<li class="active"><a href="{:url('pay_order/recharges')}">充值订单</a></li>
|
||||
{if $auth->check('recharge_refund/index')}<li><a href="{:url('recharge_refund/index')}">充值退款记录</a></li>{/if}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
@@ -135,9 +141,9 @@
|
||||
<div class="po-stats-panel">
|
||||
<div class="po-stat-card card-primary">
|
||||
<div class="po-stat-info">
|
||||
<div class="stat-label">微信支付流水总量</div>
|
||||
<div class="stat-label">{if $rechargeOnly}充值订单总数{else /}支付订单总数{/if}</div>
|
||||
<div class="stat-num">{$stats.total_count|default=0} <span style="font-size:13px;font-weight:normal;color:#64748b;">笔</span></div>
|
||||
<div class="stat-sub">微信支付全部交易记录</div>
|
||||
<div class="stat-sub">含待支付、已关闭等全部状态</div>
|
||||
</div>
|
||||
<div class="po-stat-icon">
|
||||
<i class="fa fa-list-alt"></i>
|
||||
@@ -145,9 +151,9 @@
|
||||
</div>
|
||||
<div class="po-stat-card card-success">
|
||||
<div class="po-stat-info">
|
||||
<div class="stat-label">实收交易累计金额</div>
|
||||
<div class="stat-label">{if $rechargeOnly}充值支付累计金额{else /}支付累计金额{/if}</div>
|
||||
<div class="stat-num" style="color:#16a34a;">¥{$stats.total_paid_amount|number_format=2}</div>
|
||||
<div class="stat-sub">包含订单支付与预充值</div>
|
||||
<div class="stat-sub">已支付订单原额,未扣除退款</div>
|
||||
</div>
|
||||
<div class="po-stat-icon">
|
||||
<i class="fa fa-cny"></i>
|
||||
@@ -172,7 +178,7 @@
|
||||
/ <span style="color:#dc2626;font-size:18px;">{$stats.abnormal_count}</span> <span style="font-size:12px;font-weight:normal;color:#dc2626;">异常</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="stat-sub">需关注或重新同步微信</div>
|
||||
<div class="stat-sub">退款异常 {$stats.abnormal_count} 笔;支付失败 {$stats.pay_failed_count} 笔</div>
|
||||
</div>
|
||||
<div class="po-stat-icon">
|
||||
<i class="fa {if !empty($stats.abnormal_count) && $stats.abnormal_count > 0}fa-exclamation-triangle{else /}fa-hourglass-half{/if}"></i>
|
||||
@@ -187,7 +193,7 @@
|
||||
</div>
|
||||
<div class="po-guide-body">
|
||||
<strong>操作指引:</strong>
|
||||
{if $rechargeOnly}可对已支付的充值订单发起原路退款,确认后占用余额并向微信提交退款。{else /}展示全站微信支付与原路退款记录。充值退款请使用充值订单中的专用入口。{/if}
|
||||
{if $rechargeOnly}可对已支付的充值订单发起原路退款,确认后占用余额并向微信提交退款。统计为全部历史充值记录。{else /}展示全站支付订单及其退款状态,统计为全部历史记录。充值退款请使用充值订单中的专用入口。{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,15 +1,43 @@
|
||||
<div class="panel panel-default panel-intro">
|
||||
<div class="panel-heading"><h4>充值退款记录</h4><p>退款处理中、状态未知及异常时,余额保持占用;请核实微信状态。</p></div>
|
||||
<div class="panel-heading">
|
||||
<h4>充值管理</h4>
|
||||
<p class="text-muted">查看充值退款进度。处理中、结果待核查及异常时,余额保持占用;请核实微信状态。</p>
|
||||
</div>
|
||||
<ul class="nav nav-tabs" style="padding:0 15px;">
|
||||
{if $auth->check('pay_order/recharges')}<li><a href="{:url('pay_order/recharges')}">充值订单</a></li>{/if}
|
||||
<li class="active"><a href="{:url('recharge_refund/index')}">充值退款记录</a></li>
|
||||
</ul>
|
||||
<div class="panel-body">
|
||||
<form class="form-inline" method="get"><label>状态 <select name="status" class="form-control"><option value="">全部</option><option value="pending">待提交</option><option value="submitting">提交中</option><option value="processing">退款处理中</option><option value="unknown">结果未知</option><option value="abnormal">异常待处理</option><option value="success">退款成功</option><option value="closed">微信关闭</option><option value="rejected">已取消</option></select></label> <button class="btn btn-default">查询</button></form>
|
||||
<div class="table-responsive"><table class="table table-striped table-bordered"><thead><tr><th>退款单号</th><th>充值支付单号</th><th>用户</th><th>金额</th><th>状态</th><th>退款原因 / 处理备注</th><th>操作人 / 处理人 ID</th><th>创建时间</th><th>操作</th></tr></thead><tbody>
|
||||
{volist name="list" id="row"}
|
||||
<tr><td>{$row.refund_no|htmlentities}</td><td>{$row.out_trade_no|htmlentities}</td><td>{$row.nickname|htmlentities} {$row.mobile|htmlentities}</td><td>¥{$row.amount|htmlentities}</td><td>{$row.status|htmlentities}</td><td>{$row.reason|htmlentities}<br>{$row.audit_note|htmlentities}<br>{$row.error|htmlentities}</td><td>{$row.operator_id|htmlentities} / {$row.reviewer_id|htmlentities}</td><td>{$row.createtime|date='Y-m-d H:i:s',###}</td><td>
|
||||
{if $row.status == 'pending' && $auth->check('recharge_refund/review')}<a href="{:url('recharge_refund/review', ['ids'=>$row.id])}" class="btn btn-xs btn-primary btn-dialog" title="处理未提交退款">处理</a>{/if}
|
||||
{if in_array($row.status, ['submitting','unknown','processing','abnormal']) && $auth->check('recharge_refund/resolve')}<a href="{:url('recharge_refund/resolve', ['ids'=>$row.id])}" class="btn btn-xs btn-warning btn-dialog" title="处理退款">处理</a>{/if}
|
||||
</td></tr>
|
||||
{/volist}
|
||||
</tbody></table></div>
|
||||
<form class="form-inline" method="get" style="margin-bottom:16px;">
|
||||
<label for="refund-status">退款状态</label>
|
||||
<select id="refund-status" name="status" class="form-control">
|
||||
<option value="">全部状态</option>
|
||||
{foreach name="statusLabels" item="label"}
|
||||
<option value="{$key|htmlentities}" {if $selectedStatus == $key}selected{/if}>{$label|htmlentities}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<button class="btn btn-primary" type="submit">查询</button>
|
||||
</form>
|
||||
<div class="table-responsive"><table class="table table-striped table-bordered table-hover">
|
||||
<thead><tr><th>退款单号</th><th>充值支付单号</th><th>用户</th><th>退款金额</th><th>状态</th><th>退款原因 / 处理备注</th><th>操作人 / 处理人</th><th>创建时间</th><th>操作</th></tr></thead>
|
||||
<tbody>
|
||||
{volist name="list" id="row"}
|
||||
<tr>
|
||||
<td>{$row.refund_no|htmlentities}</td>
|
||||
<td>{if $auth->check('pay_order/detail')}<a href="{:url('pay_order/detail', ['ids'=>$row.pay_order_id])}" class="btn-dialog" title="支付与退款详情">{$row.out_trade_no|htmlentities}</a>{else /}{$row.out_trade_no|htmlentities}{/if}</td>
|
||||
<td>{$row.nickname|htmlentities} {$row.mobile|htmlentities}</td><td>¥{$row.amount|htmlentities}</td>
|
||||
<td>{if isset($statusLabels[$row.status])}{$statusLabels[$row.status]|htmlentities}{else /}{$row.status|htmlentities}{/if}</td>
|
||||
<td>{$row.reason|htmlentities}<br>{$row.audit_note|htmlentities}<br>{$row.error|htmlentities}</td>
|
||||
<td>{if $row.operator_name}{$row.operator_name|htmlentities}{else /}—{/if} / {if $row.reviewer_name}{$row.reviewer_name|htmlentities}{else /}—{/if}</td>
|
||||
<td>{$row.createtime|date='Y-m-d H:i:s',###}</td><td>
|
||||
{if $row.status == 'pending' && $auth->check('recharge_refund/review')}<a href="{:url('recharge_refund/review', ['ids'=>$row.id])}" class="btn btn-xs btn-primary btn-dialog" title="处理未提交退款">处理</a>{/if}
|
||||
{if in_array($row.status, ['submitting','unknown','processing','abnormal']) && $auth->check('recharge_refund/resolve')}<a href="{:url('recharge_refund/resolve', ['ids'=>$row.id])}" class="btn btn-xs btn-warning btn-dialog" title="处理退款">核查处理</a>{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{if count($list) == 0}<tr><td colspan="9" class="text-center text-muted" style="padding:30px;">当前条件下暂无充值退款记录</td></tr>{/if}
|
||||
</tbody>
|
||||
</table></div>
|
||||
{$list->render()}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -82,6 +82,16 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($merchantProfile) && !empty($merchantProfile.id) && $auth->check('merchant/detail')}
|
||||
<div class="ud-card">
|
||||
<div class="ud-card-hd"><i class="fa fa-file-text-o"></i> 关联历史企业资料</div>
|
||||
<div class="ud-card-bd">
|
||||
<span>{$merchantProfile.name|htmlentities}</span>
|
||||
<a href="{:url('merchant/detail', ['ids' => $merchantProfile.id])}" target="_blank" rel="noopener noreferrer">查看历史业务记录</a>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $row.identity_selected && $row.user_type=='merchant'}
|
||||
<div class="ud-card">
|
||||
<div class="ud-card-hd"><i class="fa fa-building-o"></i> 商家用户资料</div>
|
||||
|
||||
@@ -16,12 +16,13 @@
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}"><i class="fa fa-refresh"></i></a>
|
||||
<span class="label label-success" style="font-size:12px;padding:6px 10px;margin-left:6px;vertical-align:middle;">
|
||||
累计入账总额:¥{$totalIncome|number_format=2}
|
||||
全部历史余额增加:¥{$totalIncome|number_format=2}
|
||||
</span>
|
||||
<span class="label label-warning" style="font-size:12px;padding:6px 10px;margin-left:4px;vertical-align:middle;">
|
||||
累计扣减/提现:¥{$totalOutflow|number_format=2}
|
||||
全部历史余额减少:¥{$totalOutflow|number_format=2}
|
||||
</span>
|
||||
</div>
|
||||
<p class="text-muted" style="margin:12px 0;">以上为全部历史钱包余额变动汇总,不随列表筛选变化;包含充值退款占用与释放,不代表平台收入或实际收付款。</p>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
data-operate-detail="{:$auth->check('wallet_log/detail')}"
|
||||
data-operate-edit=""
|
||||
|
||||
@@ -4,7 +4,7 @@ return array (
|
||||
'name' => '优匠优服',
|
||||
'beian' => '',
|
||||
'cdnurl' => '',
|
||||
'version' => '1.0.94',
|
||||
'version' => '1.0.95',
|
||||
'timezone' => 'Asia/Shanghai',
|
||||
'forbiddenip' => '',
|
||||
'languages' =>
|
||||
|
||||
在新工单中引用
屏蔽一个用户