<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>我的订单管理 - KGCMS</title>
	<link rel="stylesheet" href="{{kg['tpl_url']}}mobile/css/order_mobile.css">
	<script src="{{kg['tpl_url']}}mobile/js/jquery-3.2.1.min.js"></script>
	<script src="{{kg['tpl_url']}}mobile/js/weui.min.js"></script>
	<script src="{{kg['tpl_url']}}mobile/js/zepto.min.js"></script>
	<script src="{{kg['tpl_url']}}mobile/js/common.js"></script>
	<script src="{{kg['tpl_url']}}mobile/layer_mobile/layer.js"></script>

</head>
<body ontouchstart>
	{% include 'component_header_mobile.tpl' %}
	<div class="box" >
		<div class="weui-tab__panel">
			<div class="weui-cells_form">
				{% if kg['order'] %}
				{% for row in kg['order'] %}
				<div class="weui-cells" >
					<div class="weui-cell" >
						<div class="weui-cell__hd"><label class="weui-label">订单号</label></div>		
						<div class="weui-cell__bd">{{row['oid']}}</div>					
					</div>
					<div class="weui-cell" >
						<div class="weui-cell__hd"><label class="weui-label">应付金额</label>	</div>		
						<div class="weui-cell__bd"><span><i class="fa fa-jpy"></i> {{row['amount']}}</div>						
					</div>
					<div class="weui-cell" >
						<div class="weui-cell__hd">	<label class="weui-label">下单时间</label></div>		
						<div class="weui-cell__bd">{{row['date']}}</div>						
					</div>
					<div class="weui-cell" >
						<div class="weui-cell__hd " >	<label class="weui-label">订单状态</label></div>			
						<div class="weui-cell__hd {% if row['status'] == -4 %}text-danger{% elif row['status']<4 and row['status']>-4 and row['status']!=0%} text-success {% elif row['status'] == 0 %}text-warm {%else%}{%endif%}">{{row['status_title']}}</div>			
					</div>
					<div class="weui-cell" >
						<div class="weui-cell__hd">	<label class="weui-label">订单操作</label></div>			
						<div class="weui-cell__hd">
							<div class="weui-cell__hd">
								<a class="btn btn-primary" href="checkout_mobile?id={{row['id']}}"><i class="fa fa-eye">&nbsp;</i>查看</a>
								{% if row['status'] in [-4, 4] %}
								<a class="btn btn-danger" href="order_mobile?action=del&id={{row['id']}}"><i class="fa fa-trash-o">&nbsp;</i>删除</a>
								{% endif %}
								{% if row['status'] == 4 %}
								<a class="btn btn-success" href="javascript(viod0);"><i class="fa fa-check-circle">&nbsp;</i>已签收</a>
								{% endif %}
							</div>	
							<div class="weui-cell__hd" style="margin-top: 8px;">
								{% if row['status'] == 0 %}
								<a class="btn btn-success" href="order_mobile?action=pay&id={{row['id']}}"><i class="fa fa-credit-card">&nbsp;</i>支付</a>
								<a class="btn btn-warm" href="order_mobile?action=cancel&id={{row['id']}}"><i class="fa fa-pencil">&nbsp;</i>取消</a>
								<a class="btn btn-primary" href="checkout_mobile?id={{row['id']}}"><i class="fa fa-pencil-square-o">&nbsp;</i>修改</a>
								{% endif %}
							</div>	
						</div>	
					
					</div>
				</div>
				{% endfor %}
				{%else%}
				<div class="weui-cells" >
					<div class="weui-cell" >
						<div class="weui-cell__hd" >没有找到订单记录</div>
					</div>
				</div>
				{%endif%}
			</div>
			{% if kg['order'] %}{{kg['page_html']}}{% endif %}
		</div>
    </div>
    {% include 'component_footer_mobile.tpl' %}
 </body>