一.目标以及实现思路
商家:①查看订单
②发货 (订单状态:1未发货 2已发货 3已签收 4已撤单 默认值1)
③订单项查看
思路:订单表的查询,将订单表的订单状态由1改为2通过订单的id到订单项表查询出对应的订单
买家:①查看订单
②撤单
③签收
思路:订单表的查询,将订单表的订单状态由1改为4,将订单表的订单状态由2改为3
二,订单管理
1,JSP代码
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>商家订单页面</title>
<link rel="stylesheet" type="text/css"
href="${pageContext.request.contextPath}/static/js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/js/easyui/themes/icon.css">
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.js"></script>
<script type="text/javascript"
src="${pageContext.request.contextPath}/static/js/easyui/jquery.easyui.min.js"></script>
<script src="${pageContext.request.contextPath}/static/js/main.js"></script>
</head>
<body>
<table id="dg" style="style=" width:400px;height:200px;
"></table>
<script>
$(function () {
$('#dg').datagrid({
url: '${pageContext.request.contextPath}/order.action?methodName=list&&orderState=1',
fit: true,
fitColumns: true,
pagination: true,
singleSelect: true,
columns: [[
// {field:'id',title:'id',width:100},
{field: 'id', title: '书籍名称', hidden: true},
{field: 'postalcode', title: '收货人邮编', hidden: true},
{field: 'uid', title: '用户', width: 50},
{field: 'consignee', title: '收货人', width: 50},
{field: 'phone', title: '手机号', width: 50},
{field: 'address', title: '收获人地址', width: 50},
{field: 'orderPrice', title: '价格', width: 50},
{field: 'sendTime', title: '发货时间', width: 50},
{field: 'orderTime', title: '订单时间', width: 50},