<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<%@ Register TagPrefix="alicmsUC" TagName="Ime" Src="../../ime.dwt.ascx"%>
<%@ Register TagPrefix="alicmsUC" TagName="LanguageMenu" Src="../../language_menu.dwt.ascx"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<ali:Get ID="Order" Object="Order" InnerID="Request.QueryString['ID']" Validate="True" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑订单</title>
<link rel="stylesheet" type="text/css" href="<%=CommonPath%>jquery/themes/lightness/all.css" />
<ali:Comment><link rel="stylesheet" type="text/css" href="../../S01/CHS/css/common.css" /></ali:Comment>
<link rel="stylesheet" href="<%=CssPath%>common.css" />
<alicmsUC:Ime Ime="true" Eot="true" runat="server" />
<style type="text/css">
td table{background:#fff}
td table tbody th{width:100px}
td table thead th{text-align:center !important}
#DetailTable th{width:auto;text-align:center}
#DetailTable td{text-align:center}
</style>
<script>
var _page = 'order_edit',
	_lang = '<%=ContentLang%>',
	_webPath = '<%=WebPath%>',
	_id = '<%=Order[InnerID]%>',
	_lang_working = '正在操作...',
	_lang_operation_fail = '操作失败',
	_lang_operation_success = '操作成功！',
	_lang_price_adjustment_incorrect = '涨价或折扣格式不正确！';
</script>
</head>
<body>
<div class="WhiteHeader">
	<div class="Left"><img src="<%=ImagePath%>close_frame.gif" /></div>
	<div class="Title"><a href="list.aspx?Lang=<%=ContentLang%>">订单列表</a> → <span class="<%=ContentLang%>Font"><%=Order[No]%></span></div>
	<div class="Right"></div>
</div>
<div class="Block">
	<ul class="Title">
		<li class="Left"></li>
		<li class="Middle">编辑</li>
		<li class="Right"></li>
	</ul>
	<form>
		<table border="0" cellpadding="4" cellspacing="1">
			<tbody>
				<tr>
					<th>订单号：</th>
					<td><%=Order[No]%></td>
				</tr>
				<tr>
					<th>用户：</th>
					<td><%=Order[UserName]%></td>
				</tr>
				<tr>
					<th>订单金额：</th>
					<td>
						<table border="0" cellpadding="4" cellspacing="1">
							<thead>
								<th>订单总价</th>
								<th>商品总价</th>
								<th>运费总价</th>
								<th>是否开发票</th>
								<th>发票抬头</th>
								<th>税率</th>
							</thead>
							<tbody>
								<td><span id="sum" data-old="<%=Order[Sum]%>"><%=Order[Sum]%></span>元</td>
								<td><%=Order[Price]%>元</td>
								<td><%=Order[Freight]%>元</td>
								<td>
									<%If Convert.ToBoolean(Order[NeedInvoice])%>
										是
									<%Else%>
										否
									<%EndIf%>
								</td>
								<td><%=Order[InvoiceRise]%></td>
								<td><%=Order[TaxRate]%>%</td>
							</tbody>
						</table>
					</td>
				</tr>
				<tr>
					<th>收货人：</th>
					<td>
						<table border="0" cellpadding="4" cellspacing="1">
							<tr>
								<th>姓名：</th>
								<td><%=Order[ReceiverName]%></td>
							</tr>
							<tr>
								<th>电话：</th>
								<td><%=Order[ReceiverPhone]%></td>
							</tr>
							<tr>
								<th>地址：</th>
								<td><%=Order[ReceiverAddress]%></td>
							</tr>
							<tr>
								<th>邮编：</th>
								<td><%=Order[ReceiverZip]%></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<th>发货：</th>
					<td>
						<table border="0" cellpadding="4" cellspacing="1">
							<tr>
								<th>发货状态：</th>
								<td>
									<%If Int32.Equals(Order[IsDelivered], 0)%>
										未发货
									<%ElseIf Int32.Equals(Order[IsDelivered], 1)%>
										部分发货
									<%ElseIf Int32.Equals(Order[IsDelivered], 2)%>
										已发货
									<%ElseIf Int32.Equals(Order[IsDelivered], 3)%>
										已收货
									<%ElseIf Int32.Equals(Order[IsDelivered], 4)%>
										部分退货
									<%ElseIf Int32.Equals(Order[IsDelivered], 5)%>
										已退货
									<%EndIf%>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<th>付款：</th>
					<td>
						<table border="0" cellpadding="4" cellspacing="1">
							<tr>
								<th>付款状态：</th>
								<td>
									<%If Int32.Equals(Order[IsPayed], 0)%>
										未付款
									<%ElseIf Int32.Equals(Order[IsPayed], 1)%>
										部分付款
									<%ElseIf Int32.Equals(Order[IsPayed], 2)%>
										已付款
									<%ElseIf Int32.Equals(Order[IsPayed], 3)%>
										部分退款
									<%ElseIf Int32.Equals(Order[IsPayed], 4)%>
										已退款
									<%EndIf%>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<th>折扣或涨价：</th>
					<td><input type="text" name="PriceAdjustment" value="<%=Convert.ToDecimal(Order[PriceAdjustment]).ToString("0.00")%>" size="5" />元</td>
				</tr>
				<tr>
					<th>用户备注：</th>
					<td><pre><%=Order[UserMemo]%></pre></td>
				</tr>
				<tr>
					<th>店长备注：</th>
					<td><textarea name="AdminMemo" rows="5" cols="60"><%=Order[AdminMemo]%></textarea></td>
				</tr>
				<tr>
					<td colspan="2">
						<table id="DetailTable" border="0" cellpadding="4" cellspacing="1">
							<thead>
								<tr>
									<th width="120">货号</th>
									<th>名称</th>
									<th width="120">规格</th>
									<th width="60">价格</th>
									<th width="60">数量</th>
								</tr>
							</thead>
							<tbody>
								<ali:List Object="Order.Detail" Condition="OrderID=Order[ID]">
									<ali:Record>
										<tr>
											<td><%=GoodsNo%></td>
											<td><%=Name%></td>
											<td><%=GoodsSpec%></td>
											<td><%=Price%></td>
											<td><%=Amount%></td>
										</tr>
									</ali:Record>
								</ali:List>
							</tbody>
						</table>
					</td>
				</tr>
			</tbody>
			<tfoot>
				<td colspan="2"><input type="submit" value="保存" /></td>
			</tfoot>
		</table>
	</form>
</div>
<script type="text/javascript" src="<%=CommonPath%>jquery/core.js"></script>
<script type="text/javascript" src="<%=CommonPath%>jquery/ui.js"></script>
<script type="text/javascript" src="<%=CommonPath%>utility.js"></script>
<script type="text/javascript" src="<%=JsPath%>global.js"></script>
<script type="text/javascript" src="<%=ModuleJsPath%>module.js"></script>
</body>
</html>