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

📄 orderupdate.jsp

📁 电子商城
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" language="java"%>
<%@ taglib prefix="c" uri="/WEB-INF/c.tld" %> 
<%@ taglib prefix="fmt" uri="/WEB-INF/fmt.tld" %>
<c:if test="${orderList==null}">
	<c:redirect url="/servlet/OrderUpdateServlet" />
</c:if>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
		<meta http-equiv="expires" content="Wed, 26 Feb 1970 08:21:57 GMT" />
		<title>订单查看</title>
	</head>
	<script language="javascript" type="text/javascript" src="/lmhshop/font/calendar.js"></script>
	<script language="javascript" type="text/javascript">	
		<!--分页处理-->
		function orderPage(pageNum){
			var pageValue=showForm.curPage.value;
			if(pageNum==1){
				pageValue=1;
			}else if(pageNum==2&&pageValue>1){
				pageValue--;
			}else if(pageNum==3&&pageValue<${totalPage}){
				pageValue++;	
			}else if(pageNum==4){
				pageValue=${totalPage};		
			}
			
			showForm.curPage.value=pageValue;
			showForm.submit();
		}
		function updateOrder(norderID,sendType,spayType){
			var sendObj=document.getElementById("ssendtype_"+norderID);
			var payObj=document.getElementById("spaytype_"+norderID);
			var sendVal="";
			var payVal="";	
			
			if(sendObj!=""){
				sendVal=sendObj.value;
			}
			if(payObj!=""){
				payVal=payObj.value;
			}
			
			var pat=new RegExp("[^a-zA-Z0-9\_\u4e00-\u9fa5]","i"); 
			if(pat.test(sendVal)==true|| pat.test(payVal)==true) 
			{ 
				alert("输入含有非法字符,请输入中英文或数字!");
				if(sendObj!=""){
					sendObj.value=sendType;
				} 
				if(payObj!=""){
					payObj.value=spayType;
				}
				
				return false; 
			}else if(confirm("确认要修改该订单的收发方式?")){
				location.href="/lmhshop/servlet/OrderUpdateServlet?action=update&norderID="+norderID+"&ssendtype="+sendVal+"&spaytype="+payVal;
				return true;
			}

		}
	</script>
<body>
  <c:if test="${empty orderList}">
	<table width="100%" align="center">
				<tr>
					<td align="center">
					<br>
					<br>
					<br>
					<br>
					<strong>对不起,暂无用户订单!</strong>
					<br>
					<br>
					<br>
					<br>
					</td>
				</tr>
	</table>
</c:if>
<c:if test="${!empty orderList}">

<form method="get" action="/lmhshop/servlet/OrderUpdateServlet" name="showForm">
			<input type="hidden" id="curPage" name="curPage" value="${curPage}" />
			<table width="100%" align="center">
				<tr align="center">
					<th width="9%" align="right" nowrap scope="row">
						下单日期:					</th>
				  <th width="12%" align="left" nowrap scope="row">
			  <input name="startDate" type="text" id="startDate" size="15" value="${param.startDate}" onFocus="javascript:{show_cele_date(this,'','',this);}" >
				  </th>
					<th width="2%" align="right" nowrap scope="row">至 </th>
				  <th width="11%" align="left" nowrap scope="row">
				  <input name="endDate" type="text" id="endDate" size="15" value="${param.endDate}" onFocus="javascript:{show_cele_date(this,'','',this);}" >
				  </th>
					<th width="7%" align="right" nowrap scope="row">用户名:					</th>
					<th width="15%" align="left" nowrap scope="row">
		  	      <input name="scuser" type="text" id="scuser" value="${param.scuser}" size="18">				  </th>
					<th width="9%" align="right" nowrap scope="row">商品名:			      </th>
				    <th width="22%" align="left" nowrap scope="row"><input name="smcname" type="text" id="smcname" value="${param.smcname}"></th>
				    <th width="13%" nowrap scope="row">
					<input name="Search" type="submit" id="Search" value="查询" />
					&nbsp; 
			      <input type="reset" name="resetOrder" id="resetOrder"  value="重置" > </th>
				</tr>
  </table>

<table width="100%" border="1" align="center">
                  <tr>
                    <th width="15%" scope="row">订单号</th>
                    <th width="12%" scope="row">用户名</th>
					<th width="12%" scope="row">真实姓名</th>
					<th width="12%" scope="row">发货方式</th>
					<th width="20%" scope="row">下单时间</th>
					<th width="12%" scope="row">汇款方式</th>
                    <th width="12%" scope="row">审核状态</th>
                    <th width="12%" scope="row">操作</th>
                  </tr>
				  <c:forEach items="${orderList}" var="ob">
                  <tr>
                    <th nowrap scope="row">${ob.nid}</th>
					<th nowrap scope="row">${ob.scuser}</th>
                    <th nowrap scope="row">${ob.ssname}</th>
                    <th nowrap scope="row">
					<input name="ssendtype_${ob.nid}" type="text" id="ssendtype" value="${ob.ssendtype}" size="16"></th>
                    <th nowrap scope="row">${ob.dgdate}</th>
                    <th nowrap scope="row">
					<input name="spaytype_${ob.nid}" type="text" id="spaytype" value="${ob.spaytype}" size="16"></th>
                    <th nowrap scope="row">
						<input type="hidden" id="sstatus" name="sstatus" value="${ob.sstatus}" />
					<c:if test="${ob.sstatus==1}">未审核</c:if>
					<c:if test="${ob.sstatus==2}">已通过</c:if>
					<c:if test="${ob.sstatus==3}">未通过</c:if>
					</th>
                    <th nowrap scope="row"><a href="#" onClick="updateOrder(${ob.nid},'${ob.ssendtype}','${ob.spaytype}');">修改</a></th>
                  </tr>
				  </c:forEach>
</table>
<table width="100%" border="1" align="center">
							<tr>
								<td align="center" valign="middle">共有${countAll}条记录数
									&nbsp;&nbsp; |&nbsp; &nbsp;
									 ${curPage}/${totalPage}
								 	&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;
									<c:if test="${curPage!=1}">
									&nbsp;<a href="#" onClick="orderPage(1);return false;">首页</a>
								  	&nbsp; <a href="#" onClick="orderPage(2);return false;">上一页</a>
									</c:if>
									<c:if test="${curPage!=totalPage}">
								 	 &nbsp; <a href="#" onClick="orderPage(3);return false;">下一页</a>
								 	 &nbsp; <a href="#" onClick="orderPage(4);return false;">尾页</a>
								  	</c:if>
							  </td>
							</tr>
</table>

</form>
</c:if>
</body>
</html>

⌨️ 快捷键说明

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