feat(withdraw): DMEPA提现手续费与最小提现额度配置收敛至商城配置页面并实现内扣闭环
1. 后台商城配置收敛:在【商城配置 -> 充值提现】面板集中增加「DMEPA 数字资产提现配置」(开启开关、手续费率、最小提现额度),并自动双向同步与自愈补齐数据表行 2. 服务层内扣手续费闭环:applyMadow 增加手续费率读取、内扣手续费计算(申请金额 > 手续费校验)与实际到账持久化,驳回/失败全额原路退还 DMEPA 持仓 3. API 与前台联动:rules() 与 madow() 接口返回手续费率,withdraw.vue 实时动态计算扣除 DMEPA 枚数、手续费内扣金额与预计到账金额 4. 后台列表与导出优化:提现管理列表与导出功能支持展示换算市值、手续费与到账金额 5. 新增及更新 3 套自动化规格测试(累计 130 项断言全部通过)
这个提交包含在:
@@ -81,6 +81,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
|
||||
}
|
||||
}
|
||||
if (state.tabActive == 'shopro/config/rechargewithdraw') {
|
||||
if (form.model.withdraw) {
|
||||
if (form.model.withdraw.madow_withdraw_enable === undefined || form.model.withdraw.madow_withdraw_enable === null) {
|
||||
form.model.withdraw.madow_withdraw_enable = 1;
|
||||
}
|
||||
if (form.model.withdraw.madow_charge_rate === undefined || form.model.withdraw.madow_charge_rate === null) {
|
||||
form.model.withdraw.madow_charge_rate = 0;
|
||||
}
|
||||
if (form.model.withdraw.madow_min_amount === undefined || form.model.withdraw.madow_min_amount === null || form.model.withdraw.madow_min_amount === '') {
|
||||
form.model.withdraw.madow_min_amount = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (state.tabActive == 'shopro/config/partner') {
|
||||
if (!Array.isArray(form.model.partner_push3_amounts)) {
|
||||
form.model.partner_push3_amounts = [398, 400, 600]
|
||||
@@ -93,6 +106,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
if (form.model.partner_madow_withdraw_min === undefined || form.model.partner_madow_withdraw_min === null || form.model.partner_madow_withdraw_min === '') {
|
||||
form.model.partner_madow_withdraw_min = 1;
|
||||
}
|
||||
if (form.model.partner_madow_withdraw_charge_rate === undefined || form.model.partner_madow_withdraw_charge_rate === null) {
|
||||
form.model.partner_madow_withdraw_charge_rate = 0;
|
||||
}
|
||||
if (!form.model.partner_madow_rule_title) {
|
||||
form.model.partner_madow_rule_title = '市值与增值规则';
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
|
||||
var Controller = {
|
||||
index: () => {
|
||||
const { reactive, onMounted } = Vue
|
||||
const { reactive, onMounted, ref } = Vue
|
||||
const index = {
|
||||
setup() {
|
||||
const state = reactive({
|
||||
@@ -136,6 +136,38 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
}, function (ret, res) { })
|
||||
}
|
||||
|
||||
const exportLoading = ref(false);
|
||||
function onExport(type = 'export') {
|
||||
exportLoading.value = true;
|
||||
let tempSearch = JSON.parse(JSON.stringify(state.filter.data));
|
||||
let search = composeFilter(tempSearch, {
|
||||
'user.nickname': 'like',
|
||||
'user.mobile': 'like',
|
||||
createtime: 'range',
|
||||
updatetime: 'range',
|
||||
});
|
||||
if (Config.save_type == 'download') {
|
||||
window.location.href = `${Config.moduleurl}/shopro/withdraw/${type}?page=${pagination.page}&list_rows=${pagination.list_rows}&order=${state.order}&sort=${state.sort}&search=${search.search}`;
|
||||
exportLoading.value = false;
|
||||
} else {
|
||||
Fast.api.ajax({
|
||||
url: `shopro/withdraw/${type}`,
|
||||
type: 'GET',
|
||||
data: {
|
||||
page: pagination.page,
|
||||
list_rows: pagination.list_rows,
|
||||
order: state.order,
|
||||
sort: state.sort,
|
||||
...search,
|
||||
},
|
||||
}, function () {
|
||||
exportLoading.value = false;
|
||||
}, function () {
|
||||
exportLoading.value = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function onChangeSort({ prop, order }) {
|
||||
state.order = order == 'ascending' ? 'asc' : 'desc';
|
||||
state.sort = prop;
|
||||
@@ -206,6 +238,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
})
|
||||
|
||||
return {
|
||||
exportLoading,
|
||||
onExport,
|
||||
onClipboard,
|
||||
state,
|
||||
type,
|
||||
|
||||
在新工单中引用
屏蔽一个用户