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

📄 showorder.jsp

📁 简单实现的商品购物系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page   import="java.util.*,bookshop.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
<title>查询订单详细资料
</title>


<%
     String orderid= request.getParameter("orderid");
       OrderBean xie=new OrderBean();
       String str="select * from consignee where  orderid='"+orderid+"' order by id desc";
       ConsigneeBean xx=new ConsigneeBean();
       ArrayList consignee=    xx.selectConsignee(str);
       ArrayList orders=  xie.selectOrders(orderid);

       request.setAttribute("consignee",consignee);
       request.setAttribute("orders",orders);
%>

<c:set var="connsignee" value="${requestScope.consignee}" scope="page"/>
<c:set var="orders" value="${requestScope.orders}" scope="page"/>
<style type="text/css">
<!--
.style1 {font-size: 24px;
	font-weight: bold;
	color: #FF0000;
}
.style3 {font-size: 16px}
-->
</style>
<body bgcolor="#799AE1">
<table width=100% height="28" border=1 cellpadding=0 cellspacing=0 bordercolor=#6a7f9a background="image/1.gif" style="border-collapse:collapse;" >
  <tr>
    <td height=25 align=center><span class="style1"> <img src="image/v001.jpg" width="19" height="16"> <span class="style3">更新订单</span></span></td>
  </tr>
</table>
<br>
<form action="updateOrder.jsp?action=update&orderid=<%=orderid%>" method="post">
<c:forEach var="myuser" items="${connsignee}" >
<table width=100% border="01" align=center cellspacing="2" bordercolor="#6a7f8a" bgcolor="#edecf4" >
  <tr>
    <td width="30%" height="30"><font size=2>订单编号: </font><font size=2 color="red"><u><%=orderid%></font></td>
    <td width="40%"><font size=2>下单日期: ${myuser.submittime}</font> </td>
    <td width="30%"><font size=2>发货日期:${myuser.consigndate}</font></td>
  </tr>
</table>

<table width="100%" height="29" border=1 align=center
  cellspacing=0 bordercolor=#edecf4 bgcolor="#FFFFFF" style="border-collapse:collapse">
   <tr >
	 <td width=51% align=center height=20><font size=2 color=#333333>收货人详细资料</font></td>

  </tr>
</table>


  <table width="100%" height="160" border=1 align=center
  cellspacing=2 bordercolor=#6a7f9a bgcolor="#FFFFFF" style="border-collapse:collapse">
    <tr >
      <td width=30% height="29" align=center><font size=2>收货人姓名:</font></td>
      <td width=24% align=center><font size=2>${myuser.consignName}</font></td>
      <td width=23% align=center><font size=2>性&nbsp;&nbsp;&nbsp;别:</font></td>
      <td width=23% align=center><font size=2>${myuser.sex}</font></td>
    </tr>
    <tr >
      <td width=30% height="32" align=center><font size=2>OICQ号码:</font></td>
      <td align=center><font size=2>${myuser.qq}</font></td>
      <td align=center><font size=2>邮&nbsp;&nbsp;&nbsp;编:</font></td>
      <td align=center><font size=2>${myuser.zip}</font></td>
    </tr>
    <tr >
      <td width=30% height="26" align=center><font size=2>E-MAIL地址:</font></td>
      <td align=center><font size=2>${myuser.email}</font></td>
      <td align=center><font size=2>付款方式</font>:</td>
      <td align=center><font size=2>${myuser.payclass}</font></td>
    </tr>
    <tr >
      <td width=30% height="28" align=center><font size=2>联系电话:</font></td>
      <td align=center width=24%><font size=2>${myuser.tel}</font></td>
      <td width=23% align=center><font size=2>付款状态:</font></td>
      <td width=23% align=center><font size=2>
        <select name="txtispay" id="txtispay">


        	<c:choose>
        <c:when test="${myuser.ispay=='已付款'}">
          <option selected value="已付款">已付款</option>
          <option value="未付款">未付款</option>
        </c:when>
         <c:otherwise>
            <option selected value="未付款">未付款</option>
            <option value="已付款">已付款</option>
         </c:otherwise>

	</c:choose>
        </select>
</font></td>
    </tr>
    <tr >
      <td width=30% align=center><font size=2>收货人地址:</font></td>
      <td align=center><font size=2>${myuser.address}</font></td>
      <td align=center><font size=2>发货状态</font>:</td>
      <td align=center>        <font size=2>
        <select name="txtissales" id="txtissales">
	<c:choose>
        <c:when test="${myuser.issales=='未发货'}">
         <option  selected value="未发货">未发货</option>
         <option  value="已发货">已发货</option>

        </c:when>
         <c:otherwise>
          <option selected value="已发货">已发货</option>
         <option   value="未发货">未发货</option>

         </c:otherwise>

	</c:choose>

                </select>
      </font></td>
    </tr>
</table>
</c:forEach>
<table width="100%" height="29" border=1 align=center
  cellspacing=0 bordercolor=#edecf4 bgcolor="#FFFFFF" style="border-collapse:collapse">
  <tr >
    <td width=51% align=center height=20><font size=2 color=#333333>图书详细资料</font></td>
  </tr>
</table>
<table width=100% height="30" border=1 align=center cellpadding=0 cellspacing=2 bordercolor=#6a7f8a bgcolor="#edecf4" style="border-collapse:collapse;" >
    <tr>
      <td height=24 width=30% align=center><font size=2>图书名称</font></td>
      <td width=24% align=center><font size=2>图书单价</font></td>
      <td width=23% align=center><font size=2>订购数量</font></td>
      <td width=22% align=center><font size=2>应付金额 </font></td>
    </tr>
  </table>
  <c:set var="sum" scope="page" /> <c:set var="count" scope="page" />
<table width="100%" border=1 align=center
  cellspacing=2 bordercolor=#6a7f9a bgcolor="#FFFFFF" style="border-collapse:collapse">
      <c:forEach var="myorder" items="${orders}">
    <tr >
      <td width=31% height="25" align=center><font size=2>${myorder.ordername}</font></td>
      <td width=24% align=center><font size=2>${myorder.price}</font></td>
      <td width=22% align=center><font size=2>${myorder.amount}</font></td>
      <td width=23% align=center><font size=2>${myorder.totalprice}</font></td>
     <c:set var="sum" value="${sum+myorder.totalprice}" scope="page"/>
	   <c:set var="count" value="${count+myorder.amount}" scope="page"/>
	  </tr>
  </c:forEach>
    <tr>
      <td colspan=4 align=right><div align="right"><font size=2>
        <input name="imageField" type="image" src="image/sendorder.gif" width="61" height="20" border="0">
      &nbsp;&nbsp;图书总数:</font><font size=2 color=red>${count}</font>(本) &nbsp;&nbsp;总金额:<font size=2 color=red> </font><font size=2 color=red></font><font size=2 color=red><fmt:formatNumber  var="mysum" value="${sum}" type="currency"/>${mysum}</font>元</div></td>
    </tr>
</table>
<br>
</form>
</body>
</html>


⌨️ 快捷键说明

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