used.blade.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  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" disabled @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. <el-input v-model="search_form.seller" style="width:30%;margin-left:16px;margin-right:16px;" placeholder="出售者ID/昵称/姓名/手机号"></el-input>
  89. <el-input v-model="search_form.buyer" style="width:30%;margin-left:16px;margin-right:16px;" placeholder="购买者ID/昵称/姓名/手机号"></el-input>
  90. <el-select v-model="search_form.level" placeholder="授权码等级" clearable>
  91. <el-option
  92. v-for="item in options"
  93. :key="item.id"
  94. :label="item.name"
  95. :value="item.id">
  96. </el-option>
  97. </el-select>
  98. <el-select v-model="search_form.type" placeholder="状态" clearable>
  99. <el-option
  100. v-for="item in types"
  101. :key="item.status"
  102. :label="item.label"
  103. :value="item.status">
  104. </el-option>
  105. </el-select>
  106. <el-select v-model="search_form.is_time" filterable clearable placeholder="是否搜索时间" style="margin-left:10px;">
  107. {{--<el-option label="时间不限" value="0"></el-option>--}}
  108. <el-option label="搜索购买时间" value="1"></el-option>
  109. <el-option label="搜索激活时间" value="2"></el-option>
  110. </el-select>
  111. <el-date-picker
  112. style="margin-left:10px;"
  113. v-model="times"
  114. type="datetimerange"
  115. value-format="yyyy-MM-dd HH:mm:ss"
  116. range-separator="至"
  117. start-placeholder="开始日期"
  118. end-placeholder="结束日期"
  119. style="margin-left:5px;" >
  120. </el-date-picker>
  121. <el-button type="primary" @click="search">搜索</el-button>
  122. </div>
  123. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  124. <div class="block">
  125. <div class="title">
  126. {{--<div style="display:flex;align-items:center;">--}}
  127. {{--<span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span>--}}
  128. {{--<b>分类列表</b>--}}
  129. {{--<a href="{{ yzWebFullUrl('plugin.room.admin.anchor-manage.manualSend') }}">--}}
  130. {{--<el-button type="primary" style="margin-left:30px;" size="mini">手动赠送</el-button></a>--}}
  131. {{--</div>--}}
  132. </div>
  133. </div>
  134. <template style="margin-top:-10px;">
  135. <el-table :data="tableData" style="padding:0 10px">
  136. <el-table-column align="center" label="出售者">
  137. <template slot-scope="scope">
  138. <div v-if="scope.row.seller_nickname">
  139. <img :src="scope.row.seller_avatar" style="width:30px;height:30px;padding:1px;border:1px solid #ccc;">
  140. <div>[[scope.row.seller_nickname]]</div>
  141. </div>
  142. </template>
  143. </el-table-column>
  144. <el-table-column align="center" label="购买者">
  145. <template slot-scope="scope">
  146. <div v-if="scope.row.buyer_nickname">
  147. <img :src="scope.row.buyer_avatar" style="width:30px;height:30px;padding:1px;border:1px solid #ccc;">
  148. <div>[[scope.row.buyer_nickname]]</div>
  149. </div>
  150. </template>
  151. </el-table-column>
  152. <el-table-column prop="level_name" align="center" label="激活等级">
  153. </el-table-column>
  154. <el-table-column prop="money" align="center" label="金额">
  155. </el-table-column>
  156. <el-table-column prop="type_name" align="center" label="状态">
  157. </el-table-column>
  158. <el-table-column prop="buy_time" align="center" label="购买时间">
  159. </el-table-column>
  160. <el-table-column prop="activation_time" align="center" label="激活时间">
  161. </el-table-column>
  162. </el-table>
  163. </template>
  164. <el-row style="background-color:#fff;">
  165. <el-col :span="24" align="center" migra style="padding:15px 5% 15px 0" v-loading="loading">
  166. <el-pagination background @current-change="currentChange"
  167. :current-page="current_page"
  168. layout="prev, pager, next"
  169. :page-size="Number(page_size)" :current-page="current_page" :total="page_total"></el-pagination>
  170. </el-col>
  171. </el-row>
  172. </div>
  173. </div>
  174. </div>
  175. <script>
  176. var vm = new Vue({
  177. el: "#re_content",
  178. delimiters: ['[[', ']]'],
  179. data() {
  180. let level={!!$level?:'{}' !!}
  181. //console.log(level);
  182. return {
  183. times:[],
  184. change_code_num:'',
  185. table_loading:false,
  186. loading:false,
  187. search_loading:false,
  188. all_loading:false,
  189. page_total:0,
  190. page_size:0,
  191. current_page:0,
  192. search_form:{
  193. seller:'',
  194. buyer:'',
  195. level:'',
  196. is_time:'',
  197. time:{
  198. start:'',
  199. end:'',
  200. },
  201. },
  202. types: [
  203. {
  204. status: '1',
  205. label: '未激活'
  206. },
  207. {
  208. status: '2',
  209. label: '已激活'
  210. },
  211. ],
  212. real_search_form:{},
  213. tableData: [],
  214. options:level,
  215. }
  216. },
  217. mounted () {
  218. this.search();
  219. },
  220. methods: {
  221. search() {
  222. this.search_loading = true;
  223. let json={
  224. search:this.search_form,
  225. }
  226. if(this.times && this.times.length>0) {
  227. json.search.time.start = this.times[0];
  228. json.search.time.end = this.times[1];
  229. }
  230. this.$http.post('{!! yzWebFullUrl('plugin.room.admin.anchor-manage.usageRecordSearch') !!}',json
  231. ).then(function (response) {
  232. if (response.data.result){
  233. let datas = response.data.data.list;
  234. this.tableData=datas.data
  235. this.page_total = datas.total;
  236. this.page_size = datas.per_page;
  237. this.current_page = datas.current_page;
  238. this.loading = false;
  239. this.real_search_form=Object.assign({},this.search_form);
  240. }
  241. else {
  242. this.$message({message: response.data.msg,type: 'error'});
  243. }
  244. this.search_loading = false;
  245. },function (response) {
  246. this.search_loading = false;
  247. this.$message({message: response.data.msg,type: 'error'});
  248. }
  249. );
  250. },
  251. currentChange(val) {
  252. this.loading = true;
  253. this.$http.post('{!! yzWebFullUrl('plugin.room.admin.anchor-manage.usageRecordSearch') !!}',{page:val,search:this.real_search_form}).then(function (response){
  254. if (response.data.result){
  255. let datas = response.data.data.list;
  256. this.tableData=datas.data
  257. this.page_total = datas.total;
  258. this.page_size = datas.per_page;
  259. this.current_page = datas.current_page;
  260. this.loading = false;
  261. } else {
  262. this.$message({message: response.data.msg,type: 'error'});
  263. }
  264. },function (response) {
  265. console.log(response);
  266. this.loading = false;
  267. }
  268. );
  269. },
  270. codeBasic() {
  271. window.location.href = "{!! yzWebFullUrl('plugin.room.admin.anchor-manage.basicCode') !!}";
  272. },
  273. code() {
  274. window.location.href = "{!! yzWebFullUrl('plugin.room.admin.anchor-manage.codeList') !!}";
  275. },
  276. codeLog() {
  277. window.location.href = "{!! yzWebFullUrl('plugin.room.admin.anchor-manage.usageRecord') !!}";
  278. },
  279. },
  280. });
  281. </script>
  282. @endsection