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

📄 search.jsp

📁 本文论述了一个前台笔记本销售系统的开发过程
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%@ page import="com.set.appframe.data.GenericValueObject"%>
<%@ page import="com.set.utils.WebUtils"%>
<%
	List dbList = (List) request.getAttribute("GVOLIST");
	int totalPage = 0;
	int pageNo = 0;
	int totalRecords = 0;
	String PagerString;
	totalPage = ((Integer) request.getAttribute("TotalPage"))
			.intValue();
	totalRecords = ((Integer) request.getAttribute("TotalRecords"))
			.intValue();
	pageNo = ((Integer) request.getAttribute("PageNo")).intValue();
	PagerString = (String) request.getAttribute("PagerString");
%>
<html>
	<head>
		<title>我的订单</title>
		<LINK href="../css/set.css" type=text/css rel=stylesheet>
	</head>
	<script type="text/javascript">
	function onSearch(){
	   document.location.href="/leave/LeaveAction.do?dispatch=search";
	}
    function goSearch()
	{
		document.all("dispatch").value="search";
		document.all("frmPage").submit();
	}
    function onPreviousPage(){
		document.all("ActionID").value="PreviousPage";
		document.all("dispatch").value="search";
//		initSearchCriteria();
		document.all("frmPage").submit();
	}

	function onFirstPage(){
		document.all("ActionID").value="FirstPage";
		document.all("dispatch").value="search";
//		initSearchCriteria();
		document.all("frmPage").submit();
	}

	function onLastPage(){
		document.all("ActionID").value="LastPage";
		document.all("dispatch").value="search";
//		initSearchCriteria();
		document.all("frmPage").submit();
	}

	function onNextPage(){
		document.all("ActionID").value="NextPage";
		document.all("dispatch").value="search";
//		initSearchCriteria();
		document.all("frmPage").submit();
	}

	function onGoTo(pageindex)
	{
	 
			document.all("ActionID").value="GoPageNo";
			document.all("ctlGoPageNo").value=pageindex;
			document.all("dispatch").value="search";
	//		initSearchCriteria();
			document.all("frmPage").submit();
		
	}
	function onGoPageNo() {
     	gOnlyNumeric(false,false);//call only input numeric value.

		if (event.keyCode==13) {
			
			if ((document.all("ctlGoPageNo").value <= 0) || ((document.all("ctlGoPageNo").value - document.all("ctlTotalPage").value) >0)
		  	|| (document.all("ctlGoPageNo").value == document.all("ctlPageNo").value)){
		  	alert("请输入正确的页数!");
		  	return false;
		}
		document.all("ActionID").value="GoPageNo";document.all("ctlPageNo").value=document.all("ctlGoPageNo").value;
		document.all("dispatch").value="search";
//		initSearchCriteria();
		document.all("frmPage").submit();
		}
	}
	function remove(entity){
	   
	    if(confirm("确实要删除该记录吗?"))
		{			
		   document.location.href="/order/OrderAction.do?dispatch=remove&id="+entity;
		}
	}
	function view(entity){
	    document.location.href="/order/OrderAction.do?dispatch=view&id="+entity;
	}
	
	</script>
	<body text=#000000 leftMargin=0 background="image/background.gif"
		topMargin=0 marginheight="0" marginwidth="0">

		<jsp:include page="../common/Top_head.jsp?tab=menuKey4" flush="false"></jsp:include>
		<table width="100%">
			<tr>
				<td width="10%" align="center" valign="top">
					<jsp:include page="../home/load.jsp"></jsp:include><p>
						<jsp:include page="../home/search.jsp"></jsp:include>
				</td>
				<td valign=top>
					<form action="/order/OrderAction.do" method=post name="frmPage">
						<input type=hidden name="dispatch" value="search">
						<input name="ActionID" type="hidden" value="search">
						<input type="hidden" name="ctlTotalPage" value=<%=totalPage%>>
						<input type="hidden" name="ctlPageNo" value=<%=pageNo%>>
						<input type="hidden" name="ctlGoPageNo">
						<table align=center width="90%" height="74" border="0"
							cellpadding="0" cellspacing="0">


							<tr>
								<td width="14%">
									<div align="center">
										<strong>订单号</strong>
									</div>
								</td>
								<td width="21%">
									<div align="center">
										<strong>生成时间</strong>
									</div>
								</td>
								<td width="16%">
									<div align="center">
										<strong>总价</strong>
									</div>
								</td>
								<td width="13%">
									<div align="center">
										<strong>是否处理</strong>
									</div>
								</td>
								<td width="19%">
									&nbsp;
								</td>
								<td width="17%">
									&nbsp;
								</td>

							</tr>
							<tr><td>&nbsp;</td></tr>
							<%
							    String state="";
								String remove="";
								if (null != dbList) {
									Iterator it = dbList.iterator();
									GenericValueObject gvo;
									for (int j = 0; it.hasNext(); j++) {
										gvo = (GenericValueObject) it.next();
										
										if(gvo.getItemString("STATE").equals("0")){
										    state="否";
										    remove="删除";
										}else{
										    state="是";
										}
																				
							%>
							<tr>
								<td align="center">
									<%=gvo.getItemString("ID") %>
								</td>
								<td align="center">
									<%=gvo.getItemString("CREATEDDATE") %>
								</td>
								<td align="center">
									<%=gvo.getItemString("TOTALPRICE") %>
								</td>
								<td align="center">
									<%=state %>
								</td>
								<td align="center">
									<a href="javascript:view('<%=gvo.getItemString("ID") %>');">浏览详细订单信息
								</td>
								<td align="center">
									<a href="javascript:remove('<%=gvo.getItemString("ID") %>');"><%=remove %></a>
								</td>

							</tr>
							<tr><td>&nbsp;</td></tr>
							<%
								}
								}
							%>

						</table>
					
					 <span style="font-size: 14px">
	  <center>
	    <p>
          <%String str=WebUtils.getGooglePagerString(totalPage,pageNo);
	  out.println(str);
	   %>
        </p>
	  </center>
      </span>
      </form>
				</td>
			</tr>

		</table>
		<jsp:include page="../home/bottom.jsp" flush="false"></jsp:include>
	</body>
</html>

⌨️ 快捷键说明

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