dfe3ca10fc3d080e60753029521ab9482e77f19c.svn-base
5.0 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
// 程序名称: 时速邮件管理系统(EsMail)
// 程序版本: V2.0
// 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776)
// 版权所有: 深圳市科飞时速网络技术有限公司
// 技术支持: Tech@21gmail.com
// 单元名称: 营销待发邮件js文件
// 开始时间: 2013.11.1
// 程 序 员: 谢勇
// 最后修改: 2013.11.1
// 备 注:
var yxyW_currpage=1;//当前页
var yxyW_tolpage=1;//总页数
var status=0;
var yxyW_pageNum=10;//每页显示数
$(document).ready(function(){
//查询待发邮件
ysyW_findMasterStatus(1);
//跳转到多少页
$("#yxyW_selectpage").change(function(){
yxyW_currpage=$("#yxyW_selectpage").val();
ysyW_findMasterStatus(1);
});
//用户选择每页显示量
$("#yxyW_pageNum").blur(function(){
yxyW_pageNum=$("#yxyW_pageNum").val();
if(isNaN($('#yxyW_pageNum').val())){
alert("只能是数字");
}else{
yxyW_currpage=1;
ysyW_findMasterStatus(1);
}
});
});
//查询待发邮件
function ysyW_findMasterStatus(page){
$.ajax({
type: "post",
url: "yxyM_findMasterByStatus.action",
dataType:"json",
async:false,
cache: false,
data:{
currpage:page,
status:status,
pageSize:yxyW_pageNum
},
error: function() {alert(frontMsg.get("yxy_mail.language_114"));},
success: function(msg) {
var w= new Array();
$.each(msg.masterList,function(index,row){
var q= new Array();
var subjet1=row.subject.split("###")[0];
var subjet2=row.setsubject.split("###")[0];
q[0]='';
q[1]='<span title='+subjet1.replace(/\s/g," ")+'>'+subjet2+'</span>';
q[2]='<span title='+row.setHHtime+'>'+row.setYYtime+'</span>';
q[3]=row.send_num+"";
q[4]='<a href="javascript:void(0);" onClick="yxyW_popTips(\'统计信息\',\'yxyW_countdiv\',350,\''+row.send_mail_id+'\',\''+row.mail_uid+'\','+row.send_num+');">统计信息</a>';
w[index]=q;
});
var joinhtml='<select id=yxyW_skips>';
for(var p=0;p<msg.pageBean.totalPage;p++){
if((p+1)==yxyW_currpage){
joinhtml+='<option selected=selected>'+(p+1)+'</option>';
}else{
joinhtml+='<option>'+(p+1)+'</option>';
}
}
joinhtml+='</select>';
var joinhtml1='<select id=yxyW_page>';
for(var o=50;o<=200;o=o+50){
if(o==yxyW_pageNum){
joinhtml1+='<option selected=selected>'+o+'</option>';
}else{
joinhtml1+='<option>'+o+'</option>';
}
}
joinhtml1+='</select>';
$("#yxyW_list").lgytable({
tbinfo:'待发邮件',//"草稿邮件",
tbtitle:['','主题', '时间','投递','详细'],
tbwidth:['20','400','100', '100','100', '100'],
tbcon:[{"tbcon":w,"dqpage":msg.pageBean.currentPage,"tolpage":msg.pageBean.totalPage,"tolcount":msg.pageBean.totalRecord}],
homepage:function(){
ysyW_findMasterStatus(1);
},
prepage:function(){
yxyW_currpage=msg.pageBean.currentPage;
if(yxyW_currpage>1){
ysyW_findMasterStatus(yxyW_currpage-1);
yxyW_currpage--;
}
},
nextpage:function(){
yxyW_currpage=msg.pageBean.currentPage;
if(yxyW_currpage<msg.pageBean.totalPage){
ysyW_findMasterStatus(yxyW_currpage+1);
yxyW_currpage++;
}
},
lastpage:function(){
ysyW_findMasterStatus(msg.pageBean.totalPage);
},
tbsetnumtxt:joinhtml1,
tbsetnum:function(){//每页显示量
yxyW_pageNum=$("#yxyW_page").val();
ysyW_findMasterStatus(1);
},
tbsetpagetxt:joinhtml,
tbsetpage:function(){//跳转到某页
yxyW_currpage=$("#yxyW_skips").val();
ysyW_findMasterStatus(yxyW_currpage);
}
});
}
});
}
//首页
function yxyW_homepage(){
yxyW_currpage=1;
ysyW_findMasterStatus();
}
//下一页
function yxyW_nextpage(){
if(yxyW_currpage>=yxyW_tolpage){
alert(frontMsg.get("yxy_mail.language_126"));
}else{
yxyW_currpage=yxyW_currpage+1;
ysyW_findMasterStatus();
}
}
//上一页
function yxyW_uppage(){
if(yxyW_currpage<=1){
alert(frontMsg.get("yxy_mail.language_126"));
}else{
yxyW_currpage=yxyW_currpage-1;
ysyW_findMasterStatus();
}
}
//尾页
function yxyW_endpage(){
yxyW_currpage=yxyW_tolpage;
ysyW_findMasterStatus();
}
//弹出层调用
function yxyW_popTips(name,id,dx,mailid,mailuid,sendnum){
yxyW_mailCount(mailid,mailuid,sendnum);
yxyW_showTipsWindown(name, id, dx);
}
function yxyW_showTipsWindown(title,id,width){
var hdeight2=$("#"+id).height();
tipsWindown(title,"id:"+id,width,"100%",hdeight2,"true","","true",id);
}
//邮件统计信息
function yxyW_mailCount(mailid,mailuid,sendnum){
$.ajax({
type: "post",
url: "yxyM_findreadinfo.action",
dataType:"json",
async:false,
cache: false,
data:{
mailUID:mailuid,
mailID:mailid
},
error: function() {alert(frontMsg.get("yxy_mail.language_114"));},
success: function(msg) {
$("#yxyW_sendtol").html(sendnum);
$("#yxyW_readtol").html(msg[2]);
$("#yxyW_readperson").html(msg[3]);
$("#yxyW_sendover").html(sendnum-msg[1]);//已发完量
$("#yxyW_sendwait").html(msg[1]);//待发量
}
});
}