| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <?php
- use yii\widgets\LinkPager;
- use common\components\stringUtil;
- use common\services\xhUserService;
- ?>
- <div class="page-title">
- <div class="title-env">
- <h1 class="title"><?= $userInfo['userName'] ?>的代金劵</h1>
- </div>
- <div class="breadcrumb-env">
- <ol class="breadcrumb bc-1">
- <li>
- <a href="/"><i class="fa-home"></i>Home</a>
- </li>
- <li>
- <a href="javascript:void(0)">活动营销</a>
- </li>
- <li class="active">
- <strong>代金劵</strong>
- </li>
- </ol>
- </div>
- </div>
- <div class="panel panel-default">
- <div class="panel-body">
- <div class="dataTables_wrapper form-inline dt-bootstrap no-footer">
- <div class="table-responsive">
- <table class="table table-bordered table-striped table-hover" >
- <thead>
- <tr class="active">
- <th class="no-sorting hidden-xs"><input type="checkbox"></th>
- <th class="hidden-xs">ID</th>
- <th class="hidden-xs">编号</th>
- <th>金额</th>
- <th>消费要求</th>
- <th class="hidden-xs">开始时间</th>
- <th class="hidden-xs">截止有效期</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody class="middle-align">
- <?php if(!empty($models)){ foreach($models as $key => $val){ ?>
- <tr>
- <td class="hidden-xs"><input type="checkbox"></td>
- <td class="hidden-xs"><?= $val['id'];?></td>
- <td class="hidden-xs"><?= $val['number'];?></td>
- <td><?= $val['amount'];?></td>
- <td><?= $val['meetAmount'];?></td>
- <td><?= date("Y-m-d",$val['beginTime']);?></td>
- <td><?= date("Y-m-d",$val['deadline']);?></td>
- <td>
- <?php if($val['useStatus'] == 0){ ?>
- <a href="javascript:void(0)" name="confirmButton" data-url="/coupon/use?id=<?= $val['id'] ?>" data-msg="抵用" class="btn btn-secondary btn-sm btn-icon icon-left">抵用</a>
- <?php } ?>
- </td>
- </tr>
- <?php }} ?>
- </tbody>
- </table>
- </div>
- <div class="row">
- <div>
- <!--
- <div style="display:inline-block;margin-left:15px;">
- <label><select name="example-1_length"
- aria-controls="example-1" class="form-control">
- <option value="0">批量操作</option>
- <option value="1">批量下架</option>
- <option value="2">批量删除</option>
- </select>
- </label>
- <input class="btn btn-secondary btn-single" type="submit" name="" value="确认" />
- </div>
- -->
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- footer -->
- <?php
- use backend\widgets\FooterWidget;
- ?>
- <?= FooterWidget::widget()?>
- <!-- footer -->
- <!-- modal 确认提醒框 -->
- <div class="modal fade" id="confirmMention">
- <div class="modal-dialog" style="height:300px;">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4 class="modal-title">消息提示</h4>
- </div>
-
- <div class="modal-body">
- 确认<span></span>?<input type="hidden" name="requestUrl" value="" />
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-info" name="confirmOk" >确认</button>
- <button type="button" class="btn btn-white" data-dismiss="modal">取消</button>
- </div>
- </div>
- </div>
- </div>
- <script>
- //确认操作
- $(function(){
- jQuery("a[name=confirmButton]").click(function(){
- var url = $(this).attr('data-url');
- var msg = $(this).attr('data-msg');
- $("#confirmMention .modal-body span").text(msg);
- $("#confirmMention .modal-body input").val(url);
- jQuery('#confirmMention').modal('show', {backdrop: 'fade'}).css({
- 'margin-top': function () {
- var modalHeight = jQuery("#confirmMention").find('.modal-dialog').height();
- return ($(window).height() / 2 - (modalHeight / 2));
- }
- });
- });
- //点击确认
- jQuery("button[name=confirmOk]").click(function(){
- var url = $("#confirmMention .modal-body input").val();
- $.ajax({type:"GET",url:url,async:false,dataType:'json',success:function(data){
- if(data.code == 'A0001'){
- $('#confirmMention').modal('hide');
- window.location.reload();
- }else{
- xhPopMsg(data.msg,2000);//调用定时浮层
- }
- }});
- });
- });
- </script>
|