detail.blade.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. @extends('layouts.base')
  2. @section('title', '授权码明细')
  3. @section('content')
  4. <style>
  5. .panel{
  6. margin-bottom:10px!important;
  7. border-radius: 10px;
  8. padding-left: 20px;
  9. }
  10. .panel .active a {
  11. background-color: #29ba9c!important;
  12. border-radius: 18px!important;
  13. color:#fff;
  14. }
  15. .panel a{
  16. border:none!important;
  17. background-color:#fff!important;
  18. }
  19. .content{
  20. background: #eff3f6;
  21. padding: 10px!important;
  22. }
  23. .con{
  24. padding-bottom:20px;
  25. position:relative;
  26. border-radius: 8px;
  27. min-height: 100vh;
  28. background: #fff;
  29. }
  30. .con .setting .block{
  31. padding:10px;
  32. background-color:#fff;
  33. border-radius: 8px;
  34. }
  35. .con .setting .block .title{
  36. font-size:18px;
  37. margin-bottom:15px;
  38. display:flex;
  39. align-items:center;
  40. justify-content:space-between;
  41. }
  42. .add{
  43. width: 154px;
  44. height: 36px;
  45. border-radius: 4px;
  46. border: solid 1px #29ba9c;
  47. color:#29ba9c;
  48. display:flex;
  49. align-items:center;
  50. justify-content:center;
  51. }
  52. .el-table--fit{
  53. margin-top:-10px;
  54. }
  55. b{
  56. font-size:14px;
  57. }
  58. .vue-crumbs a {
  59. color: #333;
  60. }
  61. .vue-crumbs a:hover {
  62. color: #29ba9c;
  63. }
  64. .vue-crumbs {
  65. margin: 0 20px;
  66. font-size: 14px;
  67. color: #333;
  68. font-weight: 400;
  69. padding-bottom: 10px;
  70. line-height: 32px;
  71. }
  72. .el-table--border::after, .el-table--group::after, .el-table::before{
  73. background-color:#fff;
  74. }
  75. </style>
  76. <div id='re_content' >
  77. <div class="con">
  78. <div class="setting">
  79. <el-row>
  80. <el-button type="primary" @click="codeBasic()">基础设置</el-button>
  81. <el-button type="success" @click="code()">授权码管理</el-button>
  82. <el-button type="info" @click="codeLog()">使用记录</el-button>
  83. </el-row>
  84. <div style="background: #eff3f6;width:100%;height:15px;margin-top: 1em;"></div>
  85. <div class="block">
  86. <div class="title">
  87. <div style="display:flex;align-items:center;"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>授权码明细</b></div></div>
  88. </div>
  89. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  90. <template style="margin-top:-10px;">
  91. <el-table :data="tableData" style="padding:0 10px">
  92. <el-table-column prop="id" align="center" label="ID">
  93. </el-table-column>
  94. <el-table-column prop="created_at" align="center" label="时间">
  95. </el-table-column>
  96. <el-table-column prop="type_name" align="center" label="类型">
  97. </el-table-column>
  98. <el-table-column prop="old_num" align="center" label="变动前数量">
  99. </el-table-column>
  100. <el-table-column prop="change_num" align="center" label="变动数量">
  101. </el-table-column>
  102. <el-table-column prop="new_num" align="center" label="变动后数量">
  103. </el-table-column>
  104. </el-table>
  105. </template>
  106. <el-row style="background-color:#fff;">
  107. <el-col :span="24" align="center" migra style="padding:15px 5% 15px 0" v-loading="loading">
  108. <el-pagination background @current-change="currentChange"
  109. :current-page="current_page"
  110. layout="prev, pager, next"
  111. :page-size="Number(page_size)" :current-page="current_page" :total="page_total"></el-pagination>
  112. </el-col>
  113. </el-row>
  114. </div>
  115. </div>
  116. </div>
  117. <script>
  118. var vm = new Vue({
  119. el: "#re_content",
  120. delimiters: ['[[', ']]'],
  121. data() {
  122. let member_id={!!$member_id?:'{}' !!};
  123. let level_id={!!$level_id?:'{}' !!};
  124. return {
  125. loading:false,
  126. search_loading:false,
  127. all_loading:false,
  128. page_total:0,
  129. page_size:0,
  130. current_page:0,
  131. tableData: [],
  132. search_form:{
  133. member_id:member_id,
  134. level_id:level_id,
  135. },
  136. real_search_form:{},
  137. }
  138. },
  139. mounted () {
  140. this.search();
  141. },
  142. methods: {
  143. search() {
  144. this.search_loading = true;
  145. let json={
  146. search:this.search_form,
  147. }
  148. this.$http.post('{!! yzWebFullUrl('plugin.room.admin.anchor-manage.codeDetailSearch') !!}',json
  149. ).then(function (response) {
  150. if (response.data.result){
  151. let datas = response.data.data.list;
  152. console.log(datas);
  153. this.tableData=datas.data
  154. this.page_total = datas.total;
  155. this.page_size = datas.per_page;
  156. this.current_page = datas.current_page;
  157. this.loading = false;
  158. this.real_search_form=Object.assign({},this.search_form);
  159. }
  160. else {
  161. this.$message({message: response.data.msg,type: 'error'});
  162. }
  163. this.search_loading = false;
  164. },function (response) {
  165. this.search_loading = false;
  166. this.$message({message: response.data.msg,type: 'error'});
  167. }
  168. );
  169. },
  170. currentChange(val) {
  171. this.loading = true;
  172. this.$http.post('{!! yzWebFullUrl('plugin.room.admin.anchor-manage.codeDetailSearch') !!}',{page:val,search:this.real_search_form}).then(function (response){
  173. if (response.data.result){
  174. let datas = response.data.data.list;
  175. this.tableData=datas.data
  176. this.page_total = datas.total;
  177. this.page_size = datas.per_page;
  178. this.current_page = datas.current_page;
  179. this.loading = false;
  180. } else {
  181. this.$message({message: response.data.msg,type: 'error'});
  182. }
  183. },function (response) {
  184. console.log(response);
  185. this.loading = false;
  186. }
  187. );
  188. },
  189. codeBasic() {
  190. window.location.href = "{!! yzWebFullUrl('plugin.room.admin.anchor-manage.basicCode') !!}";
  191. },
  192. code() {
  193. window.location.href = "{!! yzWebFullUrl('plugin.room.admin.anchor-manage.codeList') !!}";
  194. },
  195. codeLog() {
  196. window.location.href = "{!! yzWebFullUrl('plugin.room.admin.anchor-manage.usageRecord') !!}";
  197. }
  198. },
  199. });
  200. </script>
  201. @endsection