<{import file="header.html" title="订单列表"}> 
<link rel="stylesheet" type="text/css" href="<{$__APP__}>public/css/s_order.css?v=<{$js_version}>">
<div class="tab"><span>订单列表</span></div> 
<div class="filter">
	<a href="<{$__SELLER__}>order" <{if $smarty.get.status ==''}>class="ch"<{/if}>>全部订单</a>
	<a href="<{$__SELLER__}>order?status=1" <{if $smarty.get.status == '1'}>class="ch"<{/if}>>未支付订单</a>
	<a href="<{$__SELLER__}>order?status=2" <{if $smarty.get.status == '2'}>class="ch"<{/if}>>等待发货</a>
	<a href="<{$__SELLER__}>order?status=3" <{if $smarty.get.status == '3'}>class="ch"<{/if}>>等待收货</a>
	<a href="<{$__SELLER__}>order?status=4" <{if $smarty.get.status == '4'}>class="ch"<{/if}>>交易完成</a> 
</div> 
<div class="sch"> 
	<form action="">
		<input type="text" name="key" value="<{$smarty.get.key}>" placeholder="关键字或订单号" class="input"/>
		<input type="submit" class="submit" value="搜索"/>
	</form>
</div>
<div class="lbox">
<table width="100%">
	<thead>
		<tr>
			<th>商品名</th>
			<th width="80">单价</th>
			<th width="80">数量</th>
			<th width="100">实付款</th>
			<th width="100">状态</th>
			<th width="100">操作</th> 
		</tr> 
	</thead>
	<tbody><tr><td colspan="6" style="padding:8px 0;"></td></tr></tbody>
	<{uqcms m="order" v="data" c="order_list:is_shop=1&key=smarty.get.key&order_id=smarty.get.order_id&page=smarty.get.page&status=smarty.get.status"}>
	<{if $data.list}> 
		<{foreach item=i from=$data.list}>
			<tbody>  
				<tr class="order_tr_top">
					<td colspan="6" style="background:#f8f8f8; text-align:left; padding:2px 0 0;"> 
						<span class="order_span" style="padding-left:15px;">下单时间：<{$i.addtime}></span>
						<span class="order_span" style="padding-right:0; padding-left:20px;"> 订单号：<{$i.order_no}></span> 
						<a href="javascript:;" class="remark" onclick="sp_dg('备注', '<{$__SELLER__}>order/remark?oid=<{$i.order_no}>')">备注</a>
					</td>
				</tr>
			<{foreach key=k item=g from=$i.glist}>
				<tr class="order_tr">
					<td> 
						<div class="gcon">
							<div class="img">
								<a href="<{$__URI__}>goods/<{$g.gid}><{$__HTML__}>" class="order_img" target="_blank">
									<img src="<{$__IMG__}><{$g.images|img_size:60x60}>"></a>
							</div>
							<div class="desc">
								<div class="ttl">
									<a href="<{$__URI__}>goods/<{$g.gid}><{$__HTML__}>" class="order_title" target="_blank"><{$g.title}></a>
								</div>
								<div class="sku">
									<{if $g.sku}>
										<{foreach item=s from=$g.sku}>		
											<span><{$s.0}>：<{$s.1}> &nbsp;&nbsp; </span> 
										<{/foreach}>
									<{/if}>
								</div>
							</div> 
						</div>	
					</td> 
					<td><div class="buy_pr"><span><{$g.price}></span></div></td>
					<td style="border-right:1px solid #efefef;"><{$g.buy_num}></td>
				<{if $k == '0'}> 
					<td style="border-right:1px solid #efefef;" rowspan="<{$i.span}>"> 
						<p><{$i.total_price}></p>
						<{if $i.freight_price > '0.00'}>
							<p style="font-size:12px; color:#999;">(含运费 <{$i.freight_price}>)</p>
						<{/if}> 
						<{if $i.promote_price >'0'}>
							<p style="font-size:12px; color:#999;">优惠 <{$i.promote_price}></p>
						<{/if}>
					</td>
					<td rowspan="<{$i.span}>" valign="top" style="border-right:1px solid #efefef;">
						<div class="order_status">
							<span><{$i.order_status_cn}></span>
							<a href="<{$__SELLER__}>order/detail?oid=<{$i.order_no}>">订单详情</a>
						</div> 
					</td>
					<td rowspan="<{$i.span}>" valign="top">
						<p style="padding:5px 0 0 0; text-align:center;">
						<{if $i.order_status == '1'}>
							 <a href="javascript:;">未支付</a>
						<{elseif $i.order_status == '2'}>
							 <a href="<{$__SELLER__}>order/detail?oid=<{$i.order_no}>" class="button_red">发货</a> 
						<{elseif $i.order_status == '3'}>
							<a href="<{$__SELLER__}>order/detail?oid=<{$i.order_no}>">等待收货</a><br>
						<{elseif $i.order_status == '4' || $i.order_status == '5'}>
							<a href="javascrip:;">交易成功</a>
						<{else}>
							 <a href="javascrip:;">交易关闭</a>
						<{/if}>
					</p>
					</td> 
				<{/if}>
				</tr> 
			<{/foreach}>
				<tr><td colspan="6" style="padding:0; margin:0;">&nbsp;</td></tr>
			</tbody>
		<{/foreach}>
		<tfoot>
			<tr><td colspan="6"><div class="page"><{$data.page}></div></td></tr>
		</tfoot>
	<{else}>
		<tbody>
			<tr><td colspan="6" class="btm"><div class="nomsg"><i></i><span>您还没有订单~</span></div></td></tr>
		</tbody>
	<{/if}>
</table>  
</div>
<{import file="footer.html"}> 
<script type="text/javascript"> 
function sp_dg(name,url){
	ajax_dialog(name,url,380); 
}
</script>