⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 popdepartment.jsp

📁 BI经营分析系统基于Hyperion Analyzer 前端展现层完整代码
💻 JSP
字号:
<html>
<head>
  <title>选择单位</title>
	<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link rel=stylesheet href="../css/style.css" type="text/css">
	<%
	response.setHeader("Cache-Control", "no-store");
	response.setHeader("Pragma", "no-cache");
	%>
</head>

 <body  class=BODY >
<%@ page contentType="text/html;charset=gb2312"
               import="com.boco.shpmcc.util.*,
               					com.boco.shpmcc.actions.*,
               					com.boco.shpmcc.data.*,
               					com.boco.shpmcc.common.*,
                        com.boco.shpmcc.beans.*"
%>
<jsp:useBean id="PopDcOutletAction" scope="session" class="com.boco.shpmcc.actions.PopDcOutletAction" />
<jsp:useBean id="PopGoUpLinkAction" scope="session" class="com.boco.shpmcc.actions.PopGoUpLinkAction" />
<%
ActionData ACTIONDATA = PopDcOutletAction.process(request,response);
PopGoUpLinkAction.procParameter(request,"PARENTID");
String PARENTID  = request.getParameter("PARENTID");
String LEVEL= request.getParameter("LEVEL");

PageCount pageCount = PopDcOutletAction.getPageCount();
Page currentPage = pageCount.getCurrentPage();
int pageno = 0;
int rowCount = 0;
int pagecount = 0;
int pageSize = 0;
String QOUTLETID = PubFunction.charsetConvert(PubFunction.Null2Str(request.getParameter("QOUTLETID")));
String QOUTLETNAME = PubFunction.charsetConvert(PubFunction.Null2Str(request.getParameter("QOUTLETNAME")));
String ACTIONID = request.getParameter("ACTIONID");
if (ACTIONID ==  null) ACTIONID = String.valueOf(ActionMapping.ACTION_QUERY);

String OUTLETTYPE = request.getParameter("OUTLETTYPE");
if (OUTLETTYPE ==  null) OUTLETTYPE = "";

if (pageCount!=null){
  pageno = pageCount.getPage();
  pagecount = pageCount.getTotalPages();
//  pageSize = pageCount.getPageSize();
pageSize = currentPage.getEndRow() - currentPage.getStartRow() + 1;
rowCount = pageCount.getRowCount();
}
%>
<form name="thisForm" method="POST" action="">
<input  type="hidden" name="ACTIONID" value="<%=ACTIONID%>">
<input  type="hidden" name="OUTLETTYPE" value="<%=OUTLETTYPE%>">
<input type="hidden" name="PARENTID" value="<%=PARENTID%>">
<input type="hidden" name="LEVEL" value="<%=LEVEL%>">
<TABLE width="100%" border=0 align="center">
  <TR>
    <TD align=center><b><font size="3">选择单位</font> </b></TD>
  <TR><BR>
    <TD> <b>
      	<font size="2">单位编码
        <input name="QOUTLETID" type="text" class = INPUT id="QOUTLETID" size="15" value="<%=QOUTLETID%>">
        单位名称
        <input name="QOUTLETNAME" type="text" class = INPUT id="QOUTLETNAME" size="15" value="<%=QOUTLETNAME%>">
        <input type="Button" class="BUTTON" name="go" onClick="return quickSearch()" value="快速查询">
      </b></TD>
  <td>
  <%
    String parentId = PopGoUpLinkAction.getParentId();
    String parentUrl = "./popdepartment.jsp?PARENTID=";
    if (parentId!=null&&!parentId.equals("")) {
      parentUrl = parentUrl + parentId;
  	  if (!(OUTLETTYPE.equals(""))) {
		    parentUrl = parentUrl + "&OUTLETTYPE=" + OUTLETTYPE;
	  	}
   %>
   <input type='Button' class='BUTTON' name='goParent' onClick='gotoUrl("<%=parentUrl%>")' value='返回上一级'>
   <%}%>
  </td>
  </tr>
