文件

146 行
5.9 KiB
HTML
可执行文件

<html>
<head>
<meta charset="UTF-8">
<title>优惠券管理</title>
<link href="__PUBLIC__/user/css/base.css" rel="stylesheet">
<link href="__PUBLIC__/user/css/jquery.validate.unobtrusive.popstyle.css" rel="stylesheet">
<script src="__PUBLIC__/user/js/jquery-2.0.3.min.js"></script>
<script src="__PUBLIC__/user/js/jquery.validate.js"></script>
<script src="__PUBLIC__/user/js/jquery.validate.unobtrusive.js"></script>
<script src="__PUBLIC__/user/js/jquery.form.js"></script>
<script src="__PUBLIC__/user/js/layer.js"></script>
<link rel="stylesheet" href="__PUBLIC__/user/css/layer.css?v=3.0.11110" id="layuicss-skinlayercss">
<script src="__PUBLIC__/user/js/post.loading.js"></script>
</head>
<body class="hold-transition skin-blue sidebar-mini" style="cursor: pointer;">
<link href="__PUBLIC__/user/css/bootstrap.min.css" rel="stylesheet">
<link href="__PUBLIC__/user/css/index.css" rel="stylesheet">
<link href="__PUBLIC__/user/css/store.css" rel="stylesheet">
<style>
body {
overflow-x: scroll !important;
}
.btn-info2{
background-color: #1E9FFF;
color:white;
margin-top: 5px;
}
.btn-info2:hover{
color:white;
}
</style>
<div class="manage" style="height: 78px;">
<div class="manage_left">
<div class="Business_lan">
<a href="{:U('/user/coupon/addcoupon')}" addtab="添加优惠券"><img src="__PUBLIC__/user/images/yuangongguanli/add1.png">添加优惠券</a>
</div>
</div>
</div>
<div class="manage" style="height: 99px;">
<div class="manage_left" style="margin-top: 41px;">
<div class="Business_title3" id="div1">
<a class="btn btn-default" href="{:U('/user/coupon/index')}" aria-expanded="false">正常优惠券</a>
<a class="btn btn-info2" href="{:U('/user/coupon/soldout')}" aria-expanded="false">下架优惠券</a>
<a class="btn btn-default" href="{:U('/user/coupon/overdue')}" aria-expanded="false">过期优惠券</a>
</div>
</div>
</div>
<div class="Business" style="">
<div class="Business_tb1">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<th>序号</th>
<th>卡卷名称</th>
<th>满减</th>
<th>卡卷有效期至</th>
<th>添加时间</th>
<th>卡券总数量</th>
<th>卡券库存</th>
<th>卡券已发放数量</th>
<th>卡券已使用数量</th>
<!--<th>投放</th>-->
<th>操作</th>
</tr>
<volist name="couponlist" id="clerk" empty="$empty">
<tr>
<td>{$key+1}</td>
<td>{$clerk['coupon_name']}</td>
<td>满{$clerk['needmoney']}减{$clerk['reducemoney']}</td>
<td>{:date("Y-m-d H:i:s",$clerk['deadtime'])}</td>
<td>{:date("Y-m-d H:i:s",$clerk['addtime'])}</td>
<td>{$clerk['coupon_allnum']}</td>
<td>{$clerk['coupon_num']}</td>
<td>{$clerk['coupon_allnum']-$clerk['coupon_num']}</td>
<td>{$clerk['usenum']}</td>
<!--<td>-->
<!--<if condition="$clerk['launch'] eq '' ">-->
<!--未投放-->
<!--<else />-->
<!--已投放-->
<!--<volist name="clerk['launch']" id="vo">-->
<!--vip{$vo.grade}{$vo.cardname}、-->
<!--</volist>-->
<!--</if>-->
<!--</td>-->
<td>
<button onclick="soldup({$clerk['id']},this)" class="btn btn-info2">上架</button>
<!--<button onclick="overdue({$clerk['id']},this)" class="btn btn-default">销毁</button>-->
<a href="{:U('/user/coupon/usedata')}?id={$clerk['id']}" class="btn btn-info2">发放</a>
<a href="{:U('/user/coupon/usedata2')}?id={$clerk['id']}" class="btn btn-info2">使用</a>
</td>
</tr>
</volist>
</tbody>
</table>
</div>
</div>
<div style="text-align: center;">
<div id="callBackPager">{$page}</div>
</div>
<script>
function soldup(id,that) {
top.layer.confirm('你确定要上架该优惠券吗?', function () {
$.ajax({
url: "{:U('/user/coupon/soldout')}",
type: 'POST',
data: {id: id},
success: function (data) {
if (data.status==1) {
layer.msg(data.msg,{icon:1,time: 1000}, function () {
$(that).parent().parent().remove();
})
}
else {
layer.msg(data.msg,{icon:2});
}
}
})
top.layer.closeAll();
})
}
function overdue(id,that) {
top.layer.confirm('你确定要销毁该优惠券吗?', function () {
$.ajax({
url: "{:U('/user/coupon/overdue')}",
type: 'POST',
data: {id: id},
success: function (data) {
if (data.status==1) {
layer.msg(data.msg,{icon:1,time: 1000}, function () {
$(that).parent().parent().remove();
})
}
else {
layer.msg(data.msg,{icon:2});
}
}
})
top.layer.closeAll();
})
}
</script>
</body>
</html>