index.html 2.2 KB
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">优惠券列表</a></li>
        <li><a href="{:url('DiscountCoupon/add')}">生成优惠券</a></li>
    </ul>
    <form class="js-ajax-form" action="" method="post">
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th>序号</th>
                <th>所属人员</th>
                <th>优惠券名称</th>
                <th>截止日期</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <volist name="posts" id="vo" key="k">
                <tr>
                    <td>{$k}</td>
                    <td>{$vo.user_nickname}</td>
                    <td>{$vo.discount_coupon_name}</td>
                    <td><if condition="$vo.deadline eq '2147483647'">永久<else/>{$vo.deadline|date='Y-m-d',###}</if></td>
                    <td>
                        <if condition="$vo.status eq '1'">
                            <font color="red">未使用</font>
                        </if>
                        <if condition="$vo.status eq '2'">
                            <font color="green">已使用</font>
                        </if>
                        <if condition="$vo.status eq '3'">
                            <font color="#808080">已过期</font>
                        </if>
                    </td>
                    <td>
                        <a href="{:url('DiscountCoupon/edit',array('id'=>$vo['id']))}"><font color="#1e90ff">编辑</font></a> |
                        <a href="{:url('DiscountCoupon/del',array('id'=>$vo['id']))}" onclick="return isDel()"><font color="red">销毁</font></a>
                    </td>
                </tr>
            </volist>
        </table>
        <ul class="pagination">{$page|default=''}</ul>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    function isDel() {
        if(!window.confirm('是否确认销毁优惠券')) {
            return false;
        }else{
            return true;
        }
    }
</script>
</body>
</html>