<%@ Page CodeFileBaseClass="IlgharCMS.Lib.AdminPageBase" %>
<%@ Register TagPrefix="IlgharUC" TagName="Ime" Src="../../ime.dwt.ascx"%>
<%@ Register TagPrefix="IlgharUC" 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" -->
<ilghar:Get ID="Order" Object="Order" InnerID="Request.QueryString['ID']" />
<base target="_self" />
<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="Mon,1 Fab 1979 23:36:05 GMT" />
<title>生成退货单</title>
<link rel="stylesheet" type="text/css" href="<%=CommonPath%>jquery/themes/lightness/all.css" />
<ilghar:Comment><link rel="stylesheet" type="text/css" href="../../S01/CHS/css/common.css" /></ilghar:Comment>
<link rel="stylesheet" href="<%=CssPath%>common.css" />
<ilgharUC:Ime Ime="true" Eot="true" runat="server" />
<style type="text/css">
TD TABLE{background:#FFF}
TD TABLE TH{width:100px}
#DetailTable THEAD TH,#DetailTable TBODY TD{width:auto;text-align:center}
</style>
<script type="text/javascript">
var _page = "make_return";
var _lang = "<%=ContentLang%>";
var _webPath = "<%=WebPath%>";
var _imagePath = "<%=ImagePath%>";
var _orderID = "<%=Order[ID]%>";
var _goodsIndex = 0;
var _goods = new Array();
var _data;
var _returnID;
var _lang_working = "正在操作...";
var _lang_operation_fail = "操作失败！";
var _lang_operation_success = "操作成功！";
var _lang_amout_incorrect = "退货量格式不正确！";
var _lang_amount_exceed = "退货量不能超过已发货量！";
var _lang_no_goods = "没有任何商品！";
var _lang_time_incorrect = "退货时间格式不正确！";
var _lang_returning = "正在退货...";
var _lang_making_return = "正在生成退货单...";
var _lang_making_return_detail = "正在生成退货单明细...";
</script>
</head>
<body>
<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">
			<tfoot>
				<tr><td colspan="2"><input type="submit" value="退货" /></td></tr>
			</tfoot>
			<tbody>
				<tr>
					<th width="120">订单号：</th>
					<td><%=Order[Number]%></td>
				</tr>
				<tr>
					<th>退货单号：</th>
					<td><input type="text" name="Number" size="30" maxlength="50" class="Text" />如果留空，则会自动生成</td>
				</tr>
				<tr>
					<th>收货人：</th>
					<td>
						<table border="0" cellpadding="4" cellspacing="1">
							<tr>
								<th>姓名：</th>
								<td><input type="text" name="Name" value="<%=Order[ReceiverName]%>" maxlength="50" class="Text <%=ContentLang%>Font" /></td>
							</tr>
							<tr>
								<th>电话：</th>
								<td><input type="text" name="Phone" value="<%=Order[ReceiverPhone]%>" maxlength="20" class="Text" /></td>
							</tr>
							<tr>
								<th>手机：</th>
								<td><input type="text" name="Mobile" value="<%=Order[ReceiverMobile]%>" maxlength="20" class="Text" /></td>
							</tr>
							<tr>
								<th>Email：</th>
								<td><input type="text" name="Email" value="<%=Order[ReceiverEmail]%>" maxlength="50" class="Text" /></td>
							</tr>
							<tr>
								<th>QQ：</th>
								<td><input type="text" name="QQ" value="<%=Order[ReceiverQQ]%>" maxlength="20" class="Text" /></td>
							</tr>
							<tr>
								<th>WW：</th>
								<td><input type="text" name="WW" value="<%=Order[ReceiverWW]%>" maxlength="50" class="Text" /></td>
							</tr>
							<tr>
								<th>MSN：</th>
								<td><input type="text" name="MSN" value="<%=Order[ReceiverMSN]%>" maxlength="50" class="Text" /></td>
							</tr>
							<tr>
								<th>地址：</th>
								<td><input type="text" name="Address" value="<%=Order[ReceiverAddress]%>" size="50" maxlength="50" class="Text" /></td>
							</tr>
							<tr>
								<th>邮编：</th>
								<td><input type="text" name="Zip" value="<%=Order[ReceiverZip]%>" maxlength="50" class="Text" /></td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<th>退货时间：</th>
					<td><input type="text" name="Time" value="<%=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")%>" maxlength="20" class="Text" /></td>
				</tr>
				<tr>
					<th>备注：</th>
					<td><textarea name="Memo" cols="70" rows="6" wrap="off" class="Text <%=ContentLang%>Font"></textarea></td>
				</tr>
				<tr>
					<td colspan="2">
						<table id="DetailTable" border="0" cellpadding="4" cellspacing="1">
							<thead>
								<tr>
									<th style="width:120px">货号</th>
									<th>名称</th>
									<th style="width:60px">总数量</th>
									<th style="width:60px">已发货</th>
									<th style="width:60px">退货量</th>
								</tr>
							</thead>
							<tbody>
								<ilghar:List Object="Order.Detail" Condition="OrderID=Order[ID] and PartID IS NULL">
									<ilghar:Record>
										<tr id="<%=InnerID%>">
											<td><%=Number%></td>
											<td><%=Name%></td>
											<td><%=Amount%></td>
											<td><%=DeliveredAmount%></td>
											<td>
												<%If Convert.ToInt32(DeliveredAmount) > 0%>
													<input type="text" id="Amount<%=InnerID%>" value="0" size="5" />
												<%Else%>
													0
												<%EndIf%>
											</td>
										</tr>
										<ilghar:List Object="Order.Detail" Condition="OrderID=Order[ID] and GoodsID=GoodsID and PartID IS NOT NULL">
											<ilghar:Record>
												<tr id="<%=InnerID%>">
													<td><%=Number%></td>
													<td>&nbsp;&nbsp;&nbsp;&nbsp;+<%=Name%></td>
													<td><%=Amount%></td>
													<td><%=DeliveredAmount%></td>
													<td>
														<%If Convert.ToInt32(DeliveredAmount) > 0%>
															<input type="text" id="Amount<%=InnerID%>" value="0" size="5" />
														<%Else%>
															0
														<%EndIf%>
													</td>
												</tr>
											</ilghar:Record>
										</ilghar:List>
									</ilghar:Record>
								</ilghar:List>
							</tbody>
						</table>
					</td>
				</tr>
			</tbody>
		</table>
	</form>
	<div class="Footer"></div>
</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="<%=JsPath%>shop.js"></script>
</body>
</html>