<{include file="index/header.html"}> 
<style type="text/css">
.remark{ margin:2px 10px 0 0; float:right; }
table.ltable tbody tr{ border:none; }
table.ltable tbody tr.gbox td:first-child{ border-left:1px solid #efefef; }
table.ltable tbody tr.gbox td:last-child{ border-right:1px solid #efefef;  }
table.ltable tbody tr td span.od{ padding:0 10px 0 8px; float:left; }
table.ltable tbody tr td span.od2{ padding:2px 10px 0 0; float:left; }
table.ltable tbody tr td.gds{ padding-left:0; }
table.ltable tbody tr td.gds img{ float:left; }
table.ltable tbody tr td.gds .desc{ padding:0 0 0 10px; float:left; }
table.ltable tbody tr td.gds .desc p.ttl{ width:100%; }
table.ltable tbody tr td.gds .desc p.ttl2{ width:100%; color:#888; padding-top:5px; }
table.ltable tbody tr td.border{ border:1px solid #EFEFEF; text-align:center; padding:0; } 
a.edit{ margin:0 0 0 5px; float:left; }
a.del{ margin:0 0 0 5px; float:left; }
tr.tcon{ border:1px solid #ddd; }

td.status_0{ color:#999; }
td.status_1{ color:#3399FF; }
td.status_2{ color:#f00; font-weight:bold; }
td.status_3{ color:#FFCC00; }
td.status_4{ color:#66CC66; }
td.status_5{}
</style>
<div class="nav"><span>订单管理</span></div> 
<div class="filter"> 
	<input type="button" name="del_checked" class="del_ck button" value="删除选项"/> 
	<a href="<{$__ADMIN__}>goods_order" class="<{if $smarty.get.status == ''}>option_ch<{else}>option<{/if}>">全部</a>
	<a href="<{$__ADMIN__}>goods_order?status=1" class="<{if $smarty.get.status == '1'}>option_ch<{else}>option<{/if}>">已下单</a>
	<a href="<{$__ADMIN__}>goods_order?status=2" class="<{if $smarty.get.status == '2'}>option_ch<{else}>option<{/if}>">已支付</a>
	<a href="<{$__ADMIN__}>goods_order?status=3" class="<{if $smarty.get.status == '3'}>option_ch<{else}>option<{/if}>">已发货</a>
	<a href="<{$__ADMIN__}>goods_order?status=4" class="<{if $smarty.get.status == '4'}>option_ch<{else}>option<{/if}>">已收货</a>
	<a href="<{$__ADMIN__}>goods_order?status=5" class="<{if $smarty.get.status == '5'}>option_ch<{else}>option<{/if}>">已评价</a>
	<a href="<{$__ADMIN__}>goods_order?status=0" class="<{if $smarty.get.status == '0'}>option_ch<{else}>option<{/if}>">失效</a>
	<form action="#" method="get">
		<input type="hidden" name="m" value="goods_order"/>	
		<input type="hidden" name="a" value="index"/>
		<div class="sch">
			<input type="text" name="order_no" class="text" value="" size="25" placeholder="订单号码"/>
			<input type="submit" class="submit" value="查找"/>
		</div>
	</form>
</div>
<div class="main"> 
	<table class="ltable">
	  	<thead>
		  	<tr>
				<th width="28" style="padding-left:9px;"><input type="checkbox" class="checked_all"/></th> 
				<th colspan="2">产品</th>
				<th width="80">价格</th>
				<th width="60">数量</th>
				<th width="80">售后</th>
				<th width="80">状态</th>
				<th width="80">详情</th>
				<th width="100">&nbsp;</th>
		  	</tr>
	  	</thead>
		<tbody>
			<{if $data.list}>
				<{foreach item=i from=$data.list}>
					<tr class="tcon"><td colspan="10" style="background:#fff; padding-top:5px; padding-bottom:5px;"></td></tr>
					<tr class="tcon gbox">
						<td colspan="10" style="background:#f8f8f8; padding:8px 0;">
							<span class="od"><input name="key_id[]" type="checkbox" value="<{$i.id}>" class="checked_list"/></span>
							<span class="od"><{if $i.position}><img src="<{$__APP__}>public/images/icon/pst_<{$i.position}>.png"/><{else}><{/if}></span>
							<span class="od2"><{$i.order_no}></span>
							<span class="od2"><{$i.addtime}></span>
							<a href="<{$__ADMIN__}>member/enter?spid=<{$i.shop_id}>&url=seller/order/index?status=<{$i.order_status}>" target="_blank">卖家</a>
							<a href="<{$__ADMIN__}>member/enter?uid=<{$i.uid}>&url=order/index?status=<{$i.order_status}>" target="_blank">买家</a>
							<a href="javascript:;" data-id="<{$i.id}>" class="del3" style="float:right; margin-right:10px;">删除</a>
						</td>
					</tr>
					<{foreach key=kk item=g from=$i.goods}>
						<tr class="tcon gbox">
							<td></td>
							<td colspan="2" class="gds">
								<img src="<{$__IMG__}><{$g.images|img_size:40x40}>"/>
								<div class="desc">
									<p class="ttl"><a href="<{$__URI__}>goods/<{$g.gid}>.html" target="_blank"><{$g.title}></a></p>
									<p class="ttl2">
									<{if $g.sku}>	
										<{foreach item=s from=$g.sku}>		
											<span><{$s.0}> : <{$s.1}> &nbsp;&nbsp; </span> 
										<{/foreach}>
									<{/if}>
									</p>	
								</div> 
							</td>
							<td><{$g.price}></td>
							<td><{$g.buy_num}></td> 
							<td> 
								<{if $g.service_status >= 1}>
									<a href="<{$__ADMIN__}>goods_order/refund_edit?sid=<{$g.service_id}>"> 
										<{if $g.service_status != 0}>	
											<span style="color:#f00;"><{$g.service_status_cn}></span>
										<{else}>
											售后
										<{/if}>		
									</a>
								<{/if}> 
							</td>
							<{if $kk == 0}>
								<td class="border status_<{$i.order_status}>" rowspan="<{$i.span}>"><{$i.order_status_cn}></td>   
								<td class="border" rowspan="<{$i.span}>">
									<a href="<{$__ADMIN__}>goods_order/detail?id=<{$i.id}>">订单详情</a> 
								</td> 
								<td class="border" rowspan="<{$i.span}>" style=" overflow:hidden;"><{$i.remark}></td>
							<{/if}> 
						</tr>
					<{/foreach}>
				<{/foreach}>
			<{else}>
				<tr><td colspan="11">还没有数据，赶快添加吧！</td></tr>
			<{/if}>
		</tbody> 
	</table> 
	<{if $data.page}><div class="page"><{$data.page}></div><{/if}> 
</div>
<{include file="index/footer.html"}> 
<script type="text/javascript">
_delete('<{$__ADMIN__}>goods_order/del', '.del_ck'); 
</script>
