<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>瞎猫超市-订单中心</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no, minimal-ui" />
<link rel="shortcut icon" href="../favicon.ico">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta content=”telephone=no,email=no” name=”format-detection” />
<link rel="stylesheet" href="../static/light7/css/light7.min.css">
<link rel="stylesheet" href="../static/css/mobile.style.css">
</head>
<body>
	<div class="page" id="main">
		<header class="bar bar-nav">
			<a class="button button-link button-nav pull-left back" href="user.html"
				data-transition='slide-out'><span
				class="icon icon-left"></span>返回</a> </a>
			<h1 class="title">我的订单</h1>
		</header>
		<div class="content">
			<div class="buttons-row">
				<a href="#tab1" class="tab-link active button">最新订单</a> 
				<a href="#tab2" class="tab-link button">待收货/消费</a>
			</div>
			<div class="content-block">
				<div class="tabs">
					<div id="tab1" class="tab active"></div>
					<div id="tab2" class="tab"></div>
				</div>
			</div>
		</div>
	</div>
	<script src='../static/plugins/jquery/jquery-2.2.3.min.js'></script>
	<script src='../static/plugins/jquery/jquery.json.min.js'></script>
	<script src='../static/common/drain.mobile.js'></script>
	<script src='../static/light7/js/light7.min.js'></script>
	<script src='../static/light7/js/i18n/cn.js'></script>
	<script src="../static/plugins/artTemplate/js/template.js"></script>
	<script type="text/javascript" src="js/fastord.js"></script>
	<script type="text/html" id="noorderHtml">
		<div class="card">
			<div class="card-header">温馨提示</div>
			<div class="card-content">
				<div class="card-content-inner">暂无任何订单信息&nbsp;&nbsp;<a href="market.html" class="link-title external">要去购物吗？</a></div>
			</div>
		</div>
	</script>
	<script type="text/html" id="fastordHtml">
		{{each records as ord}}
	<div class="card" id="{{ord.ordId}}">
	<div class="card-header">
		<span style='color:#ccc'>{{ord.ordId}}<!--{{ord.createTime}}--></span>
		<span class="red-span">{{ord.sum}}&yen;</span>
	</div>
	<div class="card-content">
		<div class="list-block media-list">
       	 <ul style="padding-left:0px;">
          <li class="item-content">
            <div class="item-media">
				<a class='link-title external' href='product.html?id={{ord.prodId}}'>
            	   <img src='{{ord.pic}}' style="max-width:100%;max-height:120px;">
				</a>
            </div>
            <div class="item-inner">
              <div class="item-title-row">
                 <span style='font-size:15px;'>{{ord.pname}}</span>
              </div>
              <div class="item-subtitle">
				单价：<span class="red-span">{{ord.price}}&yen;</span>&nbsp;|&nbsp;{{ord.amount}} 件 <br>{{ord.style}}
			  </div>
            </div>
          </li>
        </ul>
		</div>

		<div class="card-footer">
			<span style='color:#336699'>{{if ord.ordStatus=='UnPay'}}
				等待付款
			{{else}}
				{{if ord.ordStatus=='UnConfirm'}}
					商家未确认，请等待
				{{else}}
					<!--
					{{if ord.ordStatus!='Finished'}}
						交易中
					{{/if}}
					-->
				{{/if}}
			{{/if}}
			</span>

			<span style="font-size:15px;font-weight:600">
			{{if ord.ordStatus=='UnPay'}}
				<!--<a href="pay.html?ordnum={{ord.ordId}}" class="button button-danger external">去付款</a>-->
			    <a href="#" onclick="removeOrd('{{ord.ordId}}')" class="button button-danger">删除订单</a>
			{{else}}
				{{if ord.ordStatus=='UnConfirm'}}
						<a href="#" onclick="remind('{{ord.ordId}}')" class="button">提醒商家</a>
				{{else}}
					{{if ord.ordStatus!='Finished'}}
						<!--<a href="#" onclick="showFlow('{{ord.ordId}}')" class="button">查看进度</a>-->
						请及时到店消费或提取商品
					{{/if}}
				{{/if}}
			{{/if}}
			</span>
		</div>
	</div>	
</div>
{{/each}}
	</script>
</body>
</html>