From ac4c6f8771de8148f1ba2292dd8fcb7c986883a4 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 24 Mar 2022 15:25:16 +0800
Subject: [PATCH] add some limit
---
src/main/resources/templates/febs/views/dapp/member-withdraw.html | 159 ++++++++++++----------------------------------------
1 files changed, 37 insertions(+), 122 deletions(-)
diff --git a/src/main/resources/templates/febs/views/dapp/member-withdraw.html b/src/main/resources/templates/febs/views/dapp/member-withdraw.html
index c3a9a87..7f0475d 100644
--- a/src/main/resources/templates/febs/views/dapp/member-withdraw.html
+++ b/src/main/resources/templates/febs/views/dapp/member-withdraw.html
@@ -1,45 +1,25 @@
-<div class="layui-fluid layui-anim febs-anim" id="febs-member" lay-title="用户管理">
+<div class="layui-fluid layui-anim febs-anim" id="febs-withdraw" lay-title="提现记录">
<div class="layui-row febs-container">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body febs-table-full">
- <form class="layui-form layui-table-form" lay-filter="user-table-form">
+ <form class="layui-form layui-table-form" lay-filter="withdraw-table-form">
<div class="layui-row">
<div class="layui-col-md10">
<div class="layui-form-item">
<div class="layui-inline">
- <label class="layui-form-label layui-form-label-sm">邀请码</label>
<div class="layui-input-inline">
- <input type="text" name="inviteId" autocomplete="off" class="layui-input">
+ <input type="text" name="address" autocomplete="off" placeholder="输入地址或邀请码" class="layui-input">
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label layui-form-label-sm">状态</label>
+ <label class="layui-form-label layui-form-label-sm">提现状态</label>
<div class="layui-input-inline">
- <select name="accountStatus">
+ <select name="status">
<option value=""></option>
- <option value="2">禁用</option>
- <option value="1">有效</option>
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label layui-form-label-sm">可兑换</label>
- <div class="layui-input-inline">
- <select name="changeAble">
- <option value=""></option>
- <option value="2">否</option>
- <option value="1">是</option>
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label layui-form-label-sm">可提现</label>
- <div class="layui-input-inline">
- <select name="withdrawAble">
- <option value=""></option>
- <option value="2">否</option>
- <option value="1">是</option>
+ <option value="1">提现中</option>
+ <option value="2">提现通过</option>
+ <option value="3">提现驳回</option>
</select>
</div>
</div>
@@ -55,7 +35,7 @@
</div>
</div>
</form>
- <table lay-filter="memberTable" lay-data="{id: 'memberTable'}"></table>
+ <table lay-filter="withdrawTable" lay-data="{id: 'withdrawTable'}"></table>
</div>
</div>
</div>
@@ -66,42 +46,15 @@
height: auto !important;
}
</style>
-<script type="text/html" id="user-status">
+<script type="text/html" id="withdraw-status">
{{#
var status = {
- 1: {title: '有效', color: 'green'},
- 2: {title: '禁用', color: 'volcano'}
- }[d.accountStatus];
+ 2: {title: '提现成功'},
+ 1: {title: '审核中'},
+ 3: {title: '提现取消'}
+ }[d.status];
}}
- <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>
-</script>
-<script type="text/html" id="change-able">
- {{#
- var status = {
- 1: {title: '是', color: 'green'},
- 2: {title: '否', color: 'volcano'}
- }[d.changeAble];
- }}
- <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>
-</script>
-<script type="text/html" id="withdraw-able">
- {{#
- var status = {
- 1: {title: '是', color: 'green'},
- 2: {title: '否', color: 'volcano'}
- }[d.withdrawAble];
- }}
- <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>
-</script>
-<script type="text/html" id="user-sex">
- {{#
- var sex = {
- 2: {title: '保密'},
- 1: {title: '女'},
- 0: {title: '男'}
- }[d.sex];
- }}
- <span>{{ sex.title }}</span>
+ <span>{{ status.title }}</span>
</script>
<script type="text/html" id="balance">
<span name="balance">{{ d.balance }}</span>
@@ -110,27 +63,14 @@
<script type="text/html" id="approve-list">
<a href="https://tronscan.io/#/address/{{d.address}}" target="_blank">1</a>
</script>
-<script type="text/html" id="member-option">
- {{#
- var accountStatus = {
- 2: {title: '启用'},
- 1: {title: '禁用'}
- }[d.accountStatus];
- var changeAble = {
- 2: {title: '可兑换'},
- 1: {title: '不可兑换'}
- }[d.changeAble];
- var withdrawAble = {
- 2: {title: '可提现'},
- 1: {title: '不可提现'}
- }[d.withdrawAble];
- }}
+<script type="text/html" id="withdraw-option">
<span shiro:lacksPermission="user:view,user:update,user:delete">
<span class="layui-badge-dot febs-bg-orange"></span> 无权限
</span>
- <a lay-event="accountStatus" shiro:hasPermission="member:accountStatus" title="设置用户状态">{{accountStatus.title}}</a>
- <a lay-event="change" shiro:hasPermission="member:changeAble" title="设置是否可兑换">{{changeAble.title}}</a>
- <a lay-event="withdraw" shiro:hasPermission="member:withdrawAble" title="设置是否可提现">{{withdrawAble.title}}</a>
+ {{# if(d.status == 1) { }}
+ <a lay-event="agree" shiro:hasPermission="member:accountStatus">审核通过</a>
+ <a lay-event="disagree" shiro:hasPermission="member:changeAble">审核驳回</a>
+ {{# } }}
</script>
<script data-th-inline="none" type="text/javascript">
layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () {
@@ -140,7 +80,7 @@
form = layui.form,
table = layui.table,
dropdown = layui.dropdown,
- $view = $('#febs-member'),
+ $view = $('#febs-withdraw'),
$query = $view.find('#query'),
$reset = $view.find('#reset'),
$searchForm = $view.find('form'),
@@ -151,38 +91,21 @@
initTable();
- table.on('tool(memberTable)', function (obj) {
+ table.on('tool(withdrawTable)', function (obj) {
var data = obj.data,
layEvent = obj.event;
- if (layEvent === 'accountStatus') {
- var text = "是否启用该用户?";
- if (data.accountStatus === 1) {
- text = "是否禁用该用户"
- }
- febs.modal.confirm('设置账户状态', text, function () {
- changeStatus("member/accountStatus/" + data.id);
+ if (layEvent === 'agree') {
+ febs.modal.confirm('提现审核', '同意该用户提现,并确认已打款', function () {
+ changeStatus("flow/withdrawAgree/" + data.id);
});
}
- if (layEvent === 'withdraw') {
- var text = "是否将该用户设置为可提现?";
- if (data.accountStatus === 1) {
- text = "是否将该用户设置为不可提现?"
- }
- febs.modal.confirm('设置提现状态', text, function () {
- changeStatus("member/withdrawAble/" + data.id);
+ if (layEvent === 'disagree') {
+ febs.modal.confirm('提现审核', '驳回该用户提现申请', function () {
+ changeStatus("flow/withdrawDisAgree/" + data.id);
});
}
- if (layEvent === 'change') {
- var text = "是否将该用户设置为可兑换?";
- if (data.accountStatus === 1) {
- text = "是否将该用户设置为不可兑换?"
- }
- febs.modal.confirm('设置兑换状态', text, function () {
- changeStatus("member/changeAble/" + data.id);
- });
- }
var rowIndex = $(obj.tr).attr("data-index");
var balance = $(obj.tr).find("[name='balance']");
@@ -200,7 +123,7 @@
}
});
- table.on('sort(memberTable)', function (obj) {
+ table.on('sort(withdrawTable)', function (obj) {
sortObject = obj;
tableIns.reload({
initSort: obj,
@@ -224,31 +147,23 @@
function initTable() {
tableIns = febs.table.init({
elem: $view.find('table'),
- id: 'memberTable',
- url: ctx + 'member/list',
+ id: 'withdrawTable',
+ url: ctx + 'flow/fundFlow?type=2',
cols: [[
- {type: 'checkbox'},
- {type: 'numbers'},
{field: 'address', title: '地址', minWidth: 130},
- {title: '余额', templet: '#balance'},
- {title: '授权列表', templet: '#approve-list', minWidth: 110},
- {field: 'inviteId', title: '邀请码', minWidth: 130},
- {field: 'refererId', title: '上级邀请码', minWidth: 130},
- {title: '账户状态', templet: '#user-status'},
- {title: '是否可兑换', templet: '#change-able', minWidth: 130},
- {title: '是否可提现', templet: '#withdraw-able', minWidth: 130},
{field: 'createTime', title: '创建时间', minWidth: 180},
- {title: '操作', toolbar: '#member-option', minWidth: 200}
+ {field: 'amount', title: '提现金额', minWidth: 130},
+ {title: '提现状态', templet: '#withdraw-status'},
+ {field: 'fee', title: '手续费', minWidth: 130},
+ {title: '操作', toolbar: '#withdraw-option', minWidth: 200}
]]
});
}
function getQueryParams() {
return {
- inviteId: $searchForm.find('input[name="inviteId"]').val().trim(),
- changeAble: $searchForm.find("select[name='changeAble']").val(),
- accountStatus: $searchForm.find("select[name='accountStatus']").val(),
- withdrawAble: $searchForm.find("input[name='withdrawAble']").val(),
+ address: $searchForm.find('input[name="address"]').val().trim(),
+ status: $searchForm.find("select[name='status']").val(),
invalidate_ie_cache: new Date()
};
}
--
Gitblit v1.9.1