<{import file="common.html" title="订单列表"}> 
<style type="text/css"> 
body{ background:#f8f8f8; }
.headerBox{ width:100%; border-bottom:1px solid #efefef; margin-bottom:10px; background:#fff; float:left;} 
.headerBox a{ width:20%; padding:15px 0 8px; font-size:0.95rem; text-align:center; float:left; } 
.headerBox a.ch{ border-bottom:1px solid #f00; color:#f00; } 
/**/
.olist{ width:100%; padding:0 0 41px 0; float:left;}
.olist .obox{ width:100%; padding:10px 0; margin:0 0 10px 0; background:#fff; float: left;}
.olist .obox .lname{ width:100%; padding:6px 0 10px 0; border-bottom:1px solid #f8f8f8; float:left;}
.olist .obox .lname .l{ padding:0 0 0 10px; float:left;}
.olist .obox .lname .l span{ background:url(<{$__APP__}>public/images/icon/shop.png) no-repeat; background-size:16px; width:18px; height:18px; margin:2px 3px 0 0; float:left; }
.olist .obox .lname .l i{ margin:0 5px 0 0; float:left; }
.olist .obox .lname .l em{ background:#f00; font-size:0.9rem; margin:0; padding:2px 0 0px; line-height:15px; color:#fff; float:left; }
.olist .obox .lname .r{ padding:0 10px 0 0; color:#f00; float:right;}
.olist .obox .glist{ width:100%; background:#F8F8F8; margin-bottom:1px; padding:10px 0; float:left;} 
.olist .obox .glist .img{ width:80px; text-align:center; float:left;}
.olist .obox .glist .img img{ border:1px solid #f8f8f8; border-radius:3px; }
.olist .obox .glist .grit{ padding:0 0 0 0; margin:0 0 0 80px;  }
.olist .obox .glist .grit .ttl{ width:100%; float:left; }
.olist .obox .glist .grit .ttl .sttl{ width:75%; float:left;}
.olist .obox .glist .grit .ttl .sttl a{ font-size:13px; color:#333;line-height:16px;}
.olist .obox .glist .grit .ttl .pr{width:20%; float:right;}
.olist .obox .glist .grit .ttl .pr span{ padding:0 10px 0 0; color:#333; font-size:14px; text-align:right;float:right; }
.olist .obox .glist .grit .sku{ width:100%; padding:2px 0 0 0; float:left;}
.olist .obox .glist .grit .sku span{ font-size:13px; color:#999; float:left;}
.olist .obox .glist .grit .sku span.num{ padding:1px 10px 0 0; float:right;}

/*订单操作*/ 
.olist .obox .do{ width:100%; padding:12px 0 0px 0; float:left;}
.olist .obox .do .total{ background:#fff; padding:7px 0 0 10px; float:left;  }
.olist .obox .do .total span{ float:right; color:#333; padding:0 15px 0 0; font-size:13px; } 
.olist .obox .do .dorit { float:right; }
.olist .obox .do .dorit a{ padding:6px 8px 5px; font-size:12px; border:1px solid #ccc; border-radius:30px; color:#333; background:#fff; margin-right:10px; float:left; }
.olist .obox .do .dorit a.tag{ border:1px solid #f00; color:#f00; } 
.olist .obox .do .dorit a.red{ background:#f00; color:#fff; border:1px solid #f00; }
</style> 
<div class="cnav">
	<a class="back">&nbsp;</a>我的订单<a href="javascript:;" class="thome">主页</a>
</div>
<div class="headerBox">
	<a href="?m=order&a=index"<{if $smarty.get.status == ''}> class="ch"<{/if}>>全部</a>
	<a href="?m=order&a=index&status=1"<{if $smarty.get.status == 1}> class="ch"<{/if}>>待付款</a>
	<a href="?m=order&a=index&status=2"<{if $smarty.get.status == 2}> class="ch"<{/if}>>待发货</a>
	<a href="?m=order&a=index&status=3"<{if $smarty.get.status == 3}> class="ch"<{/if}>>待收货</a>
	<a href="?m=order&a=index&status=4"<{if $smarty.get.status == 4}> class="ch"<{/if}>>待评价</a>
</div> 
<div class="olist">
<{uqcms m="order" v="data" c="order_list:user_type=1&page=smarty.get.page&page_size=10&page_type=2&status=smarty.get.status"}>
<{if $data.list}>
	<{foreach item=i from=$data.list}>
	<div class="obox">
		<div class="lname">
			<div class="l">
				<span></span>
				<i><{$i.shop_name}></i>
				<{if $i.otype == '2'}><em>拼团</em><{/if}>
			</div>
			<div class="r">
				<{if $i.otype == '2' && $i.order_status == '0'}>
					拼团失败
				<{else}>
					<{$i.order_status_cn}>
				<{/if}> 
			</div>
		</div>
		<{foreach key=k item=g from=$i.glist}>
			<div class="glist"> 
				<div class="img"><a href="?m=order&a=detail&oid=<{$i.order_no}>"><img src="<{$__IMG__}><{$g.images|img_size:120x120}>" width="60"></a></div>
				<div class="grit">
					<div class="ttl">
						<div class="sttl"><a href="?m=order&a=detail&oid=<{$i.order_no}>"><{$g.title|truncate:28:""}></a></div>
						<div class="pr"><span>￥<{$g.price}></span></div>
					</div>
					<div class="sku">
						<{if $g.sku}>	
							<span>
								<{foreach item=s from=$g.sku}>		
									<{$s.0}> : <{$s.1}> &nbsp; 
								<{/foreach}>
							</span>
						<{/if}> 
						<span class="num"> × <{$g.buy_num}></span>
					</div>
				</div> 
			</div>  
		<{/foreach}>
		<div class="do">
			<div class="total">
				<span>实付款 ￥<{$i.total_price}> 
					<{if $i.express_price == '0.00' || $i.express_price == ''}> 
					<{else}>
					 	(含运费<{$i.express_price}>)</p>
					<{/if}>
				</span>
			</div>
			<div class="dorit"> 
				<{if $i.order_status == '1'}>
					<a href="javascript:;"  onClick="cancel_order('取消订单','?m=order&a=cancel_order&oid=<{$i.order_no}>');">取消订单</a>
					<a href="member.php?m=buy&a=pay_trade&oid=<{$i.order_no}>" class="tag">马上付款</a>
				<{elseif $i.order_status == '2'}>
					<a href="?m=order&a=detail&oid=<{$i.order_no}>">查看订单</a> 
				<{elseif $i.order_status == '3'}>
					<a href="?m=order&a=detail&oid=<{$i.order_no}>" class="button_do">确认收货</a>
				<{elseif $i.order_status == '4'}>
					<a href="?m=order&a=comment&oid=<{$i.order_no}>" class="tag">订单评价</a> 
				<{elseif $i.order_status == '5'}>
					<a href="?m=order&a=detail&oid=<{$i.order_no}>">查看订单</a> 
				<{elseif $i.order_status == '8'}>
					<a href="?m=goods&a=share_link&share_id=<{$i.share_id}>" class="red">邀请好友拼单</a>  
				<{else}>
					 <a href="?m=order&a=detail&oid=<{$i.order_no}>">查看订单</a> 
				<{/if}>
			</div>
		</div>  
	</div>
	<{/foreach}>
	<{$data.page}>
<{else}>
	<div class="nomsg"><span>暂无订单记录</span></div>	
<{/if}>		
</div>
<{include file="default/footer.html"}> 
<script type="text/javascript">
scrollLoad(".olist", ".obox");
function cancel_order(name, url){
	mdialog(name,url); 
}
</script>