| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <?php
- use yii\widgets\LinkPager;
- ?>
- <div class="page-title">
- <div class="title-env">
- <h1 class="title">门店管理</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="row">
- <form action="" method="GET">
- <div class="col-xs-6" style="width:90%;">
- <div class="dataTables_length">
- </div>
- </div>
- </form>
- </div>
- <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>门店名称</th>
- <th class="hidden-xs">图片</th>
- <th class="hidden-xs">地址</th>
- <th class="hidden-xs">电话</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><?= $val['branchName'] ?></td>
- <td class="hidden-xs"> </td>
- <td class="hidden-xs"><?= $val['shopAddress'] ?></td>
- <td class="hidden-xs"><?= $val['telephone'] ?></td>
- <td class="hidden-xs"><?= date("Y-m-d H:i",strtotime($val['createTime'])) ?></td>
- <td class="hidden-xs"><?php if($val['status'] == 0){echo '待审';}else{echo '未通过';}?></td>
- <td>
- <a href="javascript:void(0)" onclick="pass(<?= $val['id'] ?>, $(this))" data-url="/shop/check-store" data-msg="确定门店通过审批" class="btn btn-secondary btn-sm btn-icon icon-left">通过</a>
- </td>
- </tr>
- <?php
- }
- }
- ?>
- </tbody>
- </table>
- </div>
- <div class="row">
- <div>
- <div class="dataTables_paginate paging_simple_numbers" style="float:right;padding-top:0px;margin-right:15px;">
- <!--显示分页页码-->
- <?php
- echo LinkPager::widget([
- 'pagination' => $pages,
- 'maxButtonCount' => 5,
- 'nextPageLabel' => '下一页',
- 'prevPageLabel' => '上一页'
- ]);
- ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- footer -->
- <?php
- use backend\widgets\FooterWidget;
- ?>
- <?= FooterWidget::widget()?>
- <!-- footer -->
- <script>
- function pass(id, currentObj) {
- var title = '提示';
- var response = currentObj.attr('data-msg');
- var url = currentObj.attr('data-url');
- $('#platform-modal .modal-title').html(title);
- $('#platform-modal .modal-body').html(response);
- $('#platform-modal .btn-white').html('取消');
- $('#platform-modal .btn-info').html('确定');
- $('#platform-modal').modal('show', {
- backdrop: 'static'
- });
- $('#platform-modal .btn-info').attr("disabled", false);
- $('#platform-modal .btn-info').on('click', function() {
- $(this).attr("disabled", true);
- $.ajax({
- type: "POST",
- url: url,
- data: {
- 'shopId': id,
- '_csrf': "<?= Yii::$app->request->csrfToken;?>"
- },
- dataType: "json",
- success: function(data) {
- //console.log(data);
- if (data.errcode == 0) {
- $('#platform-modal').modal('hide');
- currentObj.parents('tr').remove();
- xhPopMsg('操作成功!');
- } else {
- xhPopMsg(data.errmsg);
- }
- },
- error: function(msg) {
- xhPopMsg('error');
- }
- });
- })
- }
- </script>
|