<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/css/bootstrap-datepicker.standalone.min.css">
<link rel="stylesheet" href="<?php echo base_url();?>public/plugins/datatables/jquery.dataTables.min.css">
<link rel="stylesheet" href="<?php echo base_url();?>public/plugins/datatables/extensions/Responsive/css/dataTables.responsive.css">
<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<div class="content_wrapper">

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <form class="form-inline" role="form" method="POST" action="#" id="couponForm">

                                        <span class="gap"></span>
                                        <div class="form-group">
                                            <label>开始时间: </label>
                                            <input type="text" class="form-control datetimepicker" value="<?php echo $stime ?? '';?>" placeholder="开始时间" name="coupon_stime" />
                                        </div>
                                        <span class="gap"></span>
                                        <div class="form-group">
                                            <label>结束时间: </label>
                                            <input type="text" class="form-control datetimepicker" value="<?php echo $etime ?? '';?>" placeholder="结束时间" name="coupon_etime" />
                                        </div>

                                    <!--    <span class="gap"></span>
                                        <div class="form-group">
                                            <label class="radio-inline">
                                                <?php $payment_type = $payment_type ?? 2;?>
                                                <input type="radio" name="payment_type" id="inlineRadio1" value="2" <?php if($payment_type == 2){echo 'checked="checked"';}?>> 支付成功
                                            </label>
                                            <label class="radio-inline">
                                                <input type="radio" name="payment_type" id="inlineRadio2" value="1" <?php if($payment_type == 1){echo 'checked="checked"';}?>> 所有
                                            </label>
                                        </div> -->


                                        <span class="gap"></span>
                                        <button type="button" class="btn btn-primary" id="searchBtn">查询</button>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>订单查询</header>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="table-responsive">
                                        <table id="couponTable" class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
                                            <thead>
                                            <tr>
                                                <th>ID</th>
                                                <th>UID</th>
                                                <th>类型</th>
                                                <th>券ID</th>
                                                <th>数量</th>
                                                <th>更新时间</th>
                                                <th>过期时间</th>
                                                <th>操作</th>
                                            </tr>
                                            </thead>
                                            <tbody>

                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>

</div>

<script>
    //选择日期
    $('.datetimepicker').datepicker({
        language:'zh-CN',
        format:'yyyy-mm-dd',
        zIndexOffset:906  //控制z-index
    });
</script>
<script src="<?php echo base_url();?>public/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="<?php echo base_url();?>public/plugins/datatables/extensions/Responsive/js/dataTables.responsive.min.js"></script>
<script src="<?php echo base_url();?>public/js/common.js"></script>
<script src="<?php echo base_url();?>public/js/mall/usercoupon.js"></script>