-
Notifications
You must be signed in to change notification settings - Fork 0
/
ordersShow2.jsp
127 lines (123 loc) · 4.56 KB
/
ordersShow2.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>我的购买订单</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/store.css">
<script language="javascript" type="text/javascript" src=""></script>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript">
</script>
<style type="text/css">
body,td,div
{
font-size:12px;
}
</style>
</head>
<body>
<jsp:include page="top.jsp"></jsp:include>
<div id="middle">
<jsp:include page="leftMenu.jsp"></jsp:include>
<!-- 购物车 -->
<div id="product_info">
<div class="title">个人中心 >> 我的购买订单</div>
<div style="margin-top:5px">
<table class="ptable" style="margin-bottom:5px;">
<tr class="head_text">
<td width="" align="center">订单编号</td>
<td width="" align="center">商品名称</td>
<td width="" align="center">商品价格</td>
<td width="" align="center">订单日期</td>
<td width="" align="center">联系电话</td>
<td width="" align="center">收货地址</td>
<td width="" align="center">当前状态</td>
<td width="" align="center">操作</td>
</tr>
<c:if test="${orderss!=null && fn:length(orderss)>0}">
<c:forEach items="${orderss}" var="orders" varStatus="status">
<tr>
<td width="" align="center">${orders.orders_no}</td>
<td width="" align="center">${orders.goods_name}</td>
<td width="" align="center">${orders.goods_price}</td>
<td width="" align="center">${fn:substring(orders.orders_date,0,10)}</td>
<td width="" align="center">${orders.user_phone}</td>
<td width="" align="center">${orders.user_address}</td>
<td width="" align="center">${orders.orders_flagDesc}</td>
<td width="" align="center" style="line-height:22px">
<c:if test="${orders.orders_flag==2}">
<a id="finishOrders_${orders.orders_no}" href="javascript:void(0)">确认收货</a>
</c:if>
<c:if test="${orders.orders_flag!=1}">
<br/><a href="page_listLogisticss.action?orders_no=${orders.orders_no}">物流信息</a>
</c:if>
</td>
</tr>
</c:forEach>
</c:if>
<c:if test="${orderss==null || fn:length(orderss)==0}">
<tr>
<td height="60" colspan="8" align="center"><b><不存在订单信息></b></td>
</tr>
</c:if>
</table>
</div>
<div class="pages">
<jsp:include page="page.jsp"></jsp:include>
</div>
</div>
<!-- 购物车 -->
</div>
<jsp:include page="bottom.jsp"></jsp:include>
<script language="javascript" type="text/javascript">
function GoPage()
{
var pagenum=document.getElementById("goPage").value;
var patten=/^\d+$/;
if(!patten.exec(pagenum))
{
alert("页码必须为大于0的数字");
return false;
}
window.location.href="page_listMyOrderss2.action?pageNo="+pagenum;
}
function ChangePage(pagenum)
{
window.location.href="page_listMyOrderss2.action?pageNo="+pagenum;
}
$(document).ready(function(){
$("a[id^='finishOrders']").bind('click',function(){
if(confirm('确认收货吗!?'))
{
var orders_no=$(this).attr('id').split('_')[1];
var aQuery = {
'orders_no':orders_no
};
$.post('page_finishOrders.action',aQuery,
function(responseObj) {
if(responseObj.success) {
alert('确认收货成功!');
window.location.reload();
}else if(responseObj.err.msg){
alert('确认收货失败:'+responseObj.err.msg);
}else{
alert('确认收货失败:服务器异常!');
}
},'json');
}
});
});
</script>
</body>
</html>