{*<?php exit();?>*}
<div class="block">
	<div class="head"><span>订单基本信息</span></div>
	<div class="main">
		<table class="table">
			<tr>
				<td width="100px">订单号：</td>
				<td width="310px">{$order.ord_sn}</td>
				<td width="100px">订单状态：</td>
				<td>
				<div style="float:left;line-height:24px;">{$order.status_name}&nbsp;&nbsp;</div>
				{if $order.ord_status == 0}
					{if $order.payment_code == 'system'}
					<input class="button" type="button" onclick="do_system_pay({$order.ord_id})" value="完成支付" />
					{elseif $order.payment_code == 'chinabank'}
					<form id="form_pay" method="post" action="{url channel='pay' dir='chinabank' file='send'}" target="_blank">
						<input type="hidden" name="v_oid" value="{$order.ord_sn}" />
						<input type="hidden" name="v_amount" value="{$order.ord_price_total}" />
						<input class="button" type="submit" value="完成支付" />
					</form>
					{/if}
				{/if}
				<div class="clear"></div>
				</td>
			</tr>
			<tr>
				<td>购货人：</td>
				<td>{if $order.ord_user_id}<a href="{url channel='user' mod='user_edit' id=$order.ord_user_id}">{$order.user_name}</a>{else}匿名用户{/if}</td>
				<td>下单时间：</td>
				<td>{$order.ord_add_time|date_format:"%Y-%m-%d %H:%M:%S"}</td>
			</tr>
			<tr>
				<td>支付方式：</td>
				<td>{$order.ord_payment_name}</td>
				<td>付款时间：</td>
				<td>{$order.ord_pay_time|date_format:"%Y-%m-%d %H:%M:%S"}</td>
			</tr>
			<tr>
				<td>配送方式：</td>
				<td>{$order.ord_shipping_name}</td>
				<td>发货时间：</td>
				<td>{$order.ord_shipping_time|date_format:"%Y-%m-%d %H:%M:%S"}</td>
			</tr>
			<tr>
				<td>快递单号：</td>
				<td>{$order.ord_express_no}</td>
				<td></td>
				<td></td>
			</tr>
		</table>
	</div>
</div>
<div class="block">
	<div class="head"><span>收货人信息</span></div>
	<div class="main">
		<table class="table">
			<tr>
				<td width="100px">收货人姓名：</td>
				<td>{$order.ord_consignee}</td>
				<td width="100px">电子邮件地址：</td>
				<td>{$order.ord_email}</td>
			</tr>
			<tr>
				<td>详细地址：</td>
				<td>{$order.ord_address}</td>
				<td>邮政编码：</td>
				<td>{$order.ord_zipcode}</td>
			</tr>
			<tr>
				<td>电话：</td>
				<td>{$order.ord_tel}</td>
				<td>手机：</td>
				<td>{$order.ord_mobile}</td>
			</tr>
			<tr>
				<td>标志建筑：</td>
				<td>{$order.ord_building}</td>
				<td>最佳送货时间：</td>
				<td>{$order.ord_best_time}</td>
			</tr>
		</table>
	</div>
</div>
<div class="block">
	<div class="head"><span>商品信息</span></div>
	<div class="main">
		<table class="table sheet">
			<tr class="h">
				<td width="180px">商品名称</td>
				<td>市场价</td>
				<td>本店价</td>
				<td width="80px">购买数量</td>
				<td>小计</td>
			</tr>
			{foreach from=$goods name=goods item=item}
			<tr class="row">
				<td><a href="{$S_ROOT}{url channel='goods' id=$item.goo_id}" target="_blank">{$item.goo_title}</a></td>
				<td>￥{$item.goo_market_price}元</td>
				<td>￥{$item.goo_shop_price}元</td>
				<td>{$item.number}</td>
				<td>￥{$item.subtotal}元</td>
			</tr>
			{/foreach}
			<tr>
				<td colspan="4"></td>
				<td>总计：￥{$shop_total}元</td>
			</tr>
		</table>
	</div>
</div>
<div class="block">
	<div class="head"><span>操作信息</span></div>
	<div class="main">
		<form id="form_order_note" method="post" action="{url channel=$global.channel}">
			<input name="cmd" type="hidden" value="order_note" />
			<input name="ord_id" type="hidden" value="{$global.id}" />
			<table class="table">
				<tr>
					<td>操作备注：</td>
					<td><textarea class="textarea" name="ord_note" style="width:600px;height:100px;">{$order.ord_note}</textarea></td>
				</tr>
				<tr>
					<td colspan="2">
						<div class="bt_row">
							<input class="button" type="submit" value="提交" />
							<input class="button" type="button" onclick="go_back()" value="返回" />
						</div>
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>
{literal}
<script language="javascript">
function do_system_pay(id)
{
	ajax("post","?/deal/","cmd=do_system_pay&id=" + id,
	function(data)
	{
		if(data == 1)
		{
			alert("支付成功");
			document.location.replace(document.location.href);
		}else{
			alert("支付失败");
		}
	});
}
</script>
{/literal}