couponconsume.html 6.82 KB
{template 'common/header'}
{if $op == 'display'}
<div class="main">
	<ul class="nav nav-tabs">
		<li {if $_GPC['do'] == 'couponmanage'}class="active" {/if}><a href="{php echo $this->createWeburl('couponmanage', array('op' => 'display'))}">卡券管理</a></li>
		<li {if $_GPC['do'] == 'couponexchange'}class="active"{/if}><a href="{php echo $this->createWeburl('couponexchange', array('op' => 'display'));}">卡券兑换</a></li>
		<li {if $_GPC['do'] == 'couponconsume'}class="active" {/if}><a href="{php echo $this->createWeburl('couponconsume', array('op' => 'display'))}">卡券核销</a></li>
		<li {if $_GPC['do'] == 'memberproperty'}class="active" {/if}><a href="{php echo $this->createWeburl('memberproperty', array('op' => 'display'))}">会员属性</a></li>
		<li {if $_GPC['do'] == 'couponmarket'}class="active" {/if}><a href="{php echo $this->createWeburl('couponmarket', array('op' => 'display'))}">优惠券派发</a></li>
		<li style="display:none" {if $_GPC['do'] == 'wxcardreply'}class="active"{/if}><a href="{php echo $this->createWebUrl('wxcardreply', array('op' => 'display'))}">管理微信卡券回复</a></li>
	</ul>
	<div class="page-header clearfix">
		<h4 class="pull-left">卡券核销</h4>
	</div>
	<div class="panel panel-info">
		<div class="panel-heading">筛选</div>
		<div class="panel-body">
			<form action="./index.php" method="get" class="form-horizontal" role="form">
				<input type="hidden" name="c" value="site">
				<input type="hidden" name="a" value="entry">
				<input type="hidden" name="do" value="couponconsume">
				<input type="hidden" name="m" value="wn_storex">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">卡券类型</label>
					<div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
						<a href="{php echo filter_url('type:0')}" class="btn btn-{if empty($_GPC['type'])}primary{else}default{/if}">全部</a>
						<a href="{php echo filter_url('type:1')}" class="btn btn-{if $_GPC['type'] == 1}primary{else}default{/if}">折扣券</a>
						<a href="{php echo filter_url('type:2')}" class="btn btn-{if $_GPC['type'] == 2}primary{else}default{/if}">代金券</a>
						{if COUPON_TYPE == WECHAT_COUPON}
						<a href="{php echo filter_url('type:3')}" class="btn btn-{if $_GPC['type'] == 3}primary{else}default{/if}">团购券</a>
						<a href="{php echo filter_url('type:4')}" class="btn btn-{if $_GPC['type'] == 4}primary{else}default{/if}">礼品券</a>
						<a href="{php echo filter_url('type:5')}" class="btn btn-{if $_GPC['type'] == 5}primary{else}default{/if}">优惠券</a>
						{/if}
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
					<div class="col-sm-7 col-lg-8 col-md-8 col-xs-12 btn-group">
						<a class="btn btn-default {if $_GPC['status'] == '0'||$_GPC['status'] == ''}btn-primary{/if}" href="{php echo filter_url('status:0');}">不限</a>
						<a class="btn btn-default {if $_GPC['status'] == '1'}btn-primary{/if}" href="{php echo filter_url('status:1');}">未使用</a>
						<a class="btn btn-default {if $_GPC['status'] == '2'}btn-primary{/if}" href="{php echo filter_url('status:2');}">已失效</a>
						<a class="btn btn-default {if $_GPC['status'] == '3'}btn-primary{/if}" href="{php echo filter_url('status:3');}">已核销</a>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">code码</label>
					<div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
						<input class="form-control" name="code" value="{$_GPC['code']}" placeholder="code码" type="text">
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">领取人</label>
					<div class="col-sm-7 col-lg-8 col-md-8 col-xs-12">
						<input class="form-control" name="nickname" placeholder="粉丝昵称" type="text" value="{$_GPC['nickname']}">
					</div>
					<div class="pull-right col-xs-12 col-sm-3 col-lg-2">
						<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="panel panel-default">
		<div class="table-responsive panel-body">
			<table class="table table-hover">
				<thead class="navbar-inner">
				<tr>
					<th width="90">标题</th>
					<th width="90">领取方式</th>
					<th width="90">领取人</th>
					<th width="120">code码</th>
					<th width="60">状态</th>
					<th width="120">领取时间</th>
					{if $_GPC['status'] == '3' || ($_GPC['status'] == '' || empty($_GPC['status']))}
					<th width="120">使用时间</th>
					<th width="80">核销员</th>
					{/if}
					<th style="width:150px; text-align:center;">操作</th>
				</tr>
				</thead>
				<tbody>
				{loop $list $row}
				<tr>
					<td>{$row['title']}</td>
					<td>
						{if $row['givebyfriend'] == 1}
						<span class="label label-danger" data-toggle="tooltip" data-placement="top" title="赠送人:">朋友赠送</span>
						{elseif !empty($row['grantmodule'])}
						<span class="label label-warning">模块发放</span>
						{else}
						<span class="label label-success">自己领取</span>
						{/if}
					</td>
					<td>
						{if $nicknames_info[$row['openid']]['nickname']}
						{$nicknames_info[$row['openid']]['nickname']}
						{else}
						{php echo cutstr($row['openid'], 8);}
						{/if}
					</td>
					<td>{$row['code']}</td>
					<td>
						{if $row['rstatus'] == 1}
						<span class="label label-success">未使用</span>
						{elseif $row['rstatus'] == 2}
						<span class="label label-warning">已失效</span>
						{elseif $row['rstatus'] == 3}
						<span class="label label-danger">已核销</span>
						{elseif $row['rstatus'] == 4}
						<span class="label label-default">已删除</span>
						{/if}
					</td>
					<td>
						{php echo date('Y-m-d H:i:s', $row['addtime']);}
					</td>
					{if $_GPC['status'] == '3' || ($_GPC['status'] == '' || empty($_GPC['status']))}
					<td>
						{if $row['usetime']}
						{php echo date('Y-m-d H:i:s', $row['usetime']);}
						{/if}
					</td>
					<td>{$row['clerk_name']}</td>
					{/if}
					<td style="text-align:center;">
						{if !empty($row['code'])}
							{if $row['rstatus'] == 1 && $row['starttime'] <= $row['time'] && $row['endtime'] >= $row['time'] }
							<a href="javascript:;" onclick="util.ajaxshow('{php echo $this->createWebUrl('couponconsume', array('op' => 'consume', 'id' => $row['recid'], 'source' => $row['source']))}')" class="btn btn-default btn-sm" title="核销优惠券">核销</a>
							{/if}
							<a href="javascript:;" onclick="util.ajaxshow('{php echo $this->createWebUrl('couponconsume', array('op' => 'delete', 'id' => $row['recid'], 'source' => $row['source']))}')" class="btn btn-default btn-sm" title="删除兑换记录">删除</a>
						{/if}
					</td>
				</tr>
				{/loop}
				</tbody>
			</table>
		</div>
	</div>
	{$pager}
</div>
{/if}
{template 'common/footer'}