290536454d3970e80823b337706c9fdb16bbae21.svn-base
5.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
// 程序名称: 时速邮件管理系统(EsMail)
// 程序版本: V2.0
// 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776)
// 版权所有: 深圳市科飞时速网络技术有限公司
// 技术支持: Tech@21gmail.com
// 单元名称: 用户管理js文件
// 开始时间: 2013.11.1
// 程 序 员: 谢勇
// 最后修改: 2013.11.1
// 备 注:
var user_currpage=1;//当前页
var user_pageSize=10;//每页显示量
var user_tolpage=1;//总页数
$(document).ready(function(){
//查找该域所有用户
findDomainUser();
//用户选择每页显示量
$("#user_pageNum").blur(function(){
user_pageSize=$("#user_pageNum").val();
if(isNaN($('#user_pageNum').val())){
alert("只能是数字");
}else{
user_currpage=1;
findDomainUser();
}
});
//跳转到多少页
$("#user_selectpage").change(function(){
user_currpage=$("#user_selectpage").val();
findDomainUser();
});
});
//查找该域所有用户
function findDomainUser(){
$.ajax({
type: "post",
url: "yxyinfo_findDomainUser.action",
dataType:"json",
async:false,
cache: false,
data:{
currpage:user_currpage,
pageSize:user_pageSize
},
error: function() {alert("失败,请重试!");},
success: function(msg) {
var html='';
var role="普通用户";
$.each(msg.userlist,function(index,row){
if(row.userrole==1){
role="系统管理员";
}else{
role="普通用户";
}
html+='<div class="emocs emlmbg">';
html+='<div class="e1">'+row.loginid+'</div>';
html+='<div class="e5">'+row.username+'</div>';
html+='<div class="e2">'+role+'</div>';
if(row.lastdate==null||row.lastdate==""){
html+='<div class="e6">未访问</div>';
}else{
html+='<div class="e6">'+row.lastdate+'</div>';
}
html+='<div class="e4"><div class=e4_1><a href="javascript:employ_findCountInfo(\''+row.loginid+'\')">统计信息</a></div></div>';
html+='</div>';
});
$("#user_list").html(html);
$("#user_tolpage").html(msg.pageBean.totalPage);//总页数
user_tolpage=msg.pageBean.totalPage;
$("#user_currPage").html(msg.pageBean.currentPage);//当前页
user_currpage=msg.pageBean.currentPage;
$("#tolusernum").html(msg.pageBean.totalRecord);//总用户量
//跳转
var selectPage="";
if(msg.userlist==null||msg.userlist==""){
selectPage+='<option value="1">1</option>';
}else{
for(var i=1;i<=msg.pageBean.totalPage;i++){//跳转页面
selectPage+='<option value='+i+' id=user_option'+i+'>'+i+'</option>';
}
}
$("#user_selectpage").html(selectPage);
var getid='user_option'+user_currpage;
$("#"+getid).attr("selected","selected");
}
});
}
//首页
function user_homepage(){
user_currpage=1;
findDomainUser();
}
//下一页
function user_nextpage(){
if(user_currpage>=user_tolpage){
}else{
user_currpage=user_currpage+1;
findDomainUser();
}
}
//上一页
function user_uppage(){
if(user_currpage<=1){
}else{
user_currpage=user_currpage-1;
findDomainUser();
}
}
//尾页
function user_endpage(){
user_currpage=user_tolpage;
findDomainUser();
}
//查询统计信息
function employ_findCountInfo(loginid){
$.ajax({
type: "post",
url: "yxyC_findCountInfo.action",
dataType:"json",
data:{
loginid:loginid
},
async:false,
cache: false,
error: function() {alert(frontMsg.get("yxy_mail.language_114"));},
beforeSend:function() {
},
complete:function() {
},
success: function(msg) {
if(msg.yxymaildaycount!=""&&msg.yxymaildaycount!=null){
//日赋值
$("#yxy_dayci").html(msg.yxymaildaycount[0].yxy_day_count_ci_num);
$("#yxy_daytol").html(msg.yxymaildaycount[0].yxy_day_count_tol_num);
$("#yxy_dayemail").html(msg.yxymaildaycount[0].yxy_day_count_address_num);
}else{
$("#yxy_dayci").html(0);
$("#yxy_daytol").html(0);
$("#yxy_dayemail").html(0);
}
if(msg.yxymailmonthcount!=""&&msg.yxymailmonthcount!=null){
//月赋值
$("#yxy_monthci").html(msg.yxymailmonthcount[0].yxy_month_count_ci_num);
$("#yxy_monthtol").html(msg.yxymailmonthcount[0].yxy_month_count_tol_num);
$("#yxy_monthemail").html(msg.yxymailmonthcount[0].yxy_month_count_address_num);
}else{
$("#yxy_monthci").html(0);
$("#yxy_monthtol").html(0);
$("#yxy_monthemail").html(0);
}
if(msg.yxymailcount!=""&&msg.yxymailcount!=null){
//总数赋值
$("#yxy_tolci").html(msg.yxymailcount.yxy_count_ci_num);
$("#yxy_tolnum").html(msg.yxymailcount.yxy_count_tol_num);
$("#yxy_tolemail").html(msg.yxymailcount.yxy_count_email_num);
}else{
$("#yxy_tolci").html(0);
$("#yxy_tolnum").html(0);
$("#yxy_tolemail").html(0);
}
//点击赋值
$("#yxy_dayclickday").html(msg.countinfo[0]);
$("#yxy_dayclickmonth").html(msg.countinfo[1]);
$("#yxy_tolclickTol").html(msg.countinfo[2]);
//退订赋值
$("#yxy_dayUn").html(msg.countinfo[3]);
$("#yxy_montheUn").html(msg.countinfo[4]);
$("#yxy_tolUn").html(msg.countinfo[5]);
//地址赋值
$("#yxy_dayemail").html(msg.countinfo[6]);
$("#yxy_monthemail").html(msg.countinfo[7]);
$("#yxy_tolemail").html(msg.countinfo[8]);
employuser_popTips("用户统计信息","employ_countdiv",500);
}
});
}
//弹出层调用
function employuser_popTips(name,id,dx,mailid,mailuid){
showTipsWindown(name, id, dx);
}
function showTipsWindown(title,id,width){
var hdeight2=$("#"+id).height();
tipsWindown(title,"id:"+id,width,"100%",hdeight2,"true","","true",id);
}