560dc87b85112a97e70f4f7bed1c686b.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. <?php /*a:5:{s:74:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction_booking\index.php";i:1648091100;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
  2. <!DOCTYPE html>
  3. <html lang="zh-CN">
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
  8. <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
  9. <?php endif; ?>
  10. <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
  11. <link href="/system/css/layui-admin.css" rel="stylesheet">
  12. <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
  13. <link href="/system/frame/css/animate.min.css" rel="stylesheet">
  14. <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
  15. <script src="/system/frame/js/jquery.min.js"></script>
  16. <script src="/system/frame/js/bootstrap.min.js"></script>
  17. <script src="/static/plug/layui/layui.all.js"></script>
  18. <script>
  19. $eb = parent._mpApi;
  20. window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
  21. window.module="<?php echo app('http')->getName();?>";
  22. </script>
  23. <title></title>
  24. <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
  25. <script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
  26. <?php /* <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script> */ ?>
  27. <script>
  28. var hostname = location.hostname;
  29. if(location.port) hostname += ':' + location.port;
  30. requirejs.config({
  31. map: {
  32. '*': {
  33. 'css': '/static/plug/requirejs/require-css.js'
  34. }
  35. },
  36. shim:{
  37. 'iview':{
  38. deps:['css!iviewcss']
  39. },
  40. 'layer':{
  41. deps:['css!layercss']
  42. }
  43. },
  44. baseUrl:'//'+hostname+'/',
  45. paths: {
  46. 'static':'static',
  47. 'system':'system',
  48. 'vue':'static/plug/vue/dist/vue.min',
  49. 'axios':'static/plug/axios.min',
  50. 'iview':'static/plug/iview/dist/iview.min',
  51. 'iviewcss':'static/plug/iview/dist/styles/iview',
  52. 'lodash':'static/plug/lodash',
  53. 'layer':'static/plug/layer/layer',
  54. 'layercss':'static/plug/layer/theme/default/layer',
  55. 'jquery':'static/plug/jquery/jquery.min',
  56. 'moment':'static/plug/moment',
  57. 'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
  58. 'formCreate':'/static/plug/form-create/form-create.min',
  59. },
  60. basket: {
  61. excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
  62. // excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
  63. }
  64. });
  65. </script>
  66. <script type="text/javascript" src="/system/util/mpFrame.js"></script>
  67. </head>
  68. <body class="gray-bg">
  69. <div class="wrapper wrapper-content">
  70. <style>
  71. .btn-outline{
  72. border:none;
  73. }
  74. .btn-outline:hover{
  75. background-color: #0e9aef;
  76. color: #fff;
  77. }
  78. .layui-form-item .layui-btn {
  79. margin-top: 5px;
  80. margin-right: 10px;
  81. }
  82. .layui-btn-primary{
  83. margin-right: 10px;
  84. margin-left: 0!important;
  85. }
  86. label{
  87. margin-bottom: 0!important;
  88. margin-top: 4px;
  89. }
  90. </style>
  91. <div class="layui-fluid">
  92. <div class="layui-row layui-col-space15" id="app">
  93. <!--搜索条件-->
  94. <div class="layui-col-md12">
  95. <div class="layui-card">
  96. <div class="layui-card-header">搜索条件</div>
  97. <div class="layui-card-body">
  98. <form class="layui-form layui-form-pane" action="">
  99. <div class="layui-form-item">
  100. <div class="layui-inline">
  101. <label class="layui-form-label" style="top: -4.5px">所有场馆</label>
  102. <div class="layui-input-block">
  103. <select name="auction_id">
  104. <option value=" ">全部</option>
  105. <?php if(is_array($auction) || $auction instanceof \think\Collection || $auction instanceof \think\Paginator): $i = 0; $__LIST__ = $auction;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
  106. <option value="<?php echo htmlentities($vo['id']); ?>"><?php echo htmlentities($vo['nickname']); ?></option>
  107. <?php endforeach; endif; else: echo "" ;endif; ?>
  108. </select>
  109. </div>
  110. </div>
  111. <div class="layui-inline">
  112. <label class="layui-form-label" style="top: -4.5px">搜索</label>
  113. <div class="layui-input-block">
  114. <input type="text" name="store_name" class="layui-input" placeholder="账号,昵称.,编号">
  115. </div>
  116. </div>
  117. <div class="layui-col-lg12">
  118. <label class="layui-form-label">创建时间:</label>
  119. <div class="layui-input-block" data-type="data" v-cloak="">
  120. <button class="layui-btn layui-btn-sm" type="button" v-for="item in dataList"
  121. @click="setData(item)"
  122. :class="{'layui-btn-primary':where.data!=item.value}">{{item.name}}
  123. </button>
  124. <button class="layui-btn layui-btn-sm" type="button" ref="time"
  125. @click="setData({value:'zd',is_zd:true})"
  126. :class="{'layui-btn-primary':where.data!='zd'}">自定义
  127. </button>
  128. <button type="button" class="layui-btn layui-btn-sm layui-btn-primary"
  129. v-show="showtime==true" ref="date_time"><?php echo htmlentities($year['0']); ?> - <?php echo htmlentities($year['1']); ?>
  130. </button>
  131. </div>
  132. </div>
  133. <div class="layui-inline" style="top: -5px">
  134. <div class="layui-input-inline">
  135. <button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit="search" lay-filter="search" >
  136. <i class="layui-icon layui-icon-search"></i>搜索</button>
  137. </div>
  138. </div>
  139. </div>
  140. </form>
  141. </div>
  142. </div>
  143. </div>
  144. <!-- 中间详细信息-->
  145. <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'"
  146. v-for="item in badge" v-cloak="" v-if="item.count > 0">
  147. </div>
  148. <!--enb-->
  149. </div>
  150. <!--列表-->
  151. <div class="layui-row layui-col-space15">
  152. <div class="layui-col-md12">
  153. <div class="layui-card">
  154. <div class="layui-card-header">预约列表</div>
  155. <div class="layui-card-body">
  156. <!-- <div class="layui-btn-container" id="container-action">-->
  157. <!-- <a class="layui-btn layui-btn-sm" href="<?php echo Url('create'); ?>">添加商品</a>-->
  158. <!-- <button class="layui-btn layui-btn-sm" data-type="del_auction">批量删除</button>-->
  159. <!-- </div>-->
  160. <table class="layui-hide" id="List" lay-filter="List"></table>
  161. <script type="text/html" id="image">
  162. <img style="cursor: pointer" lay-event="open_image" src="{{d.image}}">
  163. </script>
  164. <script type="text/html" id="status">
  165. {{# if(d.status < 1){ }}
  166. <button type="button" name="status" class="layui-btn-disabled layui-btn-xs" id="">
  167. 已退回
  168. </button>
  169. {{# } else { }}
  170. <button type="button" name="status" class="layui-btn layui-btn-xs layui-btn-danger" id="">
  171. 正常
  172. </button>
  173. {{# } }}
  174. </script>
  175. <script type="text/html" id="act">
  176. <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='th' id="">
  177. 退回
  178. </button>
  179. <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
  180. 删除
  181. </button>
  182. </script>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. <!--end-->
  188. </div>
  189. <script src="/system/js/layuiList.js"></script>
  190. <script>
  191. //实例化form
  192. layList.form.render();
  193. layList.tableList('List', "<?php echo Url('list'); ?>", function () {
  194. return [
  195. {type: 'checkbox'},
  196. {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
  197. {field: 'name', title: '场馆', templet: '#name', align: 'center'},
  198. {field: 'account', title: '账号', templet: '#account', align: 'center'},
  199. {field: 'nickname', title: '呢称', templet: '#nickname', align: 'center'},
  200. {field: 'anticipate', title: '预约卷', templet: '#price', align: 'center', style : 'color: #DC143C;'},
  201. {field: 'frequency', title: '场次', templet: '#frequency', align: 'center'},
  202. {field: 'status', title: '状态', templet: '#status', align: 'center'},
  203. {field: 'create_time', title: '预约时间', templet: '#date', align: 'center'},
  204. {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
  205. ];
  206. });
  207. //点击事件绑定
  208. layList.tool(function (event,data,obj) {
  209. switch (event) {
  210. case 'delete':
  211. var url=layList.U({c:'auction.auction_booking',a:'delete',q:{id:data.id}});
  212. var code = {title:"操作提示",text:"确定删除?",type:'info',confirm:'是的,删除'};
  213. $eb.$swal('delete',function(){
  214. $eb.axios.get(url).then(function(res){
  215. if(res.status == 200 && res.data.code == 200) {
  216. $eb.$swal('success',res.data.msg);
  217. obj.del();
  218. location.reload();
  219. }else
  220. return Promise.reject(res.data.msg || '删除失败')
  221. }).catch(function(err){
  222. $eb.$swal('error',err);
  223. });
  224. },code)
  225. break;
  226. case 'th':
  227. var url=layList.U({c:'auction.auction_booking',a:'th',q:{id:data.id}});
  228. var code = {title:"操作提示",text:"确定退回预约卷?",type:'info',confirm:'是的,退回'};
  229. $eb.$swal('delete',function(){
  230. $eb.axios.get(url).then(function(res){
  231. if(res.status == 200 && res.data.code == 200) {
  232. $eb.$swal('success',res.data.msg);
  233. obj.del();
  234. location.reload();
  235. }else
  236. return Promise.reject(res.data.msg || '退回失败')
  237. }).catch(function(err){
  238. $eb.$swal('error',err);
  239. });
  240. },code)
  241. break;
  242. break;
  243. case 'edit':
  244. location.href = layList.U({a:'edit',q:{id:data.id}});
  245. break;
  246. }
  247. })
  248. //查询
  249. layList.search('search',function(where){
  250. console.log(111);
  251. layList.reload(where,true);
  252. });
  253. //改状态
  254. layList.switch('is_show',function (odj,value) {
  255. if(odj.elem.checked==true){
  256. layList.baseGet(layList.Url({c:'auction.auctionProduct',a:'set_status',p:{status:1,id:value}}),function (res) {
  257. layList.msg(res.msg, function () {
  258. layList.reload();
  259. });
  260. });
  261. }else{
  262. layList.baseGet(layList.Url({c:'auction.auctionProduct',a:'set_status',p:{status:0,id:value}}),function (res) {
  263. layList.msg(res.msg, function () {
  264. layList.reload();
  265. });
  266. });
  267. }
  268. });
  269. require(['vue'], function (Vue) {
  270. new Vue({
  271. el: "#app",
  272. data: {
  273. badge: [],
  274. dataList: [
  275. {name: '全部', value: ''},
  276. {name: '今天', value: 'today'},
  277. {name: '昨天', value: 'yesterday'},
  278. {name: '最近7天', value: 'lately7'},
  279. {name: '最近30天', value: 'lately30'},
  280. {name: '本月', value: 'month'},
  281. {name: '本年', value: 'year'},
  282. ],
  283. where: {
  284. data: '',
  285. status: status,
  286. type: '',
  287. pay_type: '',
  288. excel: 0,
  289. },
  290. showtime: false,
  291. },
  292. watch: {
  293. 'where.status': function () {
  294. this.where.excel = 0;
  295. this.getBadge();
  296. layList.reload(this.where, true);
  297. },
  298. 'where.data': function () {
  299. this.where.excel = 0;
  300. this.getBadge();
  301. layList.reload(this.where, true);
  302. },
  303. 'where.type': function () {
  304. this.where.excel = 0;
  305. this.getBadge();
  306. layList.reload(this.where, true);
  307. },
  308. 'where.pay_type': function () {
  309. this.where.excel = 0;
  310. this.getBadge();
  311. layList.reload(this.where, true);
  312. }
  313. },
  314. methods: {
  315. setData: function (item) {
  316. var that = this;
  317. if (item.is_zd == true) {
  318. that.showtime = true;
  319. this.where.data = this.$refs.date_time.innerText;
  320. } else {
  321. this.showtime = false;
  322. this.where.data = item.value;
  323. }
  324. },
  325. getBadge: function () {
  326. var that = this;
  327. layList.basePost(layList.Url({c: 'order.store_order', a: 'getBadge'}), this.where, function (rem) {
  328. that.badge = rem.data;
  329. });
  330. },
  331. search: function () {
  332. this.where.excel = 0;
  333. this.getBadge();
  334. layList.reload(this.where, true);
  335. },
  336. refresh: function () {
  337. layList.reload();
  338. this.getBadge();
  339. },
  340. excel: function () {
  341. this.where.excel = 1;
  342. location.href = layList.U({c: 'order.store_order', a: 'order_list', q: this.where});
  343. this.where.excel = 0;
  344. }
  345. },
  346. mounted: function () {
  347. var that = this;
  348. that.getBadge();
  349. window.formReload = this.search;
  350. layList.laydate.render({
  351. elem: this.$refs.date_time,
  352. trigger: 'click',
  353. eventElem: this.$refs.time,
  354. range: true,
  355. change: function (value) {
  356. that.where.data = value;
  357. }
  358. });
  359. }
  360. })
  361. });
  362. </script>
  363. </div>
  364. </body>
  365. </html>