📄 aopm001.jsp
字号:
<html>
<head>
<title>管理软件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<%@ include file="../aadm/jspheader.jsp"%>
<%@ page contentType="text/html; charset=gb2312" %>
<%
/**
* <p>功能: 公司部门列表</p>
* <p>作者: sxit</p>
* <p>公司: 深训信科</p>
* <p>日期: 2004-11-11</p>
* @版本: 1.0
* @修改:
**/
%>
<%
com.sxit.operator.TopmcorporationList topmcorporationlist=null;
java.util.List recList=null;
java.util.Hashtable recSearch=null;;
if(request.getAttribute("topmcorporationlist")!=null){
topmcorporationlist=(com.sxit.operator.TopmcorporationList)request.getAttribute("topmcorporationlist");
}
int pageNo=0;//页码
int pageSize=10;//页大小
int recCount=0;//总数
if(topmcorporationlist!=null){
pageNo=topmcorporationlist.getPageNo();
pageSize=topmcorporationlist.getPageSize();
recCount=topmcorporationlist.getRecCount();
recList=topmcorporationlist.getRecList();
recSearch=topmcorporationlist.getRecSearch();
}
int selectID=0;
String selectMsg="";
if(recSearch!=null){
selectID=Integer.parseInt(recSearch.get("selectID").toString());
selectMsg=recSearch.get("selectMsg").toString();
}
int yyyy,mm,dd;
java.util.Calendar c=java.util.Calendar.getInstance();
yyyy=c.get(java.util.Calendar.YEAR);
mm=c.get(java.util.Calendar.MONTH) +1;
dd=c.get(java.util.Calendar.DAY_OF_MONTH);
String fromDate="";
String toDate="";
fromDate=yyyy+"-"+(mm<10?"0":"")+mm+"-"+(dd<10?"0":"")+dd;
toDate=yyyy+"-"+(mm<10?"0":"")+mm+"-"+(dd<10?"0":"")+dd;
if(recSearch!=null){
fromDate=recSearch.get("fromDate").toString();
toDate=recSearch.get("toDate").toString();
}
int pageNum=(recCount+pageSize-1)/pageSize;//总共页数
int i=0;
int j=0;
%>
<script type="text/javascript" src="/calendar.js"></script>
<script language=javascript>
<!--
var CalendarWebControl = new atCalendarControl();
-->
</script>
<script lanaguage="javascript">
<!--
function getStringLength(str){
var num=0;
if (str!=""){
var i;
var s;
for(i=0;i<str.length;i++){
s=str.charCodeAt(i);
if(s-128<0) num=num+1;
else num=num+2;
}
}
return num;
}
function noChecked() {
var i;
if(document.form1.check!=null){
if(document.form1.check.length!=null){
for(i=0;i<document.form1.check.length;i++){
if(document.form1.check[i].checked==true){
return false;
// break;
}
}
}else{
if(document.form1.check.checked==true) return false;
}
return true;
}
}
function getCheckAll(){
var i;
var b=0;
if(document.form1.check!=null){
if(document.form1.check.length!=null){
for(i=0;i<document.form1.check.length;i++){
document.form1.check[i].checked=document.form1.selectAll.checked;
}
}else{
document.form1.check.checked=document.form1.selectAll.checked;
}
}
}
function getAdd(){
document.form1.action="../aopm/aopm002";
document.form1.submit();
return true;
}
function getDelete(){
if(noChecked()){
alert("请选择,批量删除需要选择!");
return false;
}
if(!confirm("确定要删除?")){
return false;
}
document.form1.action="../aopm/aopm005";
document.form1.submit();
return true;
}
function getDeleteOne(){
if(!confirm("确定要删除?")){
return false;
}
return true;
}
function checkDate(){
var sd=document.form1.fromDate.value;
var ed=document.form1.toDate.value;
var sd=sd.split("-");
var ed=ed.split("-");
var startDate=new Date(sd[0],sd[1],sd[2]);
var endDate= new Date(ed[0],ed[1],ed[2]);
if(startDate>endDate){
alert("请选择正确的起始日期与结束日期,结束日期不能早于起始日期!");
return false;
}
return true;
}
function submitOnClick()
{
if(getStringLength(document.form1.selectMsg.value)>50){
alert("请输入正确查询内容,长度不能超过50位!");
document.form1.selectMsg.focus();
return false;
}
if(!checkDate()){
return false;
}
return true;
}
function fanYe(str){
document.form1.pageNo.value=str;
return true;
}
//-->
</script>
</head>
<body leftmargin="0" marginwidth="0" marginheight="0" topmargin="0">
<%@ include file="../aadm/menu.jsp"%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table1">
<tr class="tr1">
<td>您目前正在系统管理-公司部门管理-公司部门列表页面</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0" align="center" class="table2">
<tr class="tr2">
<td>
<form name="form1" action="../aopm/aopm001" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table3">
<tr>
<td>
<%
String str9="";
if(0==selectID) str9=str9+"<option selected value =0>全部</option>";
else str9=str9+"<option value =0>全部</option>";
if(1==selectID) str9=str9+"<option selected value =1>公司部门</option>";
else str9=str9+"<option value =1>公司部门</option>";
%>
类型:
<select name="selectID" class="select1">
<%=str9%>
</select>
信息:<input type="text" name="selectMsg" value="<%=selectMsg%>" maxlength="50" size="20" class="text1">
日期:从 <input type="text" name="fromDate" value="<%=fromDate%>" size=12 readonly class="text1"><a href="javascript:CalendarWebControl.show(document.form1.elements['fromDate'],document.form1.elements['fromDate'].value)">选择日期</a>
-至<input type="text" name="toDate" value="<%=toDate%>" size=12 readonly class="text1"><a href="javascript:CalendarWebControl.show(document.form1.elements['toDate'],document.form1.elements['toDate'].value)">选择日期</a>
<input type="hidden" name="pageNo"><input type="submit" value="查询" onclick = "return submitOnClick()" class="button1">
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table4">
<tr align="right">
<td>
<%if(pageNum>0){%>
第<%=pageNo%>页/共<%=pageNum%>页
<%if(pageNum==1){%>
首页 前页 后页 末页
<%}else{%>
<%if(pageNo==1){%>
首页 前页
<%}else{%>
<a href="javascript:document.form1.submit()" onclick="return fanYe(1)">首页</a> <a href="javascript:document.form1.submit()" onclick="return fanYe(<%=pageNo-1%>)">前页</a>
<%}%>
<%if(pageNo==pageNum){%>
后页 末页
<%}else{%>
<a href="javascript:document.form1.submit()" onclick="return fanYe(<%=pageNo+1%>)">后页</a> <a href="javascript:document.form1.submit()" onclick="return fanYe(<%=pageNum%>)">末页</a>
<%}%>
<%}%>
<%}%>
</td>
</tr>
</table>
<%if(recList!=null && recList.size()>0){%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table5">
<tr align="center" class="tr51">
<td></td>
<td>公司部门名</td>
<td>英文名</td>
<td>公司地址</td>
<td>联系人</td>
<td>状态</td>
<td>编辑</td>
<td>删除</td>
</tr>
<%i=0;
while(i<recList.size()){
int level=1;
int level2=1;
com.sxit.operator.Topmcorporation topmcorporation=(com.sxit.operator.Topmcorporation)recList.get(i);
level=topmcorporation.getLevel();
String str2="┠-";
for(j=0;j<level;j++) {
str2=" "+str2;
}
if(i+1<recList.size()){
com.sxit.operator.Topmcorporation topmcorporation2=(com.sxit.operator.Topmcorporation)recList.get(i+1);
level2=topmcorporation2.getLevel();
}
%>
<tr align="center" class="tr52">
<td></td>
<td align="left"><%=str2+topmcorporation.getCorporationname()%> </td>
<td><%=topmcorporation.getCorpnameen()==null?"":topmcorporation.getCorpnameen()%> </td>
<td><%=topmcorporation.getCorpaddr()==null?"":topmcorporation.getCorpaddr()%> </td>
<td><%=topmcorporation.getContacter()==null?"":topmcorporation.getContacter()%> </td>
<td><%=topmcorporation.getStatusid()==2?"使用":"不用"%> </td>
<td><%if(i!=0){%><a href="../aopm/aopm003?corporationid=<%=topmcorporation.getCorporationid()%>">编辑</a><%}%></td>
<td>
<%if(level2<=level&&i!=0){%>
<a href="../aopm/aopm004?corporationid=<%=topmcorporation.getCorporationid()%>" onclick="return getDeleteOne()">删除</a>
<%}%>
</td>
</tr>
<%
i++;
}
%>
<tr>
<td colspan="49"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table6">
<tr>
<td>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr align="center">
<td><input type="button" value="新增" onclick="return getAdd()" class="button1">
</td>
</tr>
</table>
<%}else{%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="table7">
<tr align="center">
<td>暂时没有公司部门!</td>
</tr>
<tr>
<td> </td>
</tr>
<tr align="center">
<td><input type="button" value="新增" onclick="return getAdd()" class="button1">
</td>
</tr>
</table>
<%}%>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -