{extend name="default/users/base" /}
{block name="title"}待收货订单 - 用户中心 - {:WSTConf('CONF.shopName')}{__block__}{/block}
{block name="css"}
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
{/block}
{block name="content"}
<div class="wst-user-box"><div class="wst-user-info">
  <div class="wst-user-head">待收货订单</div>
  <div class='wst-user-tbar'>
     <input type='text'  class="u-query" placeholder="请输入收货人" id='userName'/> 
     <input type='text'  class="u-query" placeholder="请输入订单号" id='orderNo'/> 
     <button class="wst-button wst-btn-query" onclick="waitReceiveByPage()">查询</button>
  </div>
  <div class='wst-user-content'>
  	<div class="wst-or-list" id='loadingBdy'></div>
       <script id="tblist" type="text/html">
	   {{# if(d.length>0){ }}
       {{# for(var i = 0; i < d.length; i++){ }}
  		<div class="list">
  			<div class="state">{{d[i].status}}</div>
  			<div class="time">
  				<div class="left">{{d[i].createTime}}<span class="sep">|</span>{{d[i].userName}}<span class="sep">|</span>订单号：{{d[i].orderNo}}<span class="sep">|</span>{{d[i].payTypeName}}</div>
  				<div class="right">订单金额：<span class="money">{{d[i].realTotalMoney}}</span>元</div>
  				<div class="wst-clear"></div>
  			</div>
  			<div class="details">
  				<div class="left">
         			{{# 
            		var tmp = null,rows = d[i]['list'].length;
            		for(var j = 0; j < d[i]['list'].length; j++){ 
                  		tmp = d[i]['list'][j];
            					var parmas = {};
                   					parmas.id = d[i].orderId;
                    				parmas.isBatch = 0;
          			}}
  					<div class="goods">
						<a href="{{WST.U('home/goods/detail','goodsId='+tmp.goodsId)}}" target='_blank'><p>{{WST.cutStr(tmp.goodsName,30)}}{{tmp.goodsSpecNames}}</p></a><p>{{tmp.goodsPrice}}元&nbsp;x&nbsp;{{tmp.goodsNum}}</p>
                		<a href="{{WST.U('home/goods/detail','goodsId='+tmp.goodsId)}}" target='_blank'>
                		<img data-original='__RESOURCE_PATH__/{{tmp.goodsImg}}'  title='{{tmp.goodsName}}' class="gImg" src="__RESOURCE_PATH__/{:WSTConf('CONF.goodsLogo')}">
                		</a>
					</div>
					{{# } }}
  				</div>
  				<div class="right">
					{{# if (d[i].orderStatus==1){ }}
                	<a href='javascript:void(0);' onclick='javascript:toReceive({{d[i].orderId}})'>确认收货</a>
                	<a href='javascript:void(0);' onclick='javascript:toReject({{d[i].orderId}})'>拒绝收货</a>
                	{{# } }}
					<a href='javascript:void(0);' onclick='view({{d[i].orderId}})' class="btn">订单详情</a>
  				</div>
  				<div class="wst-clear"></div>
  			</div>
  	   </div>
       {{# } }}
	   {{# }else{ }}
			<div class='empty-row'>当前没有交易订单。</div>
	   {{# } }}
       </script>
       <div class='empty-row'>
            <div id="pager" class="wst-pager">&nbsp;</div>
       </div>
  </div>
</div></div>
{/block}
{block name="js"}
<script type='text/javascript' src='__STYLE__/users/orders/orders.js?v={$v}'></script>
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
<script>
$(function(){
	waitReceiveByPage();
})
</script>
{/block}