<{import file="common.html" title="订单列表"}> 
<style type="text/css">  
.headerBox{ width:100%; border-bottom:1px solid #fff; background:#fff; float:left;} 
.headerBox a{ width:20%; padding:0.3rem 0 0.2rem; font-size:0.3rem; text-align:center; float:left; } 
.headerBox a.ch{ border-bottom:2px solid #f00; font-weight:bold; } 

/**/
.olist{ width:100%; padding:0.25rem 0.2rem; box-sizing:border-box; background:#eee; float:left;}
.olist .obox{ width:100%; margin:0 0 0.2rem 0; background:#fff; border-radius:0.1rem; float: left;}
.olist .obox .lname{ width:100%; padding:0.26rem 0 0.23rem 0; border-bottom:1px solid #efefef; float:left;}
.olist .obox .lname .l{ padding:0 0 0 10px; font-size:0.3rem; float:left;} 
.olist .obox .lname .l i{ margin:0 5px 0 0; float:left; }
.olist .obox .lname .l a{ font-size:0.28rem; font-weight:bold; float:left; }
.olist .obox .lname .l em{ background:#f00; font-size:0.2rem; margin:0 0.05rem 0 0; padding:2px 0 0px; line-height:15px; color:#fff; float:left; }
.olist .obox .lname .r{ padding:0 0.2rem 0 0; font-size:0.28rem; color:#f00; float:right;}

.glist{ width:100%; background:#fff; margin-bottom:1px; padding:0.2rem 0; float:left;} 
.glist .img{ width:1.5rem; height:1.5rem; border:1px solid #f8f8f8; border-radius:0.05rem; overflow:hidden; text-align:center; margin:0 0.2rem; float:left;}
.glist .img img{ width:100%; height:100%; }

.glist .gctr{ width:3.5rem; float:left; }
.glist .gctr .ttl{ width:100%; max-height:0.72rem; overflow:hidden; float:left;}
.glist .gctr .ttl i{ font-size:0.26rem; background:#f00; color:#fff; border-radius:3px; float: left; }
.glist .gctr .ttl a{ font-size:0.26rem; color:#333; line-height:0.38rem; float:left; }

.glist .gctr .sku{ width:100%; padding:0.1rem 0 0 0; float:left;}
.glist .gctr .sku span{ font-size:0.25rem; color:#999; float:left;}

.glist .grit{ width:1.2rem; padding:0 0.2rem 0 0; float:right; }
.glist .grit .pr{ width:100%; line-height:.38rem; font-size:0.26rem; text-align:right; color:#333; float:left;} 
.glist .grit .num{ width:100%; padding:0.05rem 0 0 0; font-size:0.26rem; color:#999; text-align:right; float:left;}

/*订单操作*/
.olist .obox .do{ width:100%; padding:0.2rem 0; border-top:1px solid #efefef; float:left;}
.olist .obox .do .total{ background:#fff; padding:0; float:left;  }
.olist .obox .do .total span{ float:right; color:#333; padding:0.15rem 0.2rem; font-size:0.28rem; float:left; } 
.olist .obox .do .dorit { float:right; }
.olist .obox .do .dorit a{ padding:0.15rem 0.3rem; font-size:0.25rem; border:1px solid #eee; border-radius:3rem; color:#666; background:#fff; margin-right:0.2rem; float:left; }
.olist .obox .do .dorit a.tag{ border:1px solid #f00; background:#f00; color:#fff; } 
.olist .obox .do .dorit a.red{ background:#f00; color:#fff; border:1px solid #f00; }
</style> 
<div class="cnav">
	<a class="back" href="<{$__WAP__}>member/index">&nbsp;</a>我的订单<a href="javascript:;" class="thome">主页</a>
</div>
<div class="headerBox">
	<a href="<{$__WAP__}>order/index" <{if $smarty.get.status == ''}> class="ch"<{/if}>>全部</a>
	<a href="<{$__WAP__}>order/index?status=1" <{if $smarty.get.status == 1}> class="ch"<{/if}>>待付款</a>
	<a href="<{$__WAP__}>order/index?status=2" <{if $smarty.get.status == 2}> class="ch"<{/if}>>待发货</a>
	<a href="<{$__WAP__}>order/index?status=3" <{if $smarty.get.status == 3}> class="ch"<{/if}>>待收货</a>
	<a href="<{$__WAP__}>order/index?status=4" <{if $smarty.get.status == 4}> class="ch"<{/if}>>待评价</a>
</div> 
<div class="olist">
	<{uqcms m="order" v="data" c="order_list:page=smarty.get.page&page_size=10&page_type=scroll&status=smarty.get.status"}>
	<{if $data.list}> 
		<{foreach item=i from=$data.list}>
			<div class="obox">
				<div class="lname">
					<div class="l"><i></i><a href="<{$__WAP__}>shop/<{$i.shop.id}>"><{$i.shop.name}></a></div>
					<div class="r"><{$i.order_status_cn}></div>
				</div>
				<{foreach key=k item=g from=$i.glist}>
					<div class="glist"> 
						<div class="img">
							<a href="<{$__WAP__}>order/detail?oid=<{$i.order_no}>">
								<img src="<{$__IMG__}><{$g.images|img_size:120x120}>" width="60">
							</a>
						</div>
						<div class="gctr">
							<div class="ttl"><a href="<{$__WAP__}>order/detail?oid=<{$i.order_no}>"><{$g.title|truncate:28:""}></a></div>
							<div class="sku">
								<{if $g.sku}>	
									<span>
										<{foreach item=s from=$g.sku}>		
											<{$s.0}> : <{$s.1}> &nbsp; 
										<{/foreach}>
									</span>
								<{/if}> 
							</div>
						</div>
						<div class="grit"> 
							<div class="pr">￥<{$g.price}></div>
							<div class="num"> × <{$g.buy_num}></div> 
						</div> 
					</div>  
				<{/foreach}> 
				<div class="do">
					<div class="total">
						<span>合计￥<{$i.total_price}></span>
					</div>
					<div class="dorit"> 
						<{if $i.order_status == '1'}>
							<a href="javascript:;"  onClick="cancel_order('取消订单','<{$__WAP__}>order/cancel_order?oid=<{$i.order_no}>');">取消订单</a>
							<a href="<{$__URI__}>order/pay?order_no=<{$i.order_no}>" class="tag">马上付款</a>
						<{elseif $i.order_status == '2'}>
							<a href="<{$__WAP__}>order/detail?oid=<{$i.order_no}>">查看订单</a> 
						<{elseif $i.order_status == '3'}>
							<a href="<{$__WAP__}>order/detail?oid=<{$i.order_no}>" class="button_do">确认收货</a>
						<{elseif $i.order_status == '4'}>
							<a href="<{$__WAP__}>order/comment?oid=<{$i.order_no}>">订单评价</a> 
						<{elseif $i.order_status == '5'}>
							<a href="<{$__WAP__}>order/detail?oid=<{$i.order_no}>">查看订单</a>
						<{else}>
							 <a href="<{$__WAP__}>order/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); 
}
//mdialog('取消订单', '//weixin.uqcms.com/wap/order/cancel_order?oid=2019123018362108148'); 
</script>