indentlist.jsp
资源名称:shop.rar [点击查看]
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:6k
源码类别:
Applet
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312" %>
- <%@ page session="true" %>
- <%
- if (session.getAttribute("user")==null || session.getAttribute("user")==""){
- response.sendRedirect("error.htm");
- } %>
- <%@ page import="MyFly.Book.*" %>
- <%@ page import="MyFly.Book.strFormat" %>
- <jsp:useBean id="myIndentlist" scope="page" class="MyFly.Book.Purchase" />
- <jsp:useBean id="mybook" scope="page" class="MyFly.Book.bookmn" />
- <jsp:useBean id="customerBean" class="MyFly.Bean.customerBean" scope="page"/>
- <%
- String mesg = "";
- long Id=0;
- String submit= request.getParameter("submit");
- if (submit!=null && !submit.equals("")){
- if (myIndentlist.update(request))
- mesg = "更新订单状态成功!";
- else
- mesg = "更新订单状态出错!";
- }
- if (request.getParameter("indentid")==null || request.getParameter("indentid").equals("")) {
- mesg = "你要查看的订单清单不存在!";
- } else {
- try {
- Id = Long.parseLong(request.getParameter("indentid"));
- if (!myIndentlist.getOneIndent(Id) || !myIndentlist.getIndentList(Id)){
- mesg = "你要查看的订单清单不存在!";
- }
- } catch (Exception e){
- mesg = "你要查看的订单清单不存在!";
- }
- }
- %>
- <html>
- <head>
- <title>网上书店管理系统 查看订购清单资料</title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <script language="javascript">
- function openScript(url,name, width, height){
- var Win = window.open(url,name,'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
- }
- </script>
- <link rel="stylesheet" href="books.css" type="text/css">
- </head>
- <body bgcolor="#799ae1" text="#000000" onload="javascript:window.focus();" >
- <div align="center">
- <% if(!mesg.equals("")){
- out.println(mesg);
- } else {
- Indent Ident = (Indent) myIndentlist.getMy_indent().elementAt(0);
- %>
- <p>好易多书店图书订单<%= Ident.getIndentNo() %> 清单:</p>
- <table width="95%" border="1" cellspacing="1" cellpadding="1" bordercolor="#CC9966">
- <tr align="center">
- <td>图书名称</td>
- <td>作者</td>
- <td>作者</td>
- <td>图书类别</td>
- <td>单价(元)</td>
- <td>数量</td>
- </tr>
- <%
- float totalprice =0;
- int totalamount = 0;
- for (int i=0; i<myIndentlist.getIndent_list().size();i++){
- Indentlist idList = (Indentlist) myIndentlist.getIndent_list().elementAt(i);
- if (mybook.getOnebook(String.valueOf(idList.getBookNo())) ){
- Books bk = (Books) mybook.getBooklist().elementAt(0);
- %>
- <tr align="center">
- <td><%= bk.getProductName() %></td>
- <td><%= bk.getAuthor() %></td>
- <td><%= bk.getPublish() %></td>
- <td><%= bk.getCharacterID() %></td>
- <td><%= bk.getMarketPrice() %></td>
- <td><%= idList.getAmount() %></td>
- </tr>
- <%
- totalprice = totalprice + bk.getPreferPrice() * idList.getAmount();
- totalamount = totalamount + idList.getAmount();
- } %>
- <% }%><tr align="center">
- <td colspan=5 >购买的总金额是:<%= totalprice %>元,加上邮资是<%=Ident.getTotalPrice()%> 总数量是<%= totalamount%>本</td> </tr>
- </table>
- <br>
- <table width="95%" border="1" cellspacing="2" cellpadding="1" bordercolor="#CC9966">
- <tr>
- <td width="40%" align="right">下单用户:</td>
- <% String ni=String.valueOf(Ident.getUserId());
- customerBean.getNew(Integer.parseInt(ni)); %>
- <td width="60%">
- <a href=# onClick="javascript:window.open('../anli/customerManageView.jsp?index=<%=Ident.getUserId()%>','','width=650,height=400,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"><font color="#FF0000"><%=customerBean.getUserName() %></font></a>
- </td>
- </tr>
- <tr>
- <td width="40%" align="right">下单时间:</td>
- <td width="60%"><%= Ident.getSubmitTime() %></td>
- </tr>
- <tr>
- <td width="40%" align="right">交货时间:</td>
- <td width="60%"><%= Ident.getConsignmentTime() %> </td>
- </tr>
- <tr>
- <td width="40%" align="right">总金额:</td>
- <td width="60%"><%= Ident.getTotalPrice() %> </td>
- </tr>
- <tr>
- <td width="40%" align="right">下单时IP:</td>
- <td width="60%"><%= Ident.getIPAddress() %> </td>
- </tr>
- <tr>
- <td width="40%" align="right">用户备注:</td>
- <td width="60%"><%= strFormat.toHtml(Ident.getContent()) %> </td>
- </tr>
- <form name="form1" method="post" action="indentlist.jsp" >
- <tr>
- <td width="40%" align="right">是否付款:</td>
- <td width="60%">
- <input type="radio" name="payoff" value="1" <%if (!Ident.getIsPayoff()) out.print("checked") ; %>>
- 否<input type="radio" name="payoff" value="2" <%if (Ident.getIsPayoff()) out.print("checked") ; %>>
- 是</td>
- </tr>
- <tr>
- <td width="40%" align="right">是否交货:</td>
- <td width="60%">
- <input type="radio" name="sales" value="1" <%if (!Ident.getIsSales()) out.print("checked") ; %>>
- 否<input type="radio" name="sales" value="2" <%if (Ident.getIsSales()) out.print("checked") ; %>>
- 是</td>
- </tr>
- <tr>
- <td width="40%" align="right">付款方式:</td>
- <td width="60%"><input type="text" name="fukuan" value="<%=Ident.getPayment()%>"> </td>
- </tr>
- <tr>
- <td width="40%" align="right">付款时间:</td>
- <td width="60%"><input type="text" name="fukuan" value="<%=Ident.getGettime()%>"> </td>
- </tr>
- <tr>
- <td width="40%" align="right">是否发票:</td>
- <td width="60%">
- <input type="radio" name="tickets" value="1" <%if (Ident.getTickets().equals("否")) out.print("checked") ; %>>
- 否<input type="radio" name="tickets" value="2" <%if (Ident.getTickets().equals("是")) out.print("checked") ; %>>
- 是</td>
- </tr>
- <tr>
- <td width="40%" align="right">客户要求:</td>
- <td width="60%"><TEXTAREA name=content rows=4 cols=44><%= Ident.getContent() %></TEXTAREA>
- </td>
- </tr>
- <tr>
- <td width="40%" align="right"> </td>
- <td width="60%">
- <input type="hidden" name="indentid" value="<%= Id %>">
- <input type="submit" name="submit" value="更新">
- </td>
- </tr>
- </form>
- </table>
- <br>
- <% } %>
- <br><p><a href="javascript:window.close()">关闭窗口</a></p>
- <table width="100%" border="0" cellspacing="2" cellpadding="2">
- <tr>
- <td align="center"><br> </td>
- </tr>
- </table>
- </div>
- </body>
- </html>