</TABLE>
<table width="100%"  class=CenterTable align=center id=ThisTab>
	<tr class=TopTR>
		<td width="10%" align="center">选择</td>
		<td width="10%" align="center">序号</td>
		<td align=center width="10%">单位代码</td>
		<td align=center width="55%">单位名称</td>
		<td align=center width="25%">直接下属单位</td>
	</tr>
 <%
  if (ACTIONDATA!=null && ACTIONDATA.getTotalRowCount()>0) {
			for(int i=0; i<pageSize;i++){
				System.out.println(ACTIONDATA.getValue(1 ,i,"outletId").length());
%>
<tr class=CenterTr align="center" >
		<td class=RightTD align="center" width="10%" height=25>
		<input <%if(ACTIONDATA.getValue(1 ,i,"outletId").trim().length()!=9) out.print("disabled");%>
		type="radio" class = "radio" id=checkbox1 name=checkbox1></td>
		<td class=RightTD align=left width="10%"><%=i+currentPage.getStartRow()%></td>
		<td class=RightTD align=left width="10%"><%=ACTIONDATA.getValue(1 ,i,"outletId")%></td>
		<td class=RightTD align=left width="55%"><%=ACTIONDATA.getValue(1 ,i,"outletName")%></td>
		<td class=RightTD align=left width="25%">
		<%if(ACTIONDATA.getValue(1,i,"isLeaf").equals("0")){
		  String URL = "popdepartment.jsp?PARENTID=" + ACTIONDATA.getValue(1 ,i,"outletId").trim();
		  if (!(OUTLETTYPE.equals(""))) {
		    URL = URL + "&OUTLETTYPE=" + OUTLETTYPE;
		  }
//		  if (!(LEVEL.equals(""))) {
//		    URL = URL + "&LEVEL=" + LEVEL;
//		  }
		%>
		<a href=<%=URL%>>查看下级</a>
		<%}%>
		</td>
		</tr>
<%   	}
   }
   String url="./popdepartment.jsp?";
%>
</table>
<input type="hidden" name="pageNo" value="<%=pageno%>">
<table width="95%" align="center">
	<tr class=CenterTr><td align=left>第<%=pageno %>页|共<%=pagecount %>页,共计<%=rowCount%>条记录</td>
		<td align=right>
			<a href=# language="javascript" onclick="gotopageno('<%=url%>',1);return false;">首 页</a>|
			<% if (pageno==1){%>
			         上一页|
             <%} else {%>
			<a href=# onclick="gotopageno('<%=url%>',<%=pageno-1%>);return false;">上一页</a>|
			  <%}%>
            <% if (pageno==pagecount){%>
			         下一页|
			<%} else {%>
			<a href=# language="javascript" onclick="gotopageno('<%=url%>',<%=pageno+1%>);return false;">下一页</a>|
			<%}%>

			<a href=# language="javascript" onclick="gotopageno('<%=url%>',<%=pagecount%>);return false;">末 页</a>

			直接查看第<input name="gotopage" size="2" maxlength="4">页
			<a href=# language="javascript" onclick="GotopagenoNo('<%=url%>',<%=pagecount%>);return false;"><B><font size=2>&nbsp;GO&nbsp;</font></B></a>

		</td>
	</tr>
</table>
</form>

<script language="JavaScript">
function GotopagenoNo(url,count) {
  var pageno;
    pageno = document.all("gotopage").value;

	if (isNaN(pageno)) {
			alert("页码不是一个数字。");
			return;
	}
	if (pageno>count || pageno<0) {
			alert("页码超出范围。");
			return;
	}
	document.all("pageNo").value = pageno;
	thisForm.submit();
}
function gotopageno(url,ipageno){
	document.all("pageNo").value = ipageno;
	thisForm.submit();
}

function PushInfo_close(){
	var	ArrCell = new Array();
	for (i = 1; i < ThisTab.rows.length; i++) {
		var ObjRow = ThisTab.rows[i];
		if (ObjRow.cells[0].firstChild.checked) {
			ArrCell[0] = ObjRow.cells[2].innerText;
			ArrCell[1] = ObjRow.cells[3].innerText;
			this.opener.thisForm.OUTLETID.value = ArrCell[0];
			this.opener.thisForm.OUTLETNAME.value = ArrCell[1];
	   }
	}
	ClosePage();
}
function ClosePage(){
	window.close();
}

function quickSearch(){
	if((thisForm.QOUTLETID.value=="")&&(thisForm.QOUTLETNAME.value==""))
	{
		alert("请输入单位编码或单位名称!");
		return;
	}
	document.all("ACTIONID").value=<%=ActionMapping.ACTION_QUICKSEARCH%>;
	document.all("pageNo").value = 0;
	thisForm.submit();
//	var url = "popdepartment.jsp?QOUTLETID=" + thisForm.departmentId.value + "&QOUTLETNAME=" +thisForm.departmentName.value ;
//	window.navigate(url);
}

function gotoUrl(url){
	location.href = url;
}
</script>

<table border="0" width="80%" height="15" align="center">
<tr class=ButtomTable align="center"><td><a onclick="return PushInfo_close();" href="javascript:void()">确 定</a>
&nbsp;&nbsp;
<a onclick="return ClosePage();" href="javascript:void();">关 闭</a></td>
</tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -