<%@ 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="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<title>订单详细信息</title>
</head>
<body>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 销售订单管理 <span class="c-gray en">&gt;</span> 订单详情 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="pd-20">
			<div style="float:right;">
				<a href="javascript:window.location.href = document.referrer;" >返回</a>
			</div>
	<div id="tab-system" class="HuiTab">
		<div class="tabBar cl"><span>订单详情</span></div>
		<div class="tabCon">
		<c:if test="${!(empty order)}">
			<table class="table table-border table-bordered table-hover mt-5">
			  <tr class="text-r">
			  	<td class="f-14" style="font-weight: bold;">订单号：</td>
			  	<td>${order.salesOrderid }</td>
			  	<td  class="f-14" style="font-weight: bold;">所属用户：</td>
			  	<td>${order.userNickname }</td>
			  	<td  class="f-14" style="font-weight: bold;">状态：</td>
			  	<td>
			  		<c:choose>
						<c:when test="${order.salesStatus ==0 }">
							取消订单
						</c:when>
						<c:when test="${order.salesStatus ==1 }">
							待支付
						</c:when>
						<c:when test="${order.salesStatus ==2 }">
							已支付、待发货
						</c:when>
						<c:when test="${order.salesStatus ==3 }">
							退款申请中
						</c:when>
						<c:when test="${order.salesStatus ==4 }">
							已退款
						</c:when>
						<c:when test="${order.salesStatus ==5 }">
							已发货
						</c:when>
						<c:when test="${order.salesStatus ==6 }">
							申请退货中
						</c:when>
						<c:when test="${order.salesStatus ==7 }">
							退货中
						</c:when>
						<c:when test="${order.salesStatus ==8 }">
							订单退货，订单关闭
						</c:when>
						<c:when test="${order.salesStatus ==9 }">
							换货中
						</c:when>
						<c:when test="${order.salesStatus ==10 }">
							换货完成
						</c:when>
						<c:when test="${order.salesStatus ==11 }">
							申请换货中
						</c:when>
						<c:when test="${order.salesStatus ==12 }">
							订单完成
						</c:when>
					</c:choose>
			  	</td>
			  </tr>
			  <tr class="text-r">
			  	<td  class="f-14" style="font-weight: bold;">现金支付金额：</td>
			  	<td><fmt:formatNumber type="number" value="${order.salesYetAmount/100}" pattern="0.00" maxFractionDigits="2"/></td>
			  	<td  class="f-14" style="font-weight: bold;">快递公司：</td>
			  	<td>
			  		<c:choose>
					  	<c:when test="${order.salesPostFirm == 'sto' }">申通快递</c:when>
					  	<c:when test="${order.salesPostFirm == 'yto' }">圆通快递</c:when>
					  	<c:when test="${order.salesPostFirm == 'sf' }">顺丰快递</c:when>
					  	<c:when test="${order.salesPostFirm == 'ems' }">邮政EMS</c:when>
					  	<c:when test="${order.salesPostFirm == 'zto' }">中通快递</c:when>
					  	<c:when test="${order.salesPostFirm == 'zjs' }">宅急送</c:when>
					  	<c:when test="${order.salesPostFirm == 'yunda' }">韵达快递</c:when>
					  	<c:when test="${order.salesPostFirm == 'cces' }">cces快递</c:when>
					  	<c:when test="${order.salesPostFirm == 'pick' }">上门提货</c:when>
					  	<c:when test="${order.salesPostFirm == 'htky' }">汇通快递</c:when>
					  	<c:when test="${order.salesPostFirm == 'ttkdex' }">天天快递</c:when>
					  	<c:when test="${order.salesPostFirm == 'stars' }">星晨急便</c:when>
					  	<c:when test="${order.salesPostFirm == 'jd' }">京东快递</c:when>
					  	<c:when test="${order.salesPostFirm == 'dbkd' }">德邦快递</c:when>
					  	<c:when test="${order.salesPostFirm == '01' }">其他</c:when>
					  	<c:when test="${order.salesPostFirm == '02' }">上门送货</c:when>
				  	</c:choose>
			  	</td>
			  	<td  class="f-14" style="font-weight: bold;">快递单号：</td>
			  	<td>${order.salesPostNum }</td>
			  </tr>
			  <tr class="text-r">
			  	<td  class="f-14" style="font-weight: bold;">创建时间：</td>
			  	<td><fmt:formatDate value="${order.salesCreateDate }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
			  	<td  class="f-14" style="font-weight: bold;">邮政编码：</td>
			  	<td colspan="3">${order.salesAddressPostnum }</td>
			  </tr>
			  <tr class="text-r">
			  	<td colspan="6">
			  	<table class="table table-border table-bordered table-hover">
				  <thead>
				  	<tr  class="f-14" style="font-weight: bold;">
				  		<th>商品名称</th>
				  		<th>商品图片</th>
				  		<th>原价（￥）</th>
				  		<th>优惠价（￥）</th>
				  		<th>数量（件）</th>
				  		<th>金额（￥）</th>
				  	</tr>
				  </thead>
				  <tbody>
				  <c:if test="${!empty orderItemList }">
				  <c:forEach items="${orderItemList }" var="list">
				  	<tr>
				  		<td>${list.itemProductName }</td>
				  		<td><img alt="图片" src="${list.itemProductPic}" style="width: 40px; height: 40px;"></td>
				  		<td><fmt:formatNumber type="number" value="${list.itemProductPrice/100}" pattern="0.00" maxFractionDigits="2"/></td>
				  		<td><fmt:formatNumber type="number" value="${list.itemProductDiscount/100}" pattern="0.00" maxFractionDigits="2"/></td>
				  		<td>${list.itemNum }</td>
				  		<td><fmt:formatNumber type="number" value="${list.itemTotal/100}" pattern="0.00" maxFractionDigits="2"/></td>
				  	</tr>
				  </c:forEach>
				  </c:if>
				  <c:if test="${empty orderItemList }">
				  	<tr class="text-c"><td colspan="6" class="text-c">该订单未查询到任何商品！</td></tr>
				  </c:if>
				  </tbody>
				</table>
				</td>
			  </tr>
			  <tr class="text-r">
			  	<td  class="f-14" style="font-weight: bold;">收件人姓名：</td>
			  	<td colspan="2">${order.salesAddressName }</td>
			  	<td  class="f-14" style="font-weight: bold;">收件人电话：</td>
			  	<td colspan="2">${order.salesAddressTel }</td>
			  </tr>
			  <tr class="text-r">
			  	<td  class="f-14" style="font-weight: bold;">发货时间：</td>
			  	<td colspan="2"><fmt:formatDate value="${order.salesSendDate }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
			  	<td  class="f-14" style="font-weight: bold;">用户备注：</td>
			  	<td colspan="5">${order.salesUserRemark }</td>
			  </tr>
			  <tr class="text-r">
			  	<td  class="f-14" style="font-weight: bold;">管理员标注：</td>
			  	<td>
			  		<c:if test="${order.salesColorType==1 }">
						<div style="width:100%;height:20px;background-color: red;" id="${order.salesOrderid }AdminRemarkColor" lang="1"></div>
					</c:if>
					<c:if test="${order.salesColorType==2 }">
						<div style="width:100%;height:20px;background-color: yellow;" id="${order.salesOrderid }AdminRemarkColor" lang="2"></div>
					</c:if>
					<c:if test="${order.salesColorType==3 }">
						<div style="width:100%;height:20px;background-color: green;" id="${order.salesOrderid }AdminRemarkColor" lang="3"></div>
					</c:if>
			  	</td>
			  	<td  class="f-14" style="font-weight: bold;">管理员备注：</td>
			  	<td colspan="3">${order.salesAdminRemark }</td>
			  </tr>
			  <tr class="text-r">
			  	<td  class="f-14" style="font-weight: bold;">退款时间：</td>
			  	<td ><fmt:formatDate value="${order.salesReturnDate }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
			  	<td  class="f-14" style="font-weight: bold;">退款备注：</td>
			  	<td >${order.salesReturnDes }</td>
			  	<td  class="f-14" style="font-weight: bold;">退货时间：</td>
			  	<td ><fmt:formatDate value="${order.salesReturnDate }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
			  </tr>
			  <tr class="text-r">
			  	<td  class="f-14" style="font-weight: bold;">收货地址：</td>
			  	<td colspan="5">${order.salesAddressInfo }</td>
			  </tr>
			</table>
		</c:if>
		<c:if test="${(empty order)}">
			<div style="width: 100%;" class="text-c">未查询到该订单信息!</div>
		</c:if>
		</div>
	</div>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/Validform/5.3.2/Validform.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script> 
<script type="text/javascript">

$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$.Huitab("#tab-system .tabBar span","#tab-system .tabCon","current","click","0");
});

function IntegralLogs(title, url, w, h) {
	layer_show(title,url,w,h);
}
</script>
</body>
</html>