<div class="layui-fluid layui-anim febs-anim" id="febs-money-flow" 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">
|
<label class="layui-form-label layui-form-label-sm">用户昵称</label>
|
<div class="layui-input-inline">
|
<input type="text" placeholder="用户昵称" name="name" autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label layui-form-label-sm">手机号码</label>
|
<div class="layui-input-inline">
|
<input type="text" placeholder="手机号码" name="phone" autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label layui-form-label-sm">流水类型</label>
|
<div class="layui-input-inline">
|
<select name="type">
|
<option value="">请选择</option>
|
<!-- <option value="1">静态收益</option>-->
|
<!-- <option value="2">直推奖</option>-->
|
<!-- <option value="3">代理收益</option>-->
|
<!-- <option value="4">排名收益</option>-->
|
<!-- <option value="5">总监收益</option>-->
|
<!-- <option value="6">社区店补</option>-->
|
<!-- <option value="7">一代收益</option>-->
|
<!-- <option value="8">提现</option>-->
|
<!-- <option value="9">转账</option>-->
|
<option value="10">余额支付</option>
|
<option value="11">余额退款</option>
|
<!-- <option value="12">佣金转竞猜积分</option>-->
|
<!-- <option value="13">佣金转余额</option>-->
|
<!-- <option value="14">竞猜积分签到</option>-->
|
<!-- <option value="15">感恩奖</option>-->
|
<option value="16">系统拨付</option>
|
<!-- <option value="17">抽奖</option>-->
|
<option value="18">充值</option>
|
<option value="20">赠送金额</option>
|
<option value="21">微信支付</option>
|
<option value="22">微信退款</option>
|
<!-- <option value="19">收益</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="flowType">
|
<option value="">请选择</option>
|
<option value="1">余额</option>
|
<option value="3">积分</option>
|
</select>
|
</div>
|
</div>
|
|
<div class="layui-inline">
|
<label class="layui-form-label layui-form-label-sm">开始时间</label>
|
<div class="layui-input-inline">
|
<input type="text" name="startTime" id="febs-money-flow-start" lay-verify="date"
|
placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
|
<div class="layui-inline">
|
<label class="layui-form-label layui-form-label-sm">结束时间</label>
|
<div class="layui-input-inline">
|
<input type="text" name="endTime" id="febs-money-flow-end" lay-verify="date"
|
placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
|
</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="moneyFlowTable" lay-data="{id: 'moneyFlowTable'}"></table>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!-- 表格操作栏 end -->
|
<script data-th-inline="none" type="text/javascript">
|
// 引入组件并初始化
|
layui.use([ 'jquery', 'form', 'table', 'febs','laydate'], function () {
|
var $ = layui.jquery,
|
febs = layui.febs,
|
form = layui.form,
|
table = layui.table,
|
$view = $('#febs-money-flow'),
|
$query = $view.find('#query'),
|
$reset = $view.find('#reset'),
|
$searchForm = $view.find('form'),
|
sortObject = {field: 'phone', type: null},
|
laydate = layui.laydate,
|
tableIns;
|
|
//日期范围
|
laydate.render({
|
elem: '#febs-money-flow-start'
|
});
|
|
laydate.render({
|
elem: '#febs-money-flow-end'
|
});
|
|
form.render();
|
|
// 表格初始化
|
initTable();
|
|
// 初始化表格操作栏各个按钮功能
|
table.on('tool(moneyFlowTable)', function (obj) {
|
var data = obj.data,
|
layEvent = obj.event;
|
});
|
|
// 查询按钮
|
$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';
|
tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
|
});
|
|
function initTable() {
|
tableIns = febs.table.init({
|
elem: $view.find('table'),
|
id: 'moneyFlowTable',
|
url: ctx + 'admin/mallMember/getMoneyFlowList',
|
totalRow : true,
|
cols: [[
|
{field: 'name', title: '用户昵称', minWidth: 100,align:'left',totalRowText:"合计"},
|
{field: 'phone', title: '手机号码', minWidth: 150,align:'left'},
|
{field: 'amount', title: '金额', minWidth: 150,align:'left', totalRow:true},
|
{field: 'type', title: '流水类型',
|
templet: function (d) {
|
if (d.flowType === 3) {
|
if (d.type === 1) {
|
return '<span>积分支付</span>'
|
} else if (d.type === 2) {
|
return '<span>购买商品获得积分</span>'
|
} else if (d.type === 3) {
|
return '<span>推荐下单获得积分</span>'
|
}
|
}
|
|
if (d.flowType === 1) {
|
if (d.type === 1) {
|
return '<span>静态收益</span>'
|
} else if (d.type === 2) {
|
return '<span>直推奖</span>'
|
} else if (d.type === 3) {
|
return '<span>代理收益</span>'
|
} else if (d.type === 4) {
|
return '<span>排名收益</span>'
|
}else if (d.type === 5) {
|
return '<span>总监收益</span>'
|
}else if (d.type === 6) {
|
return '<span>社区店补</span>'
|
}else if (d.type === 7) {
|
return '<span>一代收益</span>'
|
}else if (d.type === 8) {
|
return '<span>提现</span>'
|
}else if (d.type === 9) {
|
return '<span>转账</span>'
|
}else if (d.type === 10) {
|
return '<span>余额支付</span>'
|
}else if (d.type === 11) {
|
return '<span>退款</span>'
|
}else if (d.type === 12) {
|
return '<span>佣金转竞猜积分</span>'
|
}else if (d.type === 13) {
|
return '<span>佣金转余额</span>'
|
}else if (d.type === 14) {
|
return '<span>竞猜积分签到</span>'
|
}else if (d.type === 15) {
|
return '<span>感恩奖</span>'
|
}else if (d.type === 16) {
|
return '<span>系统拨付</span>'
|
}else if (d.type === 17) {
|
return '<span>抽奖</span>'
|
}else if (d.type === 18) {
|
return '<span>充值</span>'
|
}else if (d.type === 19) {
|
return '<span>收益</span>'
|
}else if (d.type === 20) {
|
return '<span>赠送金额</span>'
|
}else if (d.type === 21) {
|
return '<span>微信支付</span>'
|
}else if (d.type === 22) {
|
return '<span>微信退款</span>'
|
}else{
|
return ''
|
}
|
}
|
}, minWidth: 80,align:'center'},
|
{field: 'flowType', title: '资金类型',
|
templet: function (d) {
|
if (d.flowType === 1) {
|
return '余额';
|
} else if(d.flowType === 3) {
|
return '积分'
|
} else {
|
return '-';
|
}
|
}, minWidth: 80,align:'center'},
|
{field: 'orderNo', title: '订单编号', minWidth: 150,align:'left'},
|
{field: 'createdTime', title: '创建时间', minWidth: 180,align:'center'}
|
]]
|
});
|
}
|
|
// 获取查询参数
|
function getQueryParams() {
|
let startTimestr = $searchForm.find('input[name="startTime"]').val().trim();
|
let endTimeStr = $searchForm.find('input[name="endTime"]').val().trim();
|
if(startTimestr != '' && endTimeStr != '' && startTimestr >= endTimeStr){
|
febs.alert.warn('开始时间需要小于结束时间');
|
return{};
|
}
|
return {
|
startTime: $searchForm.find('input[name="startTime"]').val().trim(),
|
endTime: $searchForm.find('input[name="endTime"]').val().trim(),
|
name: $searchForm.find('input[name="name"]').val().trim(),
|
phone: $searchForm.find('input[name="phone"]').val().trim(),
|
type: $searchForm.find("select[name='type']").val(),
|
flowType: $searchForm.find("select[name='flowType']").val(),
|
};
|
}
|
|
})
|
</script>
|