index.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {extend name="public/container"}
  2. {block name="head_top"}
  3. {/block}
  4. {block name="content"}
  5. <div class="layui-fluid" style="background: #fff;margin-top: -10px;">
  6. <div class="layui-row layui-col-space15">
  7. <div class="layui-col-md12">
  8. <div class="layui-card">
  9. <!-- <div class="layui-card-header">门店列表</div>-->
  10. <div class="layui-card-body">
  11. <div class="layui-btn-container">
  12. <button class="layui-btn layui-btn-sm"
  13. onclick="$eb.createModalFrame(this.innerText,'{:Url('addGroup')}',{h:900,w:720})">添加活动
  14. </button>
  15. </div>
  16. <table class="layui-hide" id="List" lay-filter="List"></table>
  17. <script type="text/html" id="act">
  18. <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event='detail'>
  19. 详情
  20. </button>
  21. <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event='edit'>
  22. 修改
  23. </button>
  24. </script>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. <script src="{__ADMIN_PATH}js/layuiList.js"></script>
  31. {/block}
  32. {block name="script"}
  33. <script>
  34. layList.tableList('List', "{:Url('groupList')}", function () {
  35. return [
  36. {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%'},
  37. {field: 'name', title: '活动名称', width: '17%'},
  38. {field: '_cost', title: '参与支出', width: '7%'},
  39. {field: '_bingo', title: '拼中获得', width: '7%'},
  40. {field: '_ticket', title: '参与门票', width: '7%'},
  41. {field: 'system_money_ratio', title: '奖池(%)', width: '7%'},
  42. {field: 'join_award_ratio', title: '参与奖(%)', width: '7%'},
  43. {field: 'join_number', title: '参与人数', width: '7%'},
  44. {field: 'bingo_number', title: '中奖人数', width: '7%'},
  45. {field: 'join_limit', title: '每日参与限制', width: '7%'},
  46. {field: '_status', title: '状态', width: '7%'},
  47. {field: 'right', title: '操作', align: 'center', toolbar: '#act', width: '15%'},
  48. ];
  49. });
  50. //点击事件绑定
  51. layList.tool(function (event, data, obj) {
  52. switch (event) {
  53. case 'open_image':
  54. $eb.openImage(data.image);
  55. break;
  56. case 'edit':
  57. $eb.createModalFrame(data.name + '-编辑', layList.U({a: 'addGroup', q: {id: data.id}}), {h: 900, w: 720});
  58. break;
  59. case 'detail':
  60. $eb.createModalFrame(data.name + '-编辑', layList.U({a: 'detail', q: {id: data.id}}));
  61. break;
  62. }
  63. })
  64. </script>
  65. {/block}