Java Web 网络商城案例演示二十三 管理员界面异步显示订单详情 修改订单状态

商品 名称 单价 数量 xxxxx xxxxx xxxxx

2、 用户在点击详情按钮的时候,要向服务端发起ajax请求,向服务端传递订单的ID,

3、服务端获取到订单的ID,查询 这个订单下所有的订单项以及订单项对应的商品信息,返回集合

4、

5、调试,排除2端错误

6、在客 户端获取到服务端响应回的JSON格式的数据,将这些数据绑定在页面上

order/list.jsp

<%@ page language=“java” contentType=“text/html; charset=UTF-8”

pageEncoding=“UTF-8”%>

<%@taglib uri=“http://java.sun.com/jsp/jstl/core” prefix=“c”%>

rel=“stylesheet” type=“text/css” />


action=“${pageContext.request.contextPath}/user/list.jsp”

method=“post”>

bgColor=“#f5fafe” border=“0”>

订单列表

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”>

style=“FONT-WEIGHT: bold; FONT-SIZE: 12pt; HEIGHT: 25px; BACKGROUND-COLOR: #afd1f3”>

序号 订单编号 订单金额 收货人 订单状态 订单详情

<c:forEach items=“${allOrders }” var=“o” varStatus=“status”>

οnmοuseοut=“this.style.backgroundColor = ‘#F5FAFE’;”>

width=“5%”>${status.count }

width=“20%”>${o.oid }

width=“5%”>${o.total }

width=“5%”>${o.name }

width=“5%”><c:if test=“${o.state==1 }”>未付款</c:if> <c:if

test=“${o.state==2 }”>

发货

</c:if> <c:if test=“${o.state==3 }”>已发货</c:if> <c:if

test=“${o.state==4 }”>订单完成</c:if>

</c:forEach>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值