560dc87b85112a97e70f4f7bed1c686b.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <?php /*a:5:{s:74:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\auction\auction_booking\index.php";i:1648602073;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 if (d.status === 1){ }}
  170. <button type="button" name="status" class="layui-btn layui-btn-xs layui-btn-danger" id="">
  171. 正常
  172. </button>
  173. {{# } else{ }}
  174. <button type="button" name="status" class="layui-btn layui-btn-xs layui-btn-danger" id="">
  175. 扣除
  176. </button>
  177. {{# } }}
  178. </script>
  179. <script type="text/html" id="act">
  180. <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='th' id="">
  181. 退回
  182. </button>
  183. <button type="button" class="layui-btn layui-btn-xs layui-btn-danger" lay-event='delete' id="">
  184. 删除
  185. </button>
  186. </script>
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. <!--end-->
  192. </div>
  193. <script src="/system/js/layuiList.js"></script>
  194. <script>
  195. //实例化form
  196. layList.form.render();
  197. layList.tableList('List', "<?php echo Url('list'); ?>", function () {
  198. return [
  199. {type: 'checkbox'},
  200. {field: 'id', title: 'ID', sort: true, event: 'id', width: '5%', templet: '#id'},
  201. {field: 'name', title: '场馆', templet: '#name', align: 'center'},
  202. {field: 'account', title: '账号', templet: '#account', align: 'center'},
  203. {field: 'nickname', title: '呢称', templet: '#nickname', align: 'center'},
  204. {field: 'anticipate', title: '预约卷', templet: '#price', align: 'center', style : 'color: #DC143C;'},
  205. {field: 'frequency', title: '场次', templet: '#frequency', align: 'center'},
  206. {field: 'status', title: '状态', templet: '#status', align: 'center'},
  207. {field: 'create_time', title: '预约时间', templet: '#date', align: 'center'},
  208. {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
  209. ];
  210. });
  211. //点击事件绑定
  212. layList.tool(function (event,data,obj) {
  213. switch (event) {
  214. case 'delete':
  215. var url=layList.U({c:'auction.auction_booking',a:'delete',q:{id:data.id}});
  216. var code = {title:"操作提示",text:"确定删除?",type:'info',confirm:'是的,删除'};
  217. $eb.$swal('delete',function(){
  218. $eb.axios.get(url).then(function(res){
  219. if(res.status == 200 && res.data.code == 200) {
  220. $eb.$swal('success',res.data.msg);
  221. obj.del();
  222. location.reload();
  223. }else
  224. return Promise.reject(res.data.msg || '删除失败')
  225. }).catch(function(err){
  226. $eb.$swal('error',err);
  227. });
  228. },code)
  229. break;
  230. case 'th':
  231. var url=layList.U({c:'auction.auction_booking',a:'th',q:{id:data.id}});
  232. var code = {title:"操作提示",text:"确定退回预约卷?",type:'info',confirm:'是的,退回'};
  233. $eb.$swal('delete',function(){
  234. $eb.axios.get(url).then(function(res){
  235. if(res.status == 200 && res.data.code == 200) {
  236. $eb.$swal('success',res.data.msg);
  237. obj.del();
  238. location.reload();
  239. }else
  240. return Promise.reject(res.data.msg || '退回失败')
  241. }).catch(function(err){
  242. $eb.$swal('error',err);
  243. });
  244. },code)
  245. break;
  246. break;
  247. case 'edit':
  248. location.href = layList.U({a:'edit',q:{id:data.id}});
  249. break;
  250. }
  251. })
  252. //查询
  253. layList.search('search',function(where){
  254. console.log(111);
  255. layList.reload(where,true);
  256. });
  257. //改状态
  258. layList.switch('is_show',function (odj,value) {
  259. if(odj.elem.checked==true){
  260. layList.baseGet(layList.Url({c:'auction.auctionProduct',a:'set_status',p:{status:1,id:value}}),function (res) {
  261. layList.msg(res.msg, function () {
  262. layList.reload();
  263. });
  264. });
  265. }else{
  266. layList.baseGet(layList.Url({c:'auction.auctionProduct',a:'set_status',p:{status:0,id:value}}),function (res) {
  267. layList.msg(res.msg, function () {
  268. layList.reload();
  269. });
  270. });
  271. }
  272. });
  273. require(['vue'], function (Vue) {
  274. new Vue({
  275. el: "#app",
  276. data: {
  277. badge: [],
  278. dataList: [
  279. {name: '全部', value: ''},
  280. {name: '今天', value: 'today'},
  281. {name: '昨天', value: 'yesterday'},
  282. {name: '最近7天', value: 'lately7'},
  283. {name: '最近30天', value: 'lately30'},
  284. {name: '本月', value: 'month'},
  285. {name: '本年', value: 'year'},
  286. ],
  287. where: {
  288. data: '',
  289. status: status,
  290. type: '',
  291. pay_type: '',
  292. excel: 0,
  293. },
  294. showtime: false,
  295. },
  296. watch: {
  297. 'where.status': function () {
  298. this.where.excel = 0;
  299. this.getBadge();
  300. layList.reload(this.where, true);
  301. },
  302. 'where.data': function () {
  303. this.where.excel = 0;
  304. this.getBadge();
  305. layList.reload(this.where, true);
  306. },
  307. 'where.type': function () {
  308. this.where.excel = 0;
  309. this.getBadge();
  310. layList.reload(this.where, true);
  311. },
  312. 'where.pay_type': function () {
  313. this.where.excel = 0;
  314. this.getBadge();
  315. layList.reload(this.where, true);
  316. }
  317. },
  318. methods: {
  319. setData: function (item) {
  320. var that = this;
  321. if (item.is_zd == true) {
  322. that.showtime = true;
  323. this.where.data = this.$refs.date_time.innerText;
  324. } else {
  325. this.showtime = false;
  326. this.where.data = item.value;
  327. }
  328. },
  329. getBadge: function () {
  330. var that = this;
  331. layList.basePost(layList.Url({c: 'order.store_order', a: 'getBadge'}), this.where, function (rem) {
  332. that.badge = rem.data;
  333. });
  334. },
  335. search: function () {
  336. this.where.excel = 0;
  337. this.getBadge();
  338. layList.reload(this.where, true);
  339. },
  340. refresh: function () {
  341. layList.reload();
  342. this.getBadge();
  343. },
  344. excel: function () {
  345. this.where.excel = 1;
  346. location.href = layList.U({c: 'order.store_order', a: 'order_list', q: this.where});
  347. this.where.excel = 0;
  348. }
  349. },
  350. mounted: function () {
  351. var that = this;
  352. that.getBadge();
  353. window.formReload = this.search;
  354. layList.laydate.render({
  355. elem: this.$refs.date_time,
  356. trigger: 'click',
  357. eventElem: this.$refs.time,
  358. range: true,
  359. change: function (value) {
  360. that.where.data = value;
  361. }
  362. });
  363. }
  364. })
  365. });
  366. </script>
  367. </div>
  368. </body>
  369. </html>