/**
|
* 角色管理的单例
|
*/
|
var Statistics = {
|
id: "StatisticsTable", //表格id
|
seItem: null, //选中的条目
|
table: null,
|
layerIndex: -1
|
};
|
|
/**
|
* 初始化表格的列
|
*/
|
Statistics.initColumn = function () {
|
var columns = [
|
{field: 'select_item', radio: true},
|
// {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
|
{title: '日期', field: 'time', align: 'center', valign: 'middle'},
|
{title: '会员ID', field: 'memberId', align: 'center', valign: 'middle'},
|
{title: '手机号', field: 'phone', align: 'center', valign: 'middle'},
|
{title: '所在等级', field: 'vipLevel', align: 'center', valign: 'middle', width: '150px',
|
formatter: function (value, item, i) {
|
if(item.growthValue == 0 && value=="LV1") {
|
return "LV1且成长值为0";
|
}else if(value=="LV1" && item.growthValue > 0){
|
return "LV1且成长值大于0";
|
}else{
|
return value;
|
}
|
}
|
},
|
{title: '领取等级权益内容', field: 'content', align: 'center', valign: 'middle', width: '300px'}
|
]
|
return columns;
|
};
|
|
|
Statistics.exportStatistics = function(){
|
let url = Feng.ctxPath + "/statistics/exportEquityDetails?aggregateTime=" + $('#aggregateTime').val();
|
window.location.href = url;
|
}
|
|
|
Statistics.search = function () {
|
var queryData = {};
|
queryData['aggregateTime'] = $("#aggregateTime").val();
|
Statistics.table.setQueryParams({});
|
Statistics.table.refresh({query: queryData});
|
}
|
|
Statistics.resetSearch = function(){
|
$("#aggregateTime").val($('.aggregateTime').val());
|
Statistics.search();
|
}
|
|
|
$(function () {
|
var defaultColunms = Statistics.initColumn();
|
var table = new BSTable(Statistics.id, "/statistics/queryEquityDetails", defaultColunms);
|
table.setPaginationType("server");
|
table.setQueryParams({
|
aggregateTime: $('#aggregateTime').val()
|
})
|
Statistics.table = table.init();
|
|
});
|