index.php 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. {extend name="public/container"}
  2. {block name="head_top"}
  3. {/block}
  4. {block name="content"}
  5. <style>
  6. .btn-outline{
  7. border:none;
  8. }
  9. .btn-outline:hover{
  10. background-color: #0e9aef;
  11. color: #fff;
  12. }
  13. .layui-form-item .layui-btn {
  14. margin-top: 5px;
  15. margin-right: 10px;
  16. }
  17. .layui-btn-primary{
  18. margin-right: 10px;
  19. margin-left: 0!important;
  20. }
  21. label{
  22. margin-bottom: 0!important;
  23. margin-top: 4px;
  24. }
  25. </style>
  26. <div class="layui-fluid">
  27. <div class="layui-row layui-col-space15" id="app">
  28. <!--搜索条件-->
  29. <div class="layui-col-md12">
  30. <div class="layui-card">
  31. <div class="layui-card-header">搜索条件</div>
  32. <div class="layui-card-body">
  33. <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
  34. <form class="layui-form layui-form-pane" action="">
  35. <div class="layui-form-item">
  36. <div class="layui-col-lg12">
  37. <label class="layui-form-label" style="top: -5.5px;">搜索条件</label>
  38. <div class="layui-input-inline">
  39. <input type="text" id="auction" name="auction" class="layui-input" placeholder="请输入名称,编号">
  40. </div>
  41. </div>
  42. <div class="layui-inline">
  43. <div class="layui-input-inline">
  44. <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
  45. <i class="layui-icon layui-icon-search"></i>搜索</button>
  46. </div>
  47. </div>
  48. </div>
  49. </form>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. <!-- 中间详细信息-->
  55. <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
  56. v-for="item in badge" v-cloak="" v-if="item.count > 0">
  57. </div>
  58. <!--enb-->
  59. </div>
  60. <!--列表-->
  61. <div class="layui-row layui-col-space15">
  62. <div class="layui-col-md12">
  63. <div class="layui-card">
  64. <div class="layui-card-header">场馆列表</div>
  65. <div class="layui-card-body">
  66. <div class="layui-btn-container" id="container-action">
  67. <!-- <a class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:700,w:1100})">添加场次</a>-->
  68. <!-- <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
  69. </div>
  70. <table class="layui-hide" id="List" lay-filter="List"></table>
  71. <script type="text/html" id="image">
  72. <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
  73. </script>
  74. <script type="text/html" id="status">
  75. {{# if(d.status < 1){ }}
  76. <button type="button" name="status" class="layui-btn-disabled layui-btn-xs" id="">
  77. 不通过
  78. </button>
  79. {{# } else if(d.status == 1) { }}
  80. <button type="button" name="status" class="layui-btn-xs layui-btn-disabled" id="">
  81. 待审核
  82. </button>
  83. {{# } else if(d.status == 2) { }}
  84. <button type="button" name="status" class="layui-btn layui-btn-xs layui-btn-danger" id="">
  85. 已完成
  86. </button>
  87. {{# } }}
  88. </script>
  89. <script type="text/html" id="act">
  90. <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event="tg">
  91. 通过
  92. </button>
  93. <button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event="jj">
  94. 拒绝
  95. </button>
  96. <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
  97. 删除
  98. </button>
  99. </script>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <!--end-->
  105. </div>
  106. <script src="{__ADMIN_PATH}js/layuiList.js"></script>
  107. {/block}
  108. {block name="script"}
  109. <script>
  110. layui.use('form', function(){
  111. var form = layui.form;
  112. //监听提交
  113. form.on('submit(formDemo)', function(data){
  114. layer.msg(JSON.stringify(data.field));
  115. return false;
  116. });
  117. });
  118. layList.tableList('List', "{:Url('list')}", function () {
  119. return [
  120. {type: 'checkbox'},
  121. {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
  122. {field: 'nickname', title: '申请人', templet: '#nickname', align: 'center'},
  123. {field: 'image', title: '申请人', templet: '#image', align: 'center',width: '5%'},
  124. {field: 'status', title: '状态', templet: '#status', align: 'center'},
  125. {field: 'create_time', title: '申请时间', templet: '#create_time', align: 'center'},
  126. {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
  127. ];
  128. });
  129. //查询
  130. layList.search('search',function(where){
  131. layList.reload(where,true);
  132. });
  133. //点击事件绑定
  134. layList.tool(function (event,data,obj) {
  135. switch (event) {
  136. case 'delete':
  137. var url=layList.U({c:'auction.auctionApply',a:'delete',q:{id:data.id}});
  138. var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
  139. $eb.$swal('delete',function(){
  140. $eb.axios.get(url).then(function(res){
  141. if(res.status == 200 && res.data.code == 200) {
  142. $eb.$swal('success',res.data.msg);
  143. obj.del();
  144. location.reload();
  145. }else
  146. return Promise.reject(res.data.msg || '删除失败')
  147. }).catch(function(err){
  148. $eb.$swal('error',err);
  149. });
  150. },code)
  151. break;
  152. case 'tg':
  153. var url=layList.U({c:'auction.auctionApply',a:'tg',q:{id:data.id}});
  154. var code = {title:"操作提示",text:"确定通过吗?",type:'info',confirm:'是的'};
  155. $eb.$swal('delete',function(){
  156. $eb.axios.get(url).then(function(res){
  157. if(res.status == 200 && res.data.code == 200) {
  158. $eb.$swal('success',res.data.msg);
  159. obj.del();
  160. location.reload();
  161. }else
  162. return Promise.reject(res.data.msg || '失败')
  163. }).catch(function(err){
  164. $eb.$swal('error',err);
  165. });
  166. },code)
  167. break;
  168. case 'jj':
  169. var url=layList.U({c:'auction.auctionApply',a:'jj',q:{id:data.id}});
  170. var code = {title:"操作提示",text:"确定拒绝吗?",type:'info',confirm:'是的'};
  171. $eb.$swal('delete',function(){
  172. $eb.axios.get(url).then(function(res){
  173. if(res.status == 200 && res.data.code == 200) {
  174. $eb.$swal('success',res.data.msg);
  175. obj.del();
  176. location.reload();
  177. }else
  178. return Promise.reject(res.data.msg || '失败')
  179. }).catch(function(err){
  180. $eb.$swal('error',err);
  181. });
  182. },code)
  183. break;
  184. case 'open_image':
  185. $eb.openImage(data.image);
  186. break;
  187. }
  188. })
  189. //改状态
  190. layList.switch('status',function (odj,value) {
  191. if(odj.elem.checked==true){
  192. layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
  193. layList.msg(res.msg, function () {
  194. layList.reload();
  195. });
  196. });
  197. }else{
  198. layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
  199. layList.msg(res.msg, function () {
  200. layList.reload();
  201. });
  202. });
  203. }
  204. });
  205. </script>
  206. {/block}