searchauditedorg.jsp
来自「java jsp教程」· JSP 代码 · 共 320 行
JSP
320 行
<!-- edit by lyf-->
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.icss.cnpc.util.*" %>
<%@ page import="com.icss.cnpc.plan.vo.*" %>
<%@ taglib uri="/WEB-INF/runqianReport.tld" prefix="report"%>
<%@ page session="true" import="java.lang.StringBuffer,com.runqian.report.usermodel.*"%>
<%@ page import="com.icss.cnpc.util.Config" %>
<%
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
%>
<%
String root = request.getContextPath();
String search=request.getParameter("search");
if(search==null)
search="";
String orgname=(String)request.getAttribute("orgname");
if(orgname==null)
orgname="";
%>
<HTML><HEAD><TITLE>被审单位查询</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%=root%>/css/style.css">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
<style type="text/css">
<!--
.style5 {font-size: 16px; font-weight: bold; }
.style1 {font-size: 16px}
.style2 { font-size: 12px;
font-weight: bold;
}
-->
</style>
</HEAD>
<script type="text/javascript" src="<%=root%>/common/codeDict.js"></script>
<script type="text/javascript" src="<%=root%>/common/xtree.js"></script>
<script type="text/javascript" src="<%=root%>/common/xmlextras.js"></script>
<script type="text/javascript" src="<%=root%>/common/xloadtree.js"></script>
<script type="text/javascript" src="<%=root%>/common/common.js"></script>
<script type="text/javascript">
webFXTreeConfig.rootIcon = "<%=root%>/images/xp/folder.png";
webFXTreeConfig.openRootIcon = "<%=root%>/images/xp/openfolder.png";
webFXTreeConfig.folderIcon = "<%=root%>/images/xp/folder.png";
webFXTreeConfig.openFolderIcon= "<%=root%>/images/xp/openfolder.png";
webFXTreeConfig.fileIcon = "<%=root%>/images/xp/file.png";
webFXTreeConfig.lMinusIcon = "<%=root%>/images/xp/Lminus.png";
webFXTreeConfig.lPlusIcon = "<%=root%>/images/xp/Lplus.png";
webFXTreeConfig.tMinusIcon = "<%=root%>/images/xp/Tminus.png";
webFXTreeConfig.tPlusIcon = "<%=root%>/images/xp/Tplus.png";
webFXTreeConfig.iIcon = "<%=root%>/images/xp/I.png";
webFXTreeConfig.lIcon = "<%=root%>/images/xp/L.png";
webFXTreeConfig.tIcon = "<%=root%>/images/xp/T.png";
webFXTreeConfig.blankIcon = "<%=root%>/images/xp/blank.png";
</script>
<SCRIPT language=JavaScript>
function popUpCalendarDlg(ctrlobj) {
showx = event.screenX - event.offsetX - 4 - 210 ; // + deltaX;
showy = event.screenY - event.offsetY + 18; // + deltaY;
newWINwidth = 210 + 4 + 18;
retval = window.showModalDialog("../include/date.htm", "", "dialogWidth:220px; dialogHeight:220px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scroll:no;Resizable:no; " );
if( retval != null ){
ctrlobj.value = retval;
}
}
function selectUnit()
{
wx=200;
wy=200;
urlstr="<%=request.getContextPath()%>/jsp/advancesearch/auditedtree.jsp?nameField=auditedOrgName&idField=auditedOrgCode";
x=(window.screen.width-wx)/2;
y=(window.screen.height-wy)/2;
wposition=",left="+x+",top="+y;
window.open(urlstr,"选择单位","width="+wx+",height="+wy+",scrollbars=yes,status=no"+wposition);
}
function showunitinfo(unitCode)
{
wx=600;
wy=400;
urlstr="<%=request.getContextPath()%>/servlet/ViewAuditedOrgInfoServlet?auditedorgid="+unitCode;
x=(window.screen.width-wx)/2;
y=(window.screen.height-wy)/2;
wposition=",left="+x+",top="+y;
window.open(urlstr,"","width="+wx+",height="+wy+",scrollbars=yes,status=no"+wposition);
}
function selectAuditingUnit() {
wx=200;
wy=200;
urlstr="<%=request.getContextPath()%>/jsp/advancesearch/auditingtree.jsp";
x=(window.screen.width-wx)/2;
y=(window.screen.height-wy)/2;
wposition=",left="+x+",top="+y;
window.open(urlstr,"选择单位","width="+wx+",height="+wy+",scrollbars=yes,status=yes"+wposition);
}
function fillCode(codeField, nameField, codeDiv, code, name)
{
eval("document.form1." + codeField ).value =code;
eval("document.form1." + nameField ).value =name;
document.getElementById(codeDiv).style.display="none";
}
</SCRIPT>
<BODY text="#000000" leftMargin="0" background="<%=root%>/images/grid.gif" topMargin="10"><!-- onmousemove="checkdwlbhideUserMenu()" -->
<form name="form1" method="post" >
<input type="hidden" name="search" value="search">
<TR>
</td>
</tr>
</TBODY>
</TABLE>
<table width=98% border="0" cellspacing="1" cellpadding="4" bgcolor="#426199" align=center>
<TR bgcolor="#a6d0f2">
<TD colspan="6" height=30 align=middle>
<div align="center" size="6">
<font size="2" color="red">被审单位 </font>查询条件</font>
</div>
</TD>
</TR>
<tr bgcolor="#a6d0f2">
<td width="130" height="10" align="left"><div align="right">被审计单位:</div></td>
<TD width="200" bgcolor="#a6d0f2"><div align="left">
<%
//String xAuditedOrgCode = request.getParameter("auditedOrgCode");
//if (xAuditedOrgCode==null) {
// xAuditedOrgCode = "";
//}
String xAuditedOrgName = request.getParameter("auditedOrgName");
if (xAuditedOrgName == null) {
xAuditedOrgName = "";
}
%>
<input name="auditedOrgName" value="<%=xAuditedOrgName%>" type="text" style="background:white" size="20" maxlength="32" class="inp1">
</TD>
<%
String totalAsset = request.getParameter("totalAsset");
if (totalAsset==null) {
totalAsset = "";
}
%>
<TD width="125" bgcolor="#a6d0f2"><div align="right">资产总额大于:</div></TD>
<TD width="173" bgcolor="#a6d0f2"><div align="left">
<input class="inp1" name="totalAsset" type="text" id="projectname" style="background:white" value="<%=totalAsset%>" size="15">
</div></TD>
<%
String dwlb = request.getParameter("dwlb");
if (dwlb==null) {
dwlb = "";
}
String dwlbCode = request.getParameter("dwlbCode");
if (dwlbCode == null) {
dwlbCode = "";
}
%>
<TD width="122"><div align="right">单位类别:</div></TD>
<TD width="214" bgcolor="#a6d0f2"><div align="left">
<input class="inp1" name="dwlb" type="text" id="dwlb" value="<%=dwlb%>" size="20" maxlength="255" readonly >
<input type="hidden" name="dwlbCode" value="<%=dwlbCode%>">
<img src="<%=root%>/images/fuction.gif" width="22" height="13" style="cursor:hand;" class="bt1" onClick="showDiv('dwlbdiv')">
</div></TD>
</tr>
<tr bgcolor="#a6d0f2">
<td height="20" align="left"><div align="right">所属审计单位:</div></td>
<%
String xAuditingOrgCode = request.getParameter("auditingOrgId");
if (xAuditingOrgCode==null) {
xAuditingOrgCode="";
}
String xAuditingOrgName = request.getParameter("auditingOrgName");
if (xAuditingOrgName==null) {
xAuditingOrgName = "";
}
%>
<td bgcolor="#a6d0f2" >
<div align="left">
<input type="hidden" name="auditingOrgId" value="<%=xAuditingOrgCode%>">
<input type="text" name="auditingOrgName" value="<%=xAuditingOrgName%>" size="20">
<img src="<%=root%>/images/icon-15.gif" alt="选择审计单位" name="unit" width="22" height="15" class="bt1" style="cursor:hand;" onClick="selectAuditingUnit()"> </div>
</td>
<td colspan="4" bgcolor="#a6d0f2" ><div align="right"></div>
<div align="left">
</div>
</td>
</tr>
</table>
<div align="center"><br>
<img src="<%=root%>/images/search.gif" name="Submit" style="cursor:hand;" alt="查 询" class="bt1" onclick="query()" >
<img src="<%=root%>/images/chzh.gif" name="Clear" style="cursor:hand;" alt="清空查询条件" class="bt1" onclick="_clear()" >
</div>
</form>
<TABLE cellSpacing=0 cellPadding=0 width="98%" align=center border=0>
<TBODY>
<TR>
<%if(search.equals("search")){%>
<%
String defaultorgclause=(String)request.getAttribute("defaultorgclause");
System.out.println("defaultorgclause=="+defaultorgclause);
StringBuffer param=new StringBuffer();
StringBuffer clause=new StringBuffer();
clause.append(" 1=1 ");
//if(xAuditedOrgCode!=null && !xAuditedOrgCode.equals(""))//被审单位编码
// clause.append(" and A.unitcode = '"+xAuditedOrgCode+"'");
//被审计单位的模糊查询
if(xAuditedOrgName!=null && !xAuditedOrgName.equals(""))
clause.append(" and A.unitname like '%"+xAuditedOrgName+"%'");
if(totalAsset!=null && !totalAsset.equals(""))//被审单位资产总额
clause.append(" and A.assets > "+totalAsset);
if(dwlbCode!=null && !dwlbCode.equals(""))//单位类别
clause.append(" and instr(A.orgtype,'"+dwlbCode+"')=1 ");
if(defaultorgclause!=null && !defaultorgclause.equals(""))
clause.append(defaultorgclause);
clause.append(" and A.isaudit='0' and A.orgstate='0' ");
param.append("clause=\""+clause.toString()+"\";");
System.out.println("orgname====="+orgname);
if(orgname!=null && !orgname.equals(""))
param.append("orgname=\""+orgname+"\";");
%>
<TD align=middle width="100%" >
<report:html name="reprot2" reportFileName="searchauditedorg.raq"
width="810"
height="600"
funcBarLocation="bottom"
needPageMark="yes"
separator=" "
needSaveAsExcel="yes"
needSaveAsPdf="no"
needPrint="no"
firstPageLabel="第一页"
prevPageLabel="上一页"
nextPageLabel="下一页"
lastPageLabel="最后页"
pageMarkLabel="第{currpage}页/共{totalPage}页"
printLabel="打印"
generateParamForm="no"
displayNoLinkPageMark="yes"
canModifyBeforePrint="yes"
params="<%=param.toString()%>"
submit="提交到服务器"
needOfflineInput="yes"
needImportExcel="yes"
excelPageStyle="0"
importExcelLabel="导入excel"
/><%}%>
</TD>
</TR>
</TBODY>
</TABLE>
<div id=dwlbdiv style="position:absolute;display:none; left:250px; top:177px; width:180px; z-index:901; height: 150px;" onmouseover="this.style.display='block'" onMouseOut="this.style.display='none'">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#EEFFF7">
<td height="150" valign="top">
<script>
var tree = new WebFXLoadTree("单位类别", "<%=request.getContextPath()%>/servlet/TcodeXmlTreeServlet?code=dwlb&codeField=dwlbCode&nameField=dwlb&divId=dwlbdiv&type=1");
document.write(tree);
</script>
</td>
</tr>
</table>
</div>
<script>
function query()
{
if(!check_isNum()){return false;}
document.form1.action = "<%=root%>/servlet/SearchAuditedOrgServlet";
document.form1.submit();
}
function check_isNum()
{
if(document.form1.totalAsset.value != ""){
if(document.form1.totalAsset.value !=""){
for(var i = 0;i < document.form1.totalAsset.value.length;i++){
if(!(document.form1.totalAsset.value.charCodeAt(i) >= 48 && document.form1.totalAsset.value.charCodeAt(i) <= 57)){
alert("资产总额请填写数字信息!");
document.form1.totalAsset.focus();
return false;
}
}
}
}
return true;
}
function _clear()
{
document.form1.auditedOrgName.value = "";
document.form1.auditingOrgId.value = "";
document.form1.auditingOrgName.value = "";
document.form1.totalAsset.value = "";
document.form1.dwlb.value = "";
document.form1.dwlbCode.value = "";
}
function showDiv(divId) {
drag(eval(divId));
var x = event.clientX;
var y = event.clientY;
eval("document.all." + divId).style.posLeft=x-180;
eval("document.all." + divId).style.posTop=y;
eval("document.all." + divId).style.visibility="visible";
document.getElementById(divId).style.display="block";
}
</script>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?