<{import file="header.html" title="优惠促销"}>
<style type="text/css"> 
.cbx{ width:300px; float:left; }
.cbx .l{ width:60px; float:left; } 
.cbx .l a.simg{ width:60px; height:60px; line-height:60px; border:1px solid #efefef; padding:1px; float:left;}
.cbx .l a.simg img{ max-height:60px; max-width:60px; }
.cbx .r{ float:left; }
.cbx .r .ttl{ width:100%; padding:0 0 0 10px; float:left;}
.cbx .r .ttl a{ text-align:left; font-size:12px; color:#333; padding:0 10px 0 10px; line-height:20px; float:left;  }
.cbx .r .ttl span{font-size:12px;line-height:22px; padding:0 10px 0 20px; color:#999999; text-align:left; float: left;} 
.cbx .r .intro{ width:440px; text-align:left; line-height:18px; padding:6px 0 0 15px; color:#999999; float:left;}
 
input.bfb{ padding:4px; text-align:center; }
input.submit2{ background:#00AB00; color:#fff; padding:5px 15px; float:left; }

.comm_box{ width:100%; float:left;  }
.comm_box span{ width:65px; margin-left:10px; float:left; }
.comm_box span i{ width:50px; padding:3px; border:1px solid #efefef; background:#f2f2f2; text-align:center; float:left; }
.comm_box span input{ width:50px; padding:3px; text-align:center; float:left; }
.comm_box a{ background:#D4D5D7; color:#333; padding:4px 5px 4px;border-radius:2px; float:left; }
</style> 
<div class="tab"><span>优惠券</span></div>
<div class="filter">
	<a href="<{$__SELLER__}>promote/coupon?type=0"<{if $smarty.get.type == '0'||$smarty.get.type == ''}> class="ch"<{/if}>>全部</a>
	<a href="<{$__SELLER__}>promote/coupon?type=1"<{if $smarty.get.type == '1'}> class="ch"<{/if}>>使用中</a>
	<a href="<{$__SELLER__}>promote/coupon?type=2"<{if $smarty.get.type == '2'}> class="ch"<{/if}>>待使用</a>
	<a href="<{$__SELLER__}>promote/coupon?type=3"<{if $smarty.get.type == '3'}> class="ch"<{/if}>>已过期</a> 
</div>
<div class="actbtn">
	<a href="<{$__SELLER__}>promote/coupon_edit" class="add">添加优惠券</a>
</div>
<div class="lbox">
	<table class="ltable">
		<thead>
			<tr>  
				<th>名称</th> 
				<th width="120">优惠</th>
				<th width="60">数量</th>
				<th width="50">领取</th>
				<th width="80">开始</th> 
				<th width="80">结束</th> 
				<th width="60">状态</th> 
				<th width="130">操作</th> 
			</tr>
		</thead> 
		<tbody>  
		<{uqcms m="promote" v="data" c="coupon_list:type=smarty.get.type"}>
		<{if $data.list}>	
			<{foreach item=i from=$data.list}>		 
				<tr> 
					<td style="padding:12px 0 12px 5px;">
						<div class="cbx">
							<div class="l">
								<{if $i.images}>
									<img src="<{$__IMG__}><{$i.images|img_size:60x60}>"/>
								<{else}>
									<img src="<{$__APP__}>public/images/quan.png" width="60"/>
								<{/if}>
							</div> 
						</div>	
					</td> 
					<td>满<{$i.full_price}>减<{$i.price}></td>
					<td><{$i.num}></td>
					<td><{$i.grant_num}></td>
					<td><{$i.start_time}></td> 
					<td><{$i.end_time}></td> 
					<td><{if $i.status == 1}>通过<{else}>等待审核...<{/if}></td> 
					<td>
						<a href="<{$__SELLER__}>promote/coupon_edit?id=<{$i.id}>" class="edit">编辑</a>
						<a href="javascript:;" data-id="<{$i.id}>" class="del">删除</a>
					</td>
				</tr>
			<{/foreach}> 
		<{else}> 
			<tr><td colspan="8" class="btm"><div class="nomsg"><i></i><span>您暂时还没有优惠活动~</span></div></td></tr>
		<{/if}>		
		</tbody>
	</table>
	<{if $data.page}><div class="page"><{$data.page}></div><{/if}>
</div>
<{import file="footer.html"}> 
<script type="text/javascript">
_delete('<{$__SELLER__}>promote/coupon_del');
</script>