123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- <%@ page language="java" pageEncoding="UTF-8"%>
- <HTML>
- <HEAD>
- <meta http-equiv="Content-Language" content="zh-cn">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <link href="${pageContext.request.contextPath}/css/Style1.css" rel="stylesheet" type="text/css" />
- <script language="javascript" src="${pageContext.request.contextPath}/js/public.js"></script>
- <script type="text/javascript">
- function showDetail(oid){
- var but = document.getElementById("but"+oid);
- var div1 = document.getElementById("div"+oid);
- if(but.value == "订单详情"){
- // 1.创建异步对象
- var xhr = createXmlHttp();
- // 2.设置监听
- xhr.onreadystatechange = function(){
- if(xhr.readyState == 4){
- if(xhr.status == 200){
-
- div1.innerHTML = xhr.responseText;
- }
- }
- }
- // 3.打开连接
- xhr.open("GET","${pageContext.request.contextPath}/adminOrder_findOrderItem.action?oid="+oid+"&time="+new Date().getTime(),true);
- // 4.发送
- xhr.send(null);
- but.value = "关闭";
- }else{
- div1.innerHTML = "";
- but.value="订单详情";
- }
-
- }
- function createXmlHttp(){
- var xmlHttp;
- try{ // Firefox, Opera 8.0+, Safari
- xmlHttp=new XMLHttpRequest();
- }
- catch (e){
- try{// Internet Explorer
- xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
- }
- catch (e){
- try{
- xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
- }
- catch (e){}
- }
- }
- return xmlHttp;
- }
- </script>
- </HEAD>
- <body>
- <br>
- <form id="Form1" name="Form1" action="${pageContext.request.contextPath}/user/list.jsp" method="post">
- <table cellSpacing="1" cellPadding="0" width="100%" align="center" bgColor="#f5fafe" border="0">
- <TBODY>
- <tr>
- <td class="ta_01" align="center" bgColor="#afd1f3">
- <strong>订单列表</strong>
- </TD>
- </tr>
-
- <tr>
- <td class="ta_01" align="center" bgColor="#f5fafe">
- <table cellspacing="0" cellpadding="1" rules="all"
- bordercolor="gray" border="1" id="DataGrid1"
- style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; WIDTH: 100%; WORD-BREAK: break-all; BORDER-BOTTOM: gray 1px solid; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #f5fafe; WORD-WRAP: break-word">
- <tr
- style="FONT-WEIGHT: bold; FONT-SIZE: 12pt; HEIGHT: 25px; BACKGROUND-COLOR: #afd1f3">
- <td align="center" width="10%">
- 序号
- </td>
- <td align="center" width="10%">
- 订单编号
- </td>
- <td align="center" width="10%">
- 订单金额
- </td>
- <td align="center" width="10%">
- 收货人
- </td>
- <td align="center" width="10%">
- 订单状态
- </td>
- <td align="center" width="50%">
- 订单详情
- </td>
- </tr>
- <s:iterator var="o" value="pageBean.list" status="status">
- <tr onmouseover="this.style.backgroundColor = 'white'"
- onmouseout="this.style.backgroundColor = '#F5FAFE';">
- <td style="CURSOR: hand; HEIGHT: 22px" align="center"
- width="18%">
- <s:property value="#status.count"/>
- </td>
- <td style="CURSOR: hand; HEIGHT: 22px" align="center"
- width="17%">
- <s:property value="#o.oid"/>
- </td>
- <td style="CURSOR: hand; HEIGHT: 22px" align="center"
- width="17%">
- <s:property value="#o.total"/>
- </td>
- <td style="CURSOR: hand; HEIGHT: 22px" align="center"
- width="17%">
- <s:property value="#o.name"/>
- </td>
- <td style="CURSOR: hand; HEIGHT: 22px" align="center"
- width="17%">
- <s:if test="#o.state==1">
- 未付款
- </s:if>
- <s:if test="#o.state==2">
- <a href="${ pageContext.request.contextPath }/adminOrder_updateState.action?oid=<s:property value="#o.oid"/>"><font color="blue">发货</font></a>
- </s:if>
- <s:if test="#o.state==3">
- 等待确认收货
- </s:if>
- <s:if test="#o.state==4">
- 订单完成
- </s:if>
-
- </td>
- <td align="center" style="HEIGHT: 22px">
- <input type="button" value="订单详情" id="but<s:property value="#o.oid"/>" onclick="showDetail(<s:property value="#o.oid"/>)"/>
- <div id="div<s:property value="#o.oid"/>">
-
- </div>
- </td>
-
- </tr>
- </s:iterator>
- </table>
- </td>
- </tr>
- <tr align="center">
- <td colspan="7">
- 第<s:property value="pageBean.page"/>/<s:property value="pageBean.totalPage"/>页
- <s:if test="pageBean.page != 1">
- <a href="${ pageContext.request.contextPath }/adminOrder_findAll.action?page=1">首页</a>|
- <a href="${ pageContext.request.contextPath }/adminOrder_findAll.action?page=<s:property value="pageBean.page-1"/>">上一页</a>|
- </s:if>
- <s:if test="pageBean.page != pageBean.totalPage">
- <a href="${ pageContext.request.contextPath }/adminOrder_findAll.action?page=<s:property value="pageBean.page+1"/>">下一页</a>|
- <a href="${ pageContext.request.contextPath }/adminOrder_findAll.action?page=<s:property value="pageBean.totalPage"/>">尾页</a>|
- </s:if>
- </td>
- </tr>
- </TBODY>
- </table>
- </form>
- </body>
- </HTML>
|