feat: 新增充值退款功能完整实现

- 新增充值退款数据库表结构及相关枚举字段
- 新增充值退款服务层核心逻辑(创建、审核、退款、回调处理)
- 新增充值退款后台管理页面及操作入口
- 新增充值退款前端页面及样式调整
- 新增充值退款相关测试用例
- 新增充值退款策略校验及网关处理逻辑
这个提交包含在:
2026-11-20 16:04:01 +08:00
父节点 6b83afb750
当前提交 f4f0c5513e
共有 29 个文件被更改,包括 487 次插入 和 651 次删除

查看文件

@@ -65,6 +65,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
return '<span style="font-size:11.5px;color:#475569;line-height:1.3;display:inline-block;">' + d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate()) + '<br>' + pad(d.getHours()) + ':' + pad(d.getMinutes()) + '</span>';
}},
{field: 'operate', title: '操作', table: table, events: Table.api.events.operate, buttons: [
{
name: 'rechargerefund',
text: '申请退款',
title: '申请充值原路退款',
classname: 'btn btn-xs btn-warning btn-dialog',
url: 'recharge_refund/create',
visible: function (row) { return row.scene === 'recharge' && row.status === 'paid' && Number(row.amount) > Number(row.refund_amount); }
},
{
name: 'detail',
text: '详情',
@@ -83,7 +91,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
url: 'pay_order/sync',
confirm: '确定向微信核实该笔流水的最新支付/退款状态吗?',
visible: function (row) {
return row.status === 'paid' || row.status === 'refunding' || row.status === 'refunded' || row.status === 'refund_failed';
return row.scene !== 'recharge' && (row.status === 'paid' || row.status === 'refunding' || row.status === 'refunded' || row.status === 'refund_failed');
},
success: function (data, ret) {
table.bootstrapTable('refresh');

查看文件

@@ -0,0 +1,9 @@
define(['jquery', 'bootstrap', 'backend', 'form'], function ($, undefined, Backend, Form) {
var Controller = {
index: function () {},
create: function () { Form.api.bindevent($('#form')); },
review: function () { Form.api.bindevent($('#form')); },
resolve: function () { Form.api.bindevent($('#form')); }
};
return Controller;
});