index.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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" id="app1">
  37. <div class="layui-col-lg12">
  38. <label class="layui-form-label">审核状态:</label>
  39. <div class="layui-input-block" v-cloak="">
  40. <button class="layui-btn layui-btn-sm" type="button" v-for="item in statusList"
  41. @click="where.status = item.value"
  42. :class="{'layui-btn-primary':where.status!==item.value}">{{item.name}}
  43. </button>
  44. </div>
  45. </div>
  46. <div class="layui-inline">
  47. <div class="layui-input-inline">
  48. <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search">
  49. <i class="layui-icon layui-icon-search"></i>搜索</button>
  50. </div>
  51. </div>
  52. </div>
  53. </form>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. <!-- 中间详细信息-->
  59. <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
  60. v-for="item in badge" v-cloak="" v-if="item.count > 0">
  61. </div>
  62. <!--enb-->
  63. </div>
  64. <!--列表-->
  65. <div class="layui-row layui-col-space15">
  66. <div class="layui-col-md12">
  67. <div class="layui-card">
  68. <div class="layui-card-header">场次列表</div>
  69. <div class="layui-card-body">
  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.charter}}">
  73. </script>
  74. <script type="text/html" id="status">
  75. {{# if(d.status == 0){ }}
  76. <button type="button" name="suc" class="layui-btn layui-btn-xs" id="">
  77. 待审核
  78. </button>
  79. {{# } else if(d.status == 1) { }}
  80. <button type="button" name="suc" class="layui-btn-xs layui-btn" id="">
  81. 审核通过
  82. </button>
  83. {{# } else if(d.status < 0) { }}
  84. <button type="button" name="suc" class="layui-btn-xs layui-btn-disabled" id="">
  85. 审核未通过
  86. </button>
  87. 未通过原因:{{d.fail_message}}
  88. {{# } }}
  89. </script>
  90. <script type="text/html" id="province">
  91. {{d.province}}-{{d.city}}-{{d.district}}-{{d.address}}
  92. </script>
  93. <script type="text/html" id="act">
  94. <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='tg' id="">
  95. 通过
  96. </button>
  97. <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='jj' id="" onclick="$eb.createModalFrame('编辑','{:Url('jj')}?id={{d.id}}',{h:500,w:500})">
  98. 不通过
  99. </button>
  100. <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
  101. 删除
  102. </button>
  103. </script>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. <!--end-->
  109. </div>
  110. <script src="{__ADMIN_PATH}js/layuiList.js"></script>
  111. {/block}
  112. {block name="script"}
  113. <script>
  114. layList.form.render();
  115. layList.tableList('List', "{:Url('list')}", function () {
  116. return [
  117. {type: 'checkbox'},
  118. {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
  119. {field: 'nickname', title: '申请用户', align: 'center'},
  120. {field: 'merchant_name', title: '商户名称', align: 'center'},
  121. {field: 'link_user', title: '商户姓名', align: 'center'},
  122. {field: 'link_tel', title: '商户电话', align: 'center'},
  123. {field: 'charter', title: '商户证书', align: 'center',templet: '#image'},
  124. {field: 'province', title: '商户地址', align: 'center',templet: '#province'},
  125. {field: 'status', title: '状态', templet: '#status', align: 'center'},
  126. {field: 'add_time', title: '申请时间', align: 'center',width: '8%'},
  127. {field: 'right', title: '操作', align: 'center', toolbar: '#act',width: '15%'},
  128. ];
  129. });
  130. //查询
  131. layList.search('search',function(where){
  132. layList.reload(where,true);
  133. });
  134. //点击事件绑定
  135. layList.tool(function (event,data,obj) {
  136. switch (event) {
  137. case 'delete':
  138. var url=layList.U({c:'user.user_enter',a:'delete',q:{id:data.id}});
  139. var code = {title:"操作提示",text:"确定将该商品移入回收站吗?",type:'info',confirm:'是的,移入回收站'};
  140. $eb.$swal('delete',function(){
  141. $eb.axios.get(url).then(function(res){
  142. if(res.status == 200 && res.data.code == 200) {
  143. $eb.$swal('success',res.data.msg);
  144. obj.del();
  145. location.reload();
  146. }else
  147. return Promise.reject(res.data.msg || '删除失败')
  148. }).catch(function(err){
  149. $eb.$swal('error',err);
  150. });
  151. },code)
  152. break;
  153. case 'tg':
  154. var url=layList.U({c:'user.user_enter',a:'tg',q:{id:data.id}});
  155. var code = {title:"操作提示",text:"确定审核通过?",type:'info',confirm:'是的'};
  156. $eb.$swal('delete',function(){
  157. $eb.axios.get(url).then(function(res){
  158. if(res.status == 200 && res.data.code == 200) {
  159. $eb.$swal('success',res.data.msg);
  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 'open_image':
  169. $eb.openImage(data.charter);
  170. break;
  171. case 'edit':
  172. location.href = layList.U({a:'edit',q:{id:data.id}});
  173. break;
  174. }
  175. })
  176. //改状态
  177. layList.switch('status',function (odj,value) {
  178. if(odj.elem.checked==true){
  179. layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:1,id:value}}),function (res) {
  180. layList.msg(res.msg, function () {
  181. layList.reload();
  182. });
  183. });
  184. }else{
  185. layList.baseGet(layList.Url({c:'auction.auction',a:'set_status',p:{status:0,id:value}}),function (res) {
  186. layList.msg(res.msg, function () {
  187. layList.reload();
  188. });
  189. });
  190. }
  191. });
  192. require(['vue'], function (Vue) {
  193. new Vue({
  194. el: "#app1",
  195. data: {
  196. badge: [],
  197. dataList: [
  198. {name: '全部', value: ''},
  199. {name: '今天', value: 'today'},
  200. {name: '昨天', value: 'yesterday'},
  201. {name: '最近7天', value: 'lately7'},
  202. {name: '最近30天', value: 'lately30'},
  203. {name: '本月', value: 'month'},
  204. {name: '本年', value: 'year'},
  205. ],
  206. statusList:[
  207. {name: '全部', value: ''},
  208. {name: '待审核', value: '2'},
  209. {name: '审核通过', value: '1'},
  210. {name: '审核未通过', value: '-1'}
  211. ],
  212. where: {
  213. data: '',
  214. status: status,
  215. type: '',
  216. pay_type: '',
  217. excel: 0,
  218. },
  219. showtime: false,
  220. },
  221. watch: {
  222. 'where.status': function () {
  223. this.where.excel = 0;
  224. this.getBadge();
  225. layList.reload(this.where, true);
  226. },
  227. 'where.data': function () {
  228. this.where.excel = 0;
  229. this.getBadge();
  230. layList.reload(this.where, true);
  231. },
  232. 'where.type': function () {
  233. this.where.excel = 0;
  234. this.getBadge();
  235. layList.reload(this.where, true);
  236. },
  237. 'where.pay_type': function () {
  238. this.where.excel = 0;
  239. this.getBadge();
  240. layList.reload(this.where, true);
  241. }
  242. },
  243. methods: {
  244. setData: function (item) {
  245. var that = this;
  246. if (item.is_zd == true) {
  247. that.showtime = true;
  248. this.where.data = this.$refs.date_time.innerText;
  249. } else {
  250. this.showtime = false;
  251. this.where.data = item.value;
  252. }
  253. },
  254. getBadge: function () {
  255. var that = this;
  256. layList.basePost(layList.Url({c: 'order.store_order', a: 'getBadge'}), this.where, function (rem) {
  257. that.badge = rem.data;
  258. });
  259. },
  260. search: function () {
  261. this.where.excel = 0;
  262. this.getBadge();
  263. layList.reload(this.where, true);
  264. },
  265. refresh: function () {
  266. layList.reload();
  267. this.getBadge();
  268. },
  269. excel: function () {
  270. var name = $('#name').val();
  271. var many_id = $('#many_id').val();
  272. var order_id = $('#order_id').val();
  273. var stage = $('#stage').val();
  274. this.where['name'] = name;
  275. this.where['many_id'] = many_id;
  276. this.where['order_id'] = order_id;
  277. this.where['stage'] = stage;
  278. this.where.excel = 1;
  279. location.href = layList.U({c: 'many.many_order', a: 'list', q: this.where});
  280. this.where.excel = 0;
  281. }
  282. },
  283. mounted: function () {
  284. var that = this;
  285. that.getBadge();
  286. window.formReload = this.search;
  287. layList.laydate.render({
  288. elem: this.$refs.date_time,
  289. trigger: 'click',
  290. eventElem: this.$refs.time,
  291. range: true,
  292. change: function (value) {
  293. that.where.data = value;
  294. }
  295. });
  296. }
  297. })
  298. });
  299. </script>
  300. {/block}