view_staff.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. {extend name="public/container"}
  2. {block name="content"}
  3. <div class="layui-fluid">
  4. <div class="layui-row layui-col-space15" id="app">
  5. <div class="layui-col-md12" >
  6. <div class="layui-card">
  7. <div class="layui-card-header">搜索条件</div>
  8. <div class="layui-card-body">
  9. <div class="layui-carousel layadmin-carousel layadmin-shortcut" lay-anim="" lay-indicator="inside" lay-arrow="none" style="background:none">
  10. <div class="layui-card-body">
  11. <div class="layui-row layui-col-space10 layui-form-item">
  12. <div class="layui-col-lg12">
  13. <label class="layui-form-label">状态:</label>
  14. <div class="layui-input-block" v-cloak="">
  15. <button class="layui-btn layui-btn-sm" :class="{'layui-btn-primary':where.status!==item.value}" @click="where.status = item.value" type="button" v-for="item in orderType">{{item.name}}
  16. </button>
  17. </div>
  18. </div>
  19. <div class="layui-col-lg12">
  20. <label class="layui-form-label">搜索内容:</label>
  21. <div class="layui-input-block">
  22. <input type="text" name="real_name" style="width: 50%" v-model="where.real_name" placeholder="请输入搜索订单号" class="layui-input">
  23. </div>
  24. </div>
  25. <input type="hidden" name="id" style="width: 50%" value="{$aid}" class="layui-input">
  26. <div class="layui-col-lg12">
  27. <div class="layui-input-block">
  28. <button @click="search" type="button" class="layui-btn layui-btn-sm layui-btn-normal">
  29. <i class="layui-icon layui-icon-search"></i>搜索</button>
  30. <button @click="excel" type="button" class="layui-btn layui-btn-warm layui-btn-sm export" type="button">
  31. <i class="fa fa-floppy-o" style="margin-right: 3px;"></i>导出</button>
  32. <button @click="refresh" type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
  33. <i class="layui-icon layui-icon-refresh" ></i>刷新</button>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <div :class="item.col!=undefined ? 'layui-col-sm'+item.col+' '+'layui-col-md'+item.col:'layui-col-sm6 layui-col-md3'" v-for="item in badge" v-cloak="" v-if="item.count > 0">
  43. <div class="layui-card">
  44. <div class="layui-card-header">
  45. {{item.name}}
  46. <span class="layui-badge layuiadmin-badge" :class="item.background_color">{{item.field}}</span>
  47. </div>
  48. <div class="layui-card-body">
  49. <p class="layuiadmin-big-font">{{item.count}}</p>
  50. <p v-show="item.content!=undefined">
  51. {{item.content}}
  52. <span class="layuiadmin-span-color">{{item.sum}}<i :class="item.class"></i></span>
  53. </p>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="layui-row layui-col-space15" >
  59. <div class="layui-col-md12">
  60. <div class="layui-card">
  61. <div class="layui-card-body">
  62. <table class="layui-hide" id="userList" lay-filter="userList"></table>
  63. <script type="text/html" id="act">
  64. {{# if(d.status){ }}
  65. <button type="button" class="layui-btn layui-btn-primary layui-btn-sm">已核销 </button>
  66. {{# }else{ }}
  67. <button type="button" class="layui-btn layui-btn-xs " lay-event='write_off_code' style="padding: 1px 14px;">核销 </button>
  68. {{# } }}
  69. </script>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <script src="{__ADMIN_PATH}js/layuiList.js"></script>
  76. {/block}
  77. {block name="script"}
  78. <script>
  79. layList.tableList('userList',"{:Url('get_sign_up_list',['id'=>$aid])}",function () {
  80. return [
  81. {field: 'id', title: '编号', width: '6%',align:'center'},
  82. {field: 'order_id', title: '订单号',align:'center'},
  83. {field: 'userInfo', title: '报名信息',templet:'#nickname',align:'left'},
  84. {field: 'addTime', title: '报名时间' ,templet:'#ticket_price',align:'center'},
  85. {field: 'pay_price', title: '实付金额',templet:'#stock',align:'center'},
  86. {field: 'pay_type', title: '支付方式',align:'center'},
  87. {field: 'write_off', title: '状态',align:'center'},
  88. {field: 'right', title: '操作',align:'center',toolbar:'#act',width:'10%'},
  89. ];
  90. });
  91. $('.conrelTable').find('button').each(function () {
  92. var type=$(this).data('type');
  93. $(this).on('click',function () {
  94. action[type] && action[type]();
  95. })
  96. });
  97. layList.tool(function (event,data,obj) {
  98. switch (event) {
  99. case 'write_off_code':
  100. var url=layList.U({c:'ump.event_registration',a:'scanCodeSignIn',q:{id:data.id}});
  101. parent.$eb.$swal('delete',function(){
  102. parent.$eb.axios.get(url).then(function(res){
  103. if(res.data.code == 200) {
  104. window.location.reload();
  105. parent.$eb.$swal('success', res.data.msg);
  106. }else
  107. parent.$eb.$swal('error',res.data.msg||'操作失败!');
  108. });
  109. },{
  110. title:'确定对该订单核销吗?',
  111. text:'通过后无法撤销,请谨慎操作!',
  112. confirm:'核销'
  113. });
  114. break;
  115. case 'open_image':
  116. parent.$eb.openImage(data.pic);
  117. break;
  118. }
  119. });
  120. var id="{$aid}";
  121. require(['vue'],function(Vue) {
  122. new Vue({
  123. el: "#app",
  124. data: {
  125. orderType:[
  126. {name: '全部', value: ''},
  127. {name: '未核销', value: 1},
  128. {name: '已核销', value: 2},
  129. ],
  130. where:{
  131. id:id,
  132. status:'',
  133. real_name:'',
  134. excel:0,
  135. },
  136. showtime: false,
  137. badge: [],
  138. },
  139. watch: {
  140. },
  141. methods: {
  142. search:function () {
  143. this.getBadge();
  144. this.where.excel=0;
  145. layList.reload(this.where,true);
  146. },
  147. refresh:function () {
  148. layList.reload();
  149. },
  150. getBadge:function() {
  151. var that=this;
  152. layList.basePost(layList.Url({c:'ump.event_registration',a:'getBadge'}),this.where,function (rem) {
  153. that.badge=rem.data;
  154. });
  155. },
  156. excel:function () {
  157. this.where.excel=1;
  158. location.href=layList.U({c:'ump.event_registration',a:'get_sign_up_list',q:this.where});
  159. }
  160. },
  161. mounted:function () {
  162. var that=this;
  163. that.getBadge();
  164. }
  165. })
  166. });
  167. </script>
  168. {/block}