index.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. use yii\widgets\LinkPager;
  3. use common\helpers\Html;
  4. use common\enums\WhetherEnum;
  5. $this->title = '收货地址';
  6. $this->params['breadcrumbs'][] = ['label' => '会员信息', 'url' => ['member/index']];
  7. $this->params['breadcrumbs'][] = ['label' => $this->title];
  8. ?>
  9. <div class="row">
  10. <div class="col-12 col-xs-12">
  11. <div class="box">
  12. <div class="box-header">
  13. <h3 class="box-title"><?= $this->title; ?></h3>
  14. <div class="box-tools">
  15. <?= Html::create(['ajax-edit', 'member_id' => $member_id], '创建', [
  16. 'data-toggle' => 'modal',
  17. 'data-target' => '#ajaxModal',
  18. ]) ?>
  19. </div>
  20. </div>
  21. <div class="box-body table-responsive">
  22. <table class="table table-hover">
  23. <thead>
  24. <tr>
  25. <th>#</th>
  26. <th>真实姓名</th>
  27. <th>手机号码</th>
  28. <th>省市区</th>
  29. <th>详细地址</th>
  30. <th>是否默认</th>
  31. <th>创建时间</th>
  32. <th>操作</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. <?php foreach ($models as $model) { ?>
  37. <tr id="<?= $model->id ?>">
  38. <td><?= $model->id ?></td>
  39. <td><?= Html::encode($model->realname) ?></td>
  40. <td><?= Html::encode($model->mobile) ?></td>
  41. <td><?= Html::encode($model->name) ?></td>
  42. <td><?= Html::encode($model->details) ?></td>
  43. <td><?= WhetherEnum::html($model->is_default) ?></td>
  44. <td><?= Yii::$app->formatter->asDatetime($model->created_at) ?></td>
  45. <td>
  46. <?= Html::edit(['ajax-edit', 'id' => $model->id, 'member_id' => $member_id], '编辑', [
  47. 'data-toggle' => 'modal',
  48. 'data-target' => '#ajaxModal',
  49. ]) ?>
  50. <?= Html::status($model['status']); ?>
  51. <?= Html::delete(['destroy', 'id' => $model->id, 'member_id' => $member_id]) ?>
  52. </td>
  53. </tr>
  54. <?php } ?>
  55. </tbody>
  56. </table>
  57. </div>
  58. <div class="box-footer">
  59. <?= LinkPager::widget([
  60. 'pagination' => $pages,
  61. ]); ?>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
粤ICP备19079148号