{echo:JS::import("form")}
<div style="overflow: auto;width:900px;height: 400px;">
		{query:name=doc_invoice as od fields=od.*,ex.name as exname join=left join express_company as ex on od.express_company_id eq ex.id  where=od.id eq $id /}
		{set:$invoice = $items[0]; $area_ids=array($invoice['province'],$invoice['city'],$invoice['county']);$area_ids = implode(',',$area_ids);$areas=array();}
		{query:name=area where=id in ($area_ids)}
		{set:$areas[$item['id']]=$item['name']}
		{/query}
		<h3 class="lineD ">收货人信息：</h3>

		<table class="default">
		<tr><th width="120">订单编号：</th><td>{$invoice['order_no']}</td><th width="120">发货单号：</th><td>{$invoice['invoice_no']}</td></tr>
		<tr><th>物流公司：</th><td class="golden">{$invoice['exname']}</td><th>物流单号：</th><td class="golden">{$invoice['express_no']}</td></tr>
		<tr><th width="100">收货人：</th><td>{$invoice['accept_name']}</td><th width="100">联系手机：</th><td>{$invoice['mobile']}</td></tr>
		<tr><th>联系电话：</th><td>{$invoice['phone']}</td><th>邮编：</th><td>{$invoice['zip']}</td></tr>
		<tr><th>发货时间：</th><td>{$invoice['create_time']}</td><th>发货人：</th><td>{$invoice['admin']}</td></tr>
		<tr><th>收货地址：</th><td colspan=3>{$areas[$invoice['province']]},{$areas[$invoice['city']]},{$areas[$invoice['county']]}{$invoice['addr']}</td></tr>
		</table>
	
	<h3 class="lineD mt10">商品详情：</h3>
	<table class="default" id="attr_values">
		<tr><td widtd="120">货号</td><td>商品名</td><td>规格</td><td widtd="60">价格</td><td widtd="40">数量</td><td widtd="60">小计</td></tr>
		{query:name=doc_invoice as di fields=go.name,pr.pro_no,od.spec,od.goods_price,od.goods_nums join= left join order_goods as od on od.order_id eq di.order_id left join products as pr on od.product_id eq pr.id  left join goods as go on od.goods_id eq go.id where=di.id eq $id}
		{set:$spec = unserialize($item['spec']);}
		<tr><td>{$item['pro_no']}</td><td>{$item['name']}</td><td>
			{if:is_array($spec)}
			{list:items=$spec item=$ite }
				{$ite['name']}:{$ite['value'][2]}
			{/list}
			{/if}
		</td><td>{$item['goods_price']}</td><td>{$item['goods_nums']}</td><td class="golden">{echo:sprintf("%.2f",($item['goods_price']*$item['goods_nums']))}</td></tr>
		{/query}
	</table>
</div>