/**
|
* 角色管理的单例
|
*/
|
var Banner = {
|
id: "BannerTable", //表格id
|
seItem: null, //选中的条目
|
table: null,
|
layerIndex: -1
|
};
|
|
/**
|
* 初始化表格的列
|
*/
|
Banner.initColumn = function () {
|
var columns = [
|
{field: 'select_item', radio: true},
|
{title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
|
{title: '会员ID', field: 'code', align: 'center', valign: 'middle'},
|
{title: '会员手机号', field: 'phone', align: 'center', valign: 'middle', width: '150px'},
|
{title: '昵称', field: 'nickname', align: 'center', valign: 'middle'},
|
{title: '最后访问点击时间', field: 'lastTime', align: 'center', valign: 'middle', width: '300px',
|
formatter: function (value) {
|
return value.split(" ")[0];
|
}
|
}
|
]
|
return columns;
|
};
|
|
|
/**
|
* 检查是否选中
|
*/
|
Banner.check = function () {
|
var selected = $('#' + this.id).bootstrapTable('getSelections');
|
if (selected.length == 0) {
|
Feng.info("请先选中表格中的某一记录!");
|
return false;
|
} else {
|
Banner.seItem = selected[0];
|
return true;
|
}
|
};
|
|
|
|
/**
|
* 导出
|
*/
|
Banner.exportBanner = function(){
|
window.location.href = Feng.ctxPath + "/banner/exportClickBannerUserList?bannerId=" + $('#bannerId').val();
|
}
|
|
|
|
/**
|
* 搜索
|
*/
|
Banner.search = function () {
|
var queryData = {};
|
Banner.table.refresh({query: queryData});
|
}
|
|
$(function () {
|
var defaultColunms = Banner.initColumn();
|
var table = new BSTable(Banner.id, "/banner/queryClickBannerUserList", defaultColunms);
|
table.setPaginationType("server");
|
table.setQueryParams({
|
bannerId: $('#bannerId').val()
|
})
|
Banner.table = table.init();
|
|
});
|