<div class="layui-fluid layui-anim febs-anim" id="febs-user" 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">
|
<div class="layui-row">
|
<div class="layui-col-md10">
|
<div class="layui-form-item">
|
<div class="layui-inline">
|
<div class="layui-input-inline">
|
<input type="text" placeholder="手机号/邮箱/邀请码" name="account"
|
autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<div class="layui-input-block">
|
<input type="radio" name="timeType" value="1" title="今日">
|
<input type="radio" name="timeType" value="2" title="昨日">
|
<input type="radio" name="timeType" value="3" title="本周">
|
<input type="radio" name="timeType" value="4" title="本月">
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area">
|
<div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action"
|
id="query">
|
<i class="layui-icon"></i>
|
</div>
|
<div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action"
|
id="reset">
|
<i class="layui-icon"></i>
|
</div>
|
</div>
|
</div>
|
</form>
|
<table lay-filter="userTable" lay-data="{id: 'userTable'}"></table>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!-- 表格字段状态格式化 start -->
|
<script type="text/html" id="open-type">
|
{{#
|
var openType = {
|
1: {title: '开多', color : 'blue'},
|
2: {title: '开空', color : 'red'},
|
3: {title: '平多', color : 'blue'},
|
4: {title: '平空', color : 'red'}
|
}[d.orderType];
|
}}
|
<span class="layui-badge febs-bg-{{openType.color}}">{{ openType.title }}</span>
|
</script>
|
<script type="text/html" id="closing-type">
|
{{#
|
var closingType = {
|
0: {title: '-'},
|
2: {title: '平多'},
|
3: {title: '平空'},
|
4: {title: '爆仓平多'},
|
5: {title: '爆仓平空'},
|
6: {title: '止盈平多'},
|
7: {title: '止盈平空'},
|
8: {title: '止损平多'},
|
9: {title: '止损平空'},
|
}[d.closingType];
|
}}
|
<span>{{ closingType.title }}</span>
|
</script>
|
<!-- 表格字段状态格式化 start -->
|
|
<script data-th-inline="none" type="text/javascript">
|
// 引入组件并初始化
|
layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () {
|
var $ = layui.jquery,
|
laydate = layui.laydate,
|
febs = layui.febs,
|
form = layui.form,
|
table = layui.table,
|
$view = $('#febs-user'),
|
$query = $view.find('#query'),
|
$reset = $view.find('#reset'),
|
$searchForm = $view.find('form'),
|
sortObject = {field: 'createTime', type: null},
|
tableIns,
|
timeType;
|
|
form.render();
|
|
// 表格初始化
|
initTable();
|
|
// 查询按钮
|
$query.on('click', function () {
|
var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type});
|
tableIns.reload({where: params, page: {curr: 1}});
|
});
|
|
// 刷新按钮
|
$reset.on('click', function () {
|
$searchForm[0].reset();
|
sortObject.type = 'null';
|
timeType = null;
|
tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
|
});
|
|
function initTable() {
|
tableIns = febs.table.init({
|
elem: $view.find('table'),
|
id: 'userTable',
|
url: ctx + 'order/getReturnList',
|
cols: [[
|
{type: 'checkbox'},
|
{field: 'account', title: '姓名', minWidth: 100, align: 'center'},
|
{field: 'phone', title: '联系方式', minWidth: 130, align: 'center'},
|
{field: 'email', title: '邮箱', minWidth: 100, align: 'center'},
|
{field: 'orderNo', title: '订单编号', minWidth: 160, align: 'center'},
|
{templet: '#open-type', title: '订单类型', minWidth: 100, align: 'center'},
|
{field: 'returnSymbol', title: '返佣币种', minWidth: 120, align: 'center'},
|
{field: 'inviteId', title: '返佣对象', minWidth: 120, align: 'center'},
|
{field: 'createTime', title: '返佣时间', minWidth: 140, align: 'center'},
|
{templet: '#closing-type', title: '平仓类型', minWidth: 100, align: 'center'},
|
{field: 'closingFeeAmount', title: '平仓手续费', minWidth: 130, align: 'center'},
|
{field: 'holdingFeeAmount', title: '持仓手续费', minWidth: 130, align: 'center'},
|
{field: 'openingFeeAmount', title: '开仓手续费', minWidth: 160, align: 'center'},
|
{field: 'returnAmount', title: '返佣佣金', minWidth: 140, align: 'center', fixed : 'right'},
|
]]
|
});
|
}
|
|
// 获取查询参数
|
function getQueryParams() {
|
var type = $searchForm.find('input[name="timeType"]:checked').val();
|
if (type) {
|
timeType = type;
|
}
|
return {
|
timeType : timeType,
|
account: $searchForm.find('input[name="account"]').val().trim(),
|
invalidate_ie_cache: new Date()
|
};
|
}
|
})
|
</script>
|