index.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <div class="row-content am-cf">
  2. <div class="row">
  3. <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
  4. <div class="widget am-cf">
  5. <div class="widget-head am-cf">
  6. <div class="widget-title a m-cf">门店列表</div>
  7. </div>
  8. <div class="widget-body am-fr">
  9. <!-- 工具栏 -->
  10. <div class="page_toolbar am-margin-bottom-xs am-cf">
  11. <div class="am-form-group">
  12. <?php if (checkPrivilege('shop/add')): ?>
  13. <div class="am-btn-group am-btn-group-xs">
  14. <a class="am-btn am-btn-default am-btn-success"
  15. href="<?= url('shop/add') ?>">
  16. <span class="am-icon-plus"></span> 新增
  17. </a>
  18. </div>
  19. <?php endif; ?>
  20. </div>
  21. </div>
  22. <div class="am-scrollable-horizontal am-u-sm-12">
  23. <table width="100%" class="am-table am-table-compact am-table-striped
  24. tpl-table-black am-text-nowrap">
  25. <thead>
  26. <tr>
  27. <th>门店ID</th>
  28. <th>门店名称</th>
  29. <th>门店logo</th>
  30. <th>营业时间</th>
  31. <th>联系人</th>
  32. <th>联系电话</th>
  33. <th>门店地址</th>
  34. <th>自提核销</th>
  35. <th>门店状态</th>
  36. <th>创建时间</th>
  37. <th>操作</th>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. <?php if (!$list->isEmpty()): foreach ($list as $item): ?>
  42. <tr>
  43. <td class="am-text-middle"><?= $item['shop_id'] ?></td>
  44. <td class="am-text-middle"><?= $item['shop_name'] ?></td>
  45. <td class="am-text-middle">
  46. <a href="<?= $item['logo']['file_path'] ?>" title="点击查看大图" target="_blank">
  47. <img src="<?= $item['logo']['file_path'] ?>" width="72" height="72" alt="">
  48. </a>
  49. </td>
  50. <td class="am-text-middle"><?= $item['shop_hours'] ?></td>
  51. <td class="am-text-middle"><?= $item['linkman'] ?></td>
  52. <td class="am-text-middle"><?= $item['phone'] ?></td>
  53. <td class="am-text-middle">
  54. <?= $item['region']['province'] ?> <?= $item['region']['city'] ?> <?= $item['region']['region'] ?>
  55. <?= $item['address'] ?>
  56. </td>
  57. <td class="am-text-middle">
  58. <span class="am-badge am-badge-<?= $item['is_check'] ? 'success' : 'warning' ?>">
  59. <?= $item['is_check'] ? '支持' : '不支持' ?>
  60. </span>
  61. </td>
  62. <td class="am-text-middle">
  63. <span class="am-badge am-badge-<?= $item['status'] ? 'success' : 'warning' ?>">
  64. <?= $item['status'] ? '启用' : '禁用' ?>
  65. </span>
  66. </td>
  67. <td class="am-text-middle"><?= $item['create_time'] ?></td>
  68. <td class="am-text-middle">
  69. <div class="tpl-table-black-operation">
  70. <?php if (checkPrivilege('shop/edit')): ?>
  71. <a href="<?= url('shop/edit', ['shop_id' => $item['shop_id']]) ?>">
  72. <i class="am-icon-pencil"></i> 编辑
  73. </a>
  74. <?php endif; ?>
  75. <?php if (checkPrivilege('shop/delete')): ?>
  76. <a href="javascript:void(0);"
  77. class="item-delete tpl-table-black-operation-del"
  78. data-id="<?= $item['shop_id'] ?>">
  79. <i class="am-icon-trash"></i> 删除
  80. </a>
  81. <?php endif; ?>
  82. </div>
  83. </td>
  84. </tr>
  85. <?php endforeach; else: ?>
  86. <tr>
  87. <td colspan="9" class="am-text-center">暂无记录</td>
  88. </tr>
  89. <?php endif; ?>
  90. </tbody>
  91. </table>
  92. </div>
  93. <div class="am-u-lg-12 am-cf">
  94. <div class="am-fr"><?= $list->render() ?> </div>
  95. <div class="am-fr pagination-total am-margin-right">
  96. <div class="am-vertical-align-middle">总记录:<?= $list->total() ?></div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <script>
  105. $(function () {
  106. // 删除元素
  107. var url = "<?= url('shop/delete') ?>";
  108. $('.item-delete').delete('shop_id', url, '删除后不可恢复,确定要删除吗?');
  109. });
  110. </script>