📄 clientviewbytype.jsp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="java.util.*"%>
<%@ page import="java.text.SimpleDateFormat"%>
<%@ page import="com.saas.biz.groupInfoMgr.GroupInfo"%>
<html>
<head>
<title>group-data</title>
</head>
<body>
<%
String cust_id="",class_id="",group_type="",iStart="0";
if(request.getParameter("cust_id") != null) {
cust_id = request.getParameter("cust_id");
}
if(request.getParameter("class_id") != null) {
class_id = request.getParameter("class_id");
}
if(request.getParameter("group_type") != null) {
group_type = request.getParameter("group_type");
}
if(request.getParameter("iStart") != null) {
iStart = request.getParameter("iStart");
}
GroupInfo group=new GroupInfo();
ArrayList list=group.getGroupCusString(iStart,cust_id,class_id,group_type);
int counter = group.getGroupCusString(cust_id,class_id,group_type);
int pages=counter/20+1;
int pageUp=0,pageDown=0;
int currenPage=Integer.valueOf(iStart).intValue();
if(pages>currenPage)
{
if(currenPage>0)
{
pageUp=currenPage-1;
}
pageDown=currenPage+1;
}
else if(pages==currenPage)
{
pageUp=currenPage-1;
pageDown=currenPage;
}
///ArrayList joinList=group.getGroupForJoin(cust_id,class_id,group_type);
int size=0,join=0;
String table = "<table width=100% border=0 cellspacing=1 cellpadding=0>";
table=table+"<tr>"+
"<td width='35%' align=center bgcolor=#efedef>客户名称</td><td width='20%' align=center bgcolor=#efefef>客户电话</td><td width='20%' align=center bgcolor=#efefef>E-mail</td></tr>";
if(list !=null && list.size()>0){
size=list.size();
for (int i = 0; i < list.size(); i++) {
HashMap map = (HashMap) list.get(i);
String obj_cust_id = "", cust_name = "", phone = "",email="";
if (map.get("cust_id") != null) {
obj_cust_id = map.get("cust_id").toString();
}
if (map.get("email") != null) {
email = map.get("email").toString();
}
if (map.get("cust_name") != null) {
cust_name = map.get("cust_name").toString();
cust_name="<a href=/customerMgr/Custinfo.jsp?obj_cust_id="+obj_cust_id+"&user_id= target=_blank>"+cust_name+"</a>";
}
if (map.get("group_contact_phone") != null) {
phone = map.get("group_contact_phone").toString();
}if(i%2==0){
table=table+"<tr><td align=left>"+cust_name+"</td><td align=left>"+phone+"</td><td align=left>"+email+"</td></tr>";
}else{
table=table+"<tr><td align=left bgcolor=#efedef>"+cust_name+"</td><td align=left bgcolor=#efefef>"+phone+"</td><td align=left bgcolor=#efedef>"+email+"</td></tr>";
}
}
}
table=table+"</table><input type=hidden id=count name=count value="+size+"><input type=hidden id=join name=count value="+join+">";
out.print(table);
%>
<table>
<tr>
<td align="left" colspan="2" style=" padding:2px 5px;">共<%=counter%>条 共<%=pages%>页</td>
<td align="left" colspan="4" style=" padding:2px 5px;">
<a href="javascript:getpages('0')">首页 </a>
<a href="javascript:getpages('<%=pageUp%>')">上一页</a>
<a href="javascript:getpages('<%=pageDown%>')">下一页 </a>
<a href="javascript:getpages('<%=pages%>')">尾页</a></td>
</tr></table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -