/**
|
* 跨城站点管理管理初始化
|
*/
|
var WorldCupGameStatisticsInfo = {
|
id: "WorldCupGameStatisticsInfoTable", //表格id
|
seItem: null, //选中的条目
|
table: null,
|
layerIndex: -1,
|
};
|
/**
|
* 初始化表格的列
|
*/
|
WorldCupGameStatisticsInfo.initColumn = function () {
|
return [
|
{field: 'selectItem', checkbox: true},
|
{title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
|
{title: '用户姓名', field: 'name', visible: true, align: 'center', valign: 'middle',},
|
{title: '联系电话', field: 'phone', visible: true, align: 'center', valign: 'middle'},
|
{title: '身份证号', field: 'idcard', visible: true, align: 'center', valign: 'middle'},
|
{title: '已比赛场次', field: 'totalSession', visible: true, align: 'center', valign: 'middle'},
|
{title: '胜-负场次', field: 'win', visible: true, align: 'center', valign: 'middle',
|
formatter:function (data, item) {
|
return item.win + '-' + item.lose;
|
}
|
},
|
{title: '胜率', field: 'winRate', visible: true, align: 'center', valign: 'middle',
|
formatter:function (data) {
|
return data + '%';
|
}
|
},
|
];
|
};
|
|
/**
|
* 检查是否选中
|
*/
|
WorldCupGameStatisticsInfo.check = function () {
|
var selected = $('#' + this.id).bootstrapTable('getSelections');
|
if(selected.length == 0){
|
Feng.info("请先选中表格中的某一记录!");
|
return false;
|
}else{
|
WorldCupGameStatisticsInfo.seItem = selected[0];
|
return true;
|
}
|
};
|
/**
|
* 商户号认证
|
*/
|
WorldCupGameStatisticsInfo.openWorldCupGameStatisticsInfo = function () {
|
if(this.check()){
|
var index = layer.open({
|
type: 2,
|
title: '比赛详情',
|
area: ['100%', '100%'], //宽高
|
fix: false, //不固定
|
maxmin: true,
|
content: Feng.ctxPath + '/worldCupRecords/openWorldCupGameStatisticsListInfo?participantId=' + WorldCupGameStatisticsInfo.seItem.participantId + "&participantType=" + WorldCupGameStatisticsInfo.seItem.participantType
|
});
|
this.layerIndex = index;
|
}
|
};
|
|
|
|
|
/**
|
* 关闭此对话框
|
*/
|
WorldCupGameStatisticsInfo.close = function() {
|
parent.layer.close(window.parent.WorldCupGameStatisticsInfo.layerIndex);
|
};
|
|
WorldCupGameStatisticsInfo.search = function () {
|
var queryData = {};
|
queryData['id'] = $("#id").val();
|
queryData['name'] = $("#name").val();
|
queryData['phone'] =$("#phone").val();
|
queryData['idcard'] =$("#idcard").val();
|
WorldCupGameStatisticsInfo.table.refresh({query: queryData});
|
};
|
|
WorldCupGameStatisticsInfo.resetSearch = function () {
|
$("#name").val("");
|
$("#phone").val("");
|
$("#idcard").val("");
|
WorldCupGameStatisticsInfo.search();
|
};
|
|
$(function () {
|
var defaultColunms = WorldCupGameStatisticsInfo.initColumn();
|
var table = new BSTable(WorldCupGameStatisticsInfo.id, "/worldCupRecords/worldCupGameStatisticsInfoList", defaultColunms);
|
table.setPaginationType("server");
|
table.setQueryParams({
|
'id': $('#id').val()
|
})
|
WorldCupGameStatisticsInfo.table = table.init();
|
|
});
|