check-list.blade.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. @extends('layouts.base')
  2. @section('title', "审核列表")
  3. @section('content')
  4. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods.css')}}"/>
  5. <style>
  6. .a-btn {
  7. border-radius: 2px;
  8. padding: 8px 12px;
  9. box-sizing: border-box;
  10. color: #666;
  11. font-weight: 500;
  12. text-align: center;
  13. margin-left: 1%;
  14. background-color: #fff;
  15. }
  16. .a-btn:hover{
  17. background-color: #29BA9C;
  18. color: #FFF;
  19. border-radius: 5px;
  20. }
  21. .tabs-div {
  22. background: #fff;
  23. padding: 13px 0;
  24. margin-left: 10px;
  25. cursor: pointer;
  26. border-radius:10px;
  27. }
  28. .a-colour2 {
  29. background-color: #29BA9C;
  30. color: #FFF;
  31. border-radius: 5px;
  32. }
  33. .sort_active{
  34. color: #29BA9C;
  35. }
  36. </style>
  37. <div id="qrcode" ref="qrcode" style="display:none;"></div>
  38. <div class="rightlist">
  39. <div id="app" v-cloak v-loading="all_loading">
  40. <template>
  41. <div class="">
  42. <div class="third-list">
  43. <div class="form-list">
  44. <el-form :inline="true" :model="search_form" ref="search_form" style="margin-left:10px;">
  45. <el-row>
  46. <el-form-item label="" prop="">
  47. <el-input v-model="search_form.member_id" placeholder="会员ID"></el-input>
  48. </el-form-item>
  49. <el-form-item label="" prop="">
  50. <el-input v-model="search_form.member" placeholder="会员昵称/姓名/手机号"></el-input>
  51. </el-form-item>
  52. <el-form-item label="" prop="">
  53. <el-select v-model="search_form.status" placeholder="审核状态" clearable>
  54. <el-option v-for="item in status_list" :key="item.id" :label="item.name"
  55. :value="item.id"></el-option>
  56. </el-select>
  57. </el-form-item>
  58. <el-form-item label="发布时间">
  59. <el-date-picker
  60. v-model="times"
  61. type="datetimerange"
  62. value-format="yyyy-MM-dd HH:mm:ss"
  63. range-separator="至"
  64. start-placeholder="开始日期"
  65. end-placeholder="结束日期"
  66. style="margin-left:5px;"
  67. align="right">
  68. </el-date-picker>
  69. </el-form-item>
  70. <a href="#">
  71. <el-button type="primary" icon="el-icon-search" @click="search(1)">搜索
  72. </el-button>
  73. </a>
  74. </el-col>
  75. </el-row>
  76. </el-form>
  77. </div>
  78. <div class="table-list">
  79. <div>
  80. <template>
  81. <!-- 表格start -->
  82. <el-table :data="list" style="width: 100%"
  83. :class="table_loading==true?'loading-height':''"
  84. v-loading="table_loading">
  85. <el-table-column prop="created_at" label="时间" align="center"></el-table-column>
  86. <el-table-column prop="member_id" label="会员ID" align="center"></el-table-column>
  87. <el-table-column prop="total" label="粉丝" align="center">
  88. <template slot-scope="scope" v-if="scope.row.member != null">
  89. <div class="p-text" style="padding-left: 6px;">
  90. <p v-if="scope.row.member.avatar!==null"><img style="width:37px;height:37px;border-radius: 50%;margin-right:5px;" :src="scope.row.member.avatar" alt=""></p>
  91. <p v-if="scope.row.member.nickname">[[scope.row.member.nickname]]</p>
  92. <p v-else>未更新</p>
  93. </div>
  94. </template>
  95. </el-table-column>
  96. <el-table-column label="姓名/手机号" align="center">
  97. <template slot-scope="scope" v-if="scope.row.member != null">
  98. [[scope.row.member.realname]] / [[scope.row.member.mobile]]
  99. </template>
  100. </el-table-column>
  101. <el-table-column label="充值说明" align="center">
  102. <template slot-scope="scope">
  103. <div class="table-option">&nbsp;&nbsp;
  104. <a @click="seeExplain(scope.$index)">
  105. 查看
  106. </a>&nbsp;&nbsp;
  107. </div>
  108. </template>
  109. </el-table-column>
  110. <el-table-column prop="money" label="充值金额" align="center"></el-table-column>
  111. <el-table-column label="操作人" align="center">
  112. <template slot-scope="scope">
  113. [[scope.row.admin_user.username]]【ID:[[scope.row.admin_user.uid]]】
  114. </template>
  115. </el-table-column>
  116. <el-table-column prop="status_name" label="审批状态" align="center"></el-table-column>
  117. <el-table-column label="操作" width="320" align="center">
  118. <template slot-scope="scope">
  119. <el-button size="mini" type="success" v-if="is_can_check&&scope.row.status==0" @click="checkLog(scope.row.id,1)" round>
  120. 通过
  121. </el-button>
  122. <el-button size="mini" type="danger" v-if="is_can_check&&scope.row.status==0" @click="checkLog(scope.row.id,2)" round>
  123. 驳回
  124. </el-button>
  125. </template>
  126. </el-table-column>
  127. </el-table>
  128. <!-- 表格end -->
  129. </template>
  130. <!-- 查看充值说明 -->
  131. <el-dialog title="充值说明" :visible.sync="explain_show" width="20%" center>
  132. [[explain]]<br>
  133. <el-link type="primary" @click="dowonload(enclosure)" v-if="enclosure">点击查看附件</el-link>
  134. </el-dialog>
  135. </div>
  136. </div>
  137. </div>
  138. <!-- 分页 -->
  139. <div class="vue-page" v-show="total>1">
  140. <el-row>
  141. <el-col align="right">
  142. <el-pagination layout="prev, pager, next,jumper" @current-change="search" :total="total"
  143. :page-size="per_size" :current-page="current_page" background
  144. v-loading="loading"></el-pagination>
  145. </el-col>
  146. </el-row>
  147. </div>
  148. </div>
  149. </template>
  150. </div>
  151. </div>
  152. <script>
  153. var app = new Vue({
  154. el: "#app",
  155. delimiters: ['[[', ']]'],
  156. data() {
  157. return {
  158. is_can_check:0,
  159. status_list:[
  160. {id:1,name:"已通过"},
  161. {id:2,name:"已驳回"},
  162. {id:0,name:"待审核"},
  163. ],
  164. times:[],
  165. list: [],//列表
  166. search_form: {
  167. member_id: '',
  168. member: '',
  169. status:"",
  170. },
  171. explain:"",
  172. enclosure:"",
  173. explain_show:false,
  174. form: {},
  175. loading: false,
  176. table_loading: false,
  177. all_loading: false,
  178. //分页
  179. total: 0,
  180. per_size: 0,
  181. current_page: 0,
  182. this_page:0,
  183. rules: {},
  184. }
  185. },
  186. created() {
  187. },
  188. mounted() {
  189. let is_can_check = {!! $is_can_check !!};
  190. this.is_can_check = is_can_check;
  191. this.search(1);
  192. },
  193. methods: {
  194. dowonload(url) {
  195. let that = this;
  196. let link = document.createElement('a') // 创建a标签
  197. link.style.display = 'none'
  198. if (!/\.(jpg|jpeg|png|GIF|JPG|PNG)$/.test(url)) {
  199. that.$http.post("{!! yzWebFullUrl('finance.balance-recharge-check.down-load-file') !!}", {url},{
  200. responseType: 'blob',
  201. }).then(res => {
  202. if (res.result == 0) {
  203. return this.$message.error(res.msg);
  204. }
  205. //文件名
  206. var filename = url.split('/').pop()
  207. let binaryData = [];
  208. binaryData.push(res);
  209. link.href = window.URL.createObjectURL(res.data);
  210. link.download = filename;
  211. link.setAttribute("visibility", "none");
  212. document.body.appendChild(link)
  213. link.click()
  214. window.URL.revokeObjectURL(link.href);
  215. document.body.removeChild(link);
  216. }), function (res) {
  217. this.$message.error("文件下载失败!")
  218. };
  219. } else {
  220. link.href = url // 设置下载地址
  221. link.setAttribute('target', '__blank') // 浏览器打开图片
  222. document.body.appendChild(link)
  223. link.click();
  224. }
  225. },
  226. // 搜索、分页
  227. search(page) {
  228. this.this_page = page;
  229. var that = this;
  230. console.log(that.search_form);
  231. // 商品类型
  232. let json = {
  233. page: page,
  234. search: that.search_form,
  235. };
  236. if(this.times && this.times.length>0) {
  237. json.search.start_time = this.times[0];
  238. json.search.end_time = this.times[1];
  239. } else {
  240. json.search.start_time = '';
  241. json.search.end_time = '';
  242. }
  243. that.table_loading = true;
  244. that.$http.post("{!! yzWebFullUrl('finance.balance-recharge-check.get-list') !!}", json).then(response => {
  245. console.log(response);
  246. if (response.data.result == 1) {
  247. that.list = response.data.data.data;
  248. that.total = response.data.data.total;
  249. that.current_page = response.data.data.current_page;
  250. that.per_size = response.data.data.per_page;
  251. } else {
  252. that.$message.error(response.data.msg);
  253. }
  254. that.table_loading = false;
  255. }), function (res) {
  256. console.log(res);
  257. that.table_loading = false;
  258. };
  259. },
  260. seeExplain(index) {
  261. this.explain_show = true;
  262. this.explain = this.list[index].explain;
  263. this.enclosure = this.list[index].enclosure_src;
  264. },
  265. checkLog(id,status) {
  266. var that = this;
  267. that.$confirm('确定该操作吗', '提示', {
  268. confirmButtonText: '确定',
  269. cancelButtonText: '取消',
  270. type: 'warning'
  271. }).then(() => {
  272. that.table_loading = true;
  273. that.$http.post("{!! yzWebFullUrl('finance.balance-recharge-check.check') !!}", {id: id,status:status}).then(response => {
  274. if (response.data.result == 1) {
  275. that.$message.success("审核成功!");
  276. that.search(1);
  277. } else {
  278. that.$message.error(response.data.msg);
  279. }
  280. that.table_loading = false;
  281. }), function (res) {
  282. console.log(res);
  283. that.table_loading = false;
  284. };
  285. }).catch(() => {
  286. this.$message({type: 'info', message: '已取消审核'});
  287. });
  288. },
  289. // 字符转义
  290. escapeHTML(a) {
  291. a = "" + a;
  292. return a.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "\"").replace(/&apos;/g, "'");
  293. },
  294. },
  295. })
  296. </script>
  297. @endsection