/**
|
* 用户管理管理初始化
|
*/
|
var TUser = {
|
id: "TUserTable", //表格id
|
seItem: null, //选中的条目
|
table: null,
|
layerIndex: -1
|
};
|
|
/**
|
* 鼠标悬停提示框 class .toolTip 为无效样式,作用于个别选择器使用
|
*/
|
TUser.tooltip = function(){
|
$(".toolTip").tooltip();
|
};
|
|
/**
|
* 初始化表格的列
|
*/
|
TUser.initColumn = function () {
|
return [
|
{field: 'selectItem', radio: true},
|
{title: '邀请人', field: 'inviteUserName', visible: true, align: 'center', valign: 'middle',width:'19%'},
|
{title: '被邀请用户', field: 'nickName', visible: true, align: 'center', valign: 'middle',width:'19%'},
|
{title: '被邀请用户手机号', field: 'phone', visible: true, align: 'center', valign: 'middle',width:'19%'},
|
{title: '被邀请用户ID', field: 'userId', visible: true, align: 'center', valign: 'middle',width:'19%'},
|
{title: '注册时间', field: 'registerTime', visible: true, align: 'center', valign: 'middle',width:'19%',},
|
];
|
};
|
|
/**
|
* 检查是否选中
|
*/
|
TUser.check = function () {
|
var selected = $('#' + this.id).bootstrapTable('getSelections');
|
if(selected.length == 0){
|
Feng.info("请先选中表格中的某一记录!");
|
return false;
|
}else{
|
TUser.seItem = selected[0];
|
return true;
|
}
|
};
|
|
/**
|
* 查询用户管理列表
|
*/
|
TUser.search = function () {
|
var queryData = {};
|
queryData['time'] = $("#time").val();
|
queryData['uid'] = $("#id").val();
|
queryData['userName'] = $("#userName").val();
|
TUser.table.refresh({query: queryData});
|
};
|
TUser.resetSearch = function () {
|
$("#time").val("");
|
$("#userName").val("");
|
TUser.search();
|
};
|
$(function () {
|
var defaultColunms = TUser.initColumn();
|
var table = new BSTable(TUser.id, "/tDriver/inviteList", defaultColunms);
|
// 设置物理分页server(逻辑分页client)
|
table.setPaginationType("server");
|
TUser.table = table.init();
|
TUser.search();
|
});
|