<extend name="./Apps/Home/View/default/users/layout.html" />
<block name="content">
    <div class="wst-body"> 
       <div class='wst-page-header'>买家中心 > 待评价交易</div>
       <div class='wst-page-content'>
        <table class='wst-list' style="font-size:13px;">
           <thead>
             <tr>
               <th width='80'>订单编号</th>
               <th width='*'>商品信息</th>
               <th>商品评分</th>
               <th>时效评分</th>
               <th>服务评分</th>
             </tr>
           </thead>
           <tbody>
           	<?php $c=1;?>
            <volist name="appraiseList['root']" id="appraise" key='key1'>
             <tr style="border-bottom:1px solid #eeeeee;">
             	<td width='80' style="padding-top:10px;vertical-align:top;">{$appraise["orderNo"]}</td>
                <td width='*'>
                    <div style='width:300px;'>
                    <div style='width:70px;float:left'>
                    <?php if($appraise['orderFrom']==2){ ?>
                    	<a href="{:U('Home/Groups/getGoodsDetails/',array('id'=>$appraise['orderFromId']))}" target="_blank">
                     <?php }else if($appraise['orderFrom']==3){ ?>
                    	<a href="{:U('Home/Panics/getGoodsDetails/',array('id'=>$appraise['orderFromId']))}" target="_blank">
                    <?php }else{ ?>
                    	<a target='_blank' href="{:U('Home/Goods/getGoodsDetails/',array('goodsId'=>$appraise['goodsId']))}">
                    <?php } ?>
						<img class='lazyImg' data-original="__ROOT__/{$appraise['goodsThums']}" height="60" width="60"/>
					</a>
					</div>
					<div style='width:230px;float:left;line-height:25px;'>
					<div>{$appraise['goodsName']}</div>
					</div>
					</div>
				</td>
               	<td >
               	<for start="0" end="$appraise['goodsScore']">
					<img src="__ROOT__/Apps/Home/View/{$WST_STYLE}/images/icon_score_yes.png"/>
				</for>&nbsp;{$appraise["goodsScore"]} 分
				</td>
				<td >
				<for start="0" end="$appraise['timeScore']">
					<img src="__ROOT__/Apps/Home/View/{$WST_STYLE}/images/icon_score_yes.png"/>
				</for>&nbsp;{$appraise["timeScore"]} 分
				</td>
				<td>
				<for start="0" end="$appraise['serviceScore']">
					<img src="__ROOT__/Apps/Home/View/{$WST_STYLE}/images/icon_score_yes.png"/>
				</for>&nbsp;{$appraise["serviceScore"]} 分
               	</td>
             </tr>

             <tr>
                <td colspan='5'>评价：{$appraise["content"]}
            	<div id="layer-photos-appraise{$c}"  style="margin-bottom:10px"> 
           		  <?php foreach($appraise['appraisesAnnex'] as $q=>$v):?>
           		  <?php if($v!=""){ ?>
				  <img  layer-src="__ROOT__/<?php echo $v?>" width="50" src="__ROOT__/<?php echo str_replace('.','_thumb.',$v)?>" alt="{$appraise['content']}">
				  <?php } ?>
				  <?php endforeach;?>
				</div>

                </td>
             </tr>

             <?php ++$c;?>
             </volist>
             <if condition="$appraiseList['totalPage'] gt 1">
             <tfoot>
             <tr>
                <td colspan='8' align='center' style="height:30px;border-bottom: 0px;">
					<div class="wst-page" style="float:right;padding-bottom:10px;">
						<div id="wst-page-items">
						</div>
					</div>
				</td>
             </tr>
             </tfoot>
             </if>
           </tbody>
        </table>
        </div>
    </div>
    <script>
    <if condition="$appraiseList['totalPage'] gt 1">
    $(document).ready(function(){
		laypage({
		    cont: 'wst-page-items',
		    pages: {$appraiseList['totalPage']}, //总页数
		    skip: true, //是否开启跳页
		    skin: '#e23e3d',
		    groups: 3, //连续显示分页数
		    curr: function(){ //通过url获取当前页，也可以同上（pages）方式获取
		        var page = location.search.match(/pcurr=(\d+)/);
		        return page ? page[1] : 1;
		    }(), 
		    jump: function(e, first){ //触发分页后的回调
		        if(!first){ //一定要加此判断，否则初始时会无限刷新
		        	var nuewurl = WST.splitURL("pcurr");
		        	var ulist = nuewurl.split("?");
		        	if(ulist.length>1){
		        		location.href = nuewurl+'&pcurr='+e.curr;
		        	}else{
		        		location.href = '?pcurr='+e.curr;
		        	}
		            
		        }
		    }
		});
    });
	</if>
	<?php for($i=1;$i<$c;++$i) {?>
 			layer.photos({
			    photos: '#layer-photos-appraise'+<?php echo $i?>
			  });
 	<?php }?>
</script>
</block> 