{include file="page_header.htm"}
{insert_scripts files="../js/utils.js"}

<form name="order_form" action="preordain.php" method="post" id="order_form">
<div class="table-div" style="margin-bottom: 5px">
	<table width="100%" cellpadding="3" cellspacing="1">
		<tr>
		<td colspan="4">
			<div align="center">
			{if $prev_order}
			<input name="prev" type="button" class="button" onClick="location.href='preordain.php?act=detail&order_id={$prev_order.order_id}';" value="前一个订单"  />
			{/if}
			{if $next_order}
			<input name="next" type="button" class="button" onClick="location.href='preordain.php?act=detail&order_id={$next_order.order_id}';" value="后一个订单"  />
			{/if}
			</div>
		</td>
		</tr>
		
		<tr>
		<th colspan="4">基本信息</th>
		</tr>
	
		<tr>
		<td width="18%"><div align="right"><strong>订单号：</strong></div></td>
		<td width="34%">{$order.order_no}</td>
		<td width="15%"><div align="right"><strong>订单状态：</strong></div></td>
		<td style="color:#FF0000;">
				预定
		</td>
		</tr>
		
	
	<tr>
	<th colspan="4">预定人信息</th>
	</tr>
	<tr>
	<td><div align="right"><strong>收货人：</strong></div></td>
	<td>{$order.shipping_name}</td>
	<td><div align="right"><strong>电子邮件：</strong></div></td>
	<td>{$order.shipping_email}</td>
	</tr>
	<tr>
	<td><div align="right"><strong>地址：</strong></div></td>
	<td>{$order.province_name}{$order.city_name}{$order.district_name}{$order.shipping_address}</td>
	<td><div align="right"><strong>邮编：</strong></div></td>
	<td>{$order.shipping_zip}</td>
	</tr>
	<tr>
	<td><div align="right"><strong>电话：</strong></div></td>
	<td>{$order.shipping_tel}</td>
	<td><div align="right"><strong>手机：</strong></div></td>
	<td>{$order.shipping_mobile}</td>
	</tr>
	</table>
</div>

<div class="table-div" style="margin-bottom: 5px">
	<table width="100%" cellpadding="3" cellspacing="1">
	<tr>
	<th colspan="8" scope="col">产品信息</th>
	</tr>
	<tr>
	<td scope="col"><div align="center"><strong>产品名</strong></div></td>
	<td scope="col"><div align="center"><strong>货号</strong></div></td>
	<td scope="col"><div align="center"><strong>价格</strong></div></td>
	<td scope="col"><div align="center"><strong>数量</strong></div></td>
	<td scope="col"><div align="center"><strong>属性</strong></div></td>
	<td scope="col"><div align="center"><strong>小计</strong></div></td>
	</tr>
	{foreach from=$order_product item=list}
	<tr>
	<td>{$list.name}</td>
	<td>{$list.model}</td>
	<td><div align="right">￥{$list.price}元</div></td>
	<td><div align="right">{$list.quantity}</div></td>
	<td>{$list.attr}</td>
	<td><div align="right">￥{$list.total}元</div></td>
	</tr>
	{/foreach}
	</table>
</div>

<div class="table-div" style="margin-bottom: 5px">
	<table width="100%" cellpadding="3" cellspacing="1">
	<tr>
	<th>费用信息</th>
	</tr>
	
	<tr>
	<td><div align="right"> = 订单总金额：<strong>￥{$order.order_amount}元</strong></div></td>
	</tr>
	</table>
</div>

<div class="table-div" style="margin-bottom: 5px">
	<table cellpadding="3" cellspacing="1">
	<tr>
	<th colspan="6">操作信息</th>
	</tr>
	<tr>
	<td><div align="right"><strong>操作备注：</strong></div></td>
	<td colspan="5" style="padding-top:10px; padding-bottom:10px;"><textarea name="remark" id="remark" cols="80" rows="3" class="FormSmall">{$order.remark}</textarea></td>
	</tr>
	<tr>
	<td>
	<div align="right"><strong>当前可执行操作：</strong> </div></td>
	
	<td colspan="5"  style="padding-top:10px;padding-bottom:10px;">    
	<input type="hidden" name="order_id" id="order_id" value="{$order.order_id}" />
	<input name="confirm" type="button" value="确认" onclick="submit_info();" class="bginput" />
	</td>
	</tr>
	</table>
</div>
</form>

<script type="text/javascript">
{literal}

function submit_info(){
	var order_id = $('#order_id').val();
	var remark=$('#remark').val();
	
	$.ajax({
			url:"preordain.php",
			type:"post",
			dataType:"json",
			data:{"act":"remark","id":order_id,"remark":remark,"is_ajax":1},
			beforeSend:function(){
				$("#loading").fadeIn("fast");
			},
			complete:function(){
				$("#loading").stop();
				$("#loading").fadeOut("fast");
			},
			success:function(result){
			  if (result.error == 0){
					alert('提交成功。');
				  
			  }
			}
	});
}
{/literal}
</script>

{insert_scripts files="validator.js"}
{include file="page_footer.htm"}