/**
|
* 角色管理的单例
|
*/
|
var VipChannelStatisticsInfo = {
|
id: "VipChannelTable", //表格id
|
seItem: null, //选中的条目
|
table: null,
|
layerIndex: -1
|
};
|
|
/**
|
* 初始化表格的列
|
*/
|
VipChannelStatisticsInfo.initColumn = function () {
|
var columns = [
|
{field: 'select_item', radio: true},
|
{title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
|
{title: '用户手机号', field: 'phone', align: 'center', valign: 'middle', width: '200px'},
|
{title: '用户类型', field: 'userType', align: 'center', valign: 'middle', width: '100px',
|
formatter: function (value, row) {
|
if(value == 1){
|
return "老用户";
|
}
|
if(value == 2){
|
return "初次登录老用户";
|
}
|
if(value == 3){
|
return "注册用户";
|
}
|
}
|
},
|
{title: '注册来源', field: 'vipChannelType', align: 'center', valign: 'middle', width: '200px',
|
formatter: function (value, row) {
|
if(value == 1){
|
return "主渠道码";
|
}
|
if(value == 2){
|
return "子渠道码";
|
}
|
}
|
},
|
{title: '渠道名称', field: 'name', align: 'center', valign: 'middle', width: '100px'},
|
{title: '站内站外', field: 'membershipSource', align: 'center', valign: 'middle', width: '100px',
|
formatter: function (value, row) {
|
if(value == 0){
|
return "站内";
|
}
|
if(value == 1){
|
return "站外";
|
}
|
}
|
},
|
{title: '子渠道码名称', field: 'subName', align: 'center', valign: 'middle', width: '100px'}
|
]
|
return columns;
|
};
|
|
|
/**
|
* 检查是否选中
|
*/
|
VipChannelStatisticsInfo.check = function () {
|
var selected = $('#' + this.id).bootstrapTable('getSelections');
|
if (selected.length == 0) {
|
Feng.info("请先选中表格中的某一记录!");
|
return false;
|
} else {
|
VipChannelStatisticsInfo.seItem = selected[0];
|
return true;
|
}
|
};
|
|
|
|
|
|
|
|
VipChannelStatisticsInfo.exportVipChannelStatisticsInfoList = function(){
|
window.location.href = Feng.ctxPath + "/vipChannel/exportVipChannelStatisticsInfoList?userType=" + $('#userType').val() + "&vipChannelType=" + $('#vipChannelType').val()
|
+ "&name=" + $('#name').val() + "&subName=" + $('#subName').val() + "&membershipSource=" + $('#membershipSource').val();
|
}
|
|
|
/**
|
* 搜索
|
*/
|
VipChannelStatisticsInfo.search = function () {
|
var queryData = {};
|
queryData['id'] = $("#id").val();
|
queryData['userType'] = $("#userType").val();
|
queryData['vipChannelType'] = $('#vipChannelType').val();
|
queryData['name'] = $('#name').val();
|
queryData['subName'] = $('#subName').val();
|
queryData['membershipSource'] = $('#membershipSource').val();
|
VipChannelStatisticsInfo.table.setQueryParams({});
|
VipChannelStatisticsInfo.table.refresh({query: queryData});
|
}
|
|
VipChannelStatisticsInfo.resetSearch = function () {
|
$("#userType").val('');
|
$('#vipChannelType').val('');
|
$('#name').val('');
|
$('#subName').val('');
|
$('#membershipSource').val('');
|
VipChannelStatisticsInfo.search();
|
}
|
|
|
$(function () {
|
var defaultColunms = VipChannelStatisticsInfo.initColumn();
|
var table = new BSTable(VipChannelStatisticsInfo.id, "/vipChannel/queryVipChannelStatisticsInfo", defaultColunms);
|
table.setPaginationType("server");
|
table.setQueryParams({
|
id: $('#id').val()
|
})
|
VipChannelStatisticsInfo.table = table.init();
|
});
|