a5e290369d4af2c431b37f2d99f61762.php 18 KB

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