index.blade.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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. margin-bottom:10px;
  35. }
  36. .con .setting .block .title{
  37. font-size:18px;
  38. margin-bottom:32px;
  39. display:flex;
  40. align-items:center;
  41. justify-content:space-between;
  42. }
  43. .confirm-btn{
  44. width: 100%;
  45. position:absolute;
  46. bottom:0;
  47. left:0;
  48. line-height:63px;
  49. background-color: #ffffff;
  50. box-shadow: 0px 8px 23px 1px
  51. rgba(51, 51, 51, 0.3);
  52. background-color:#fff;
  53. text-align:center;
  54. }
  55. .add{
  56. width: 154px;
  57. height: 36px;
  58. border-radius: 4px;
  59. border: solid 1px #29ba9c;
  60. color:#29ba9c;
  61. display:flex;
  62. align-items:center;
  63. justify-content:center;
  64. }
  65. .el-table--fit{
  66. margin-top:-10px;
  67. }
  68. b{
  69. font-size:14px;
  70. }
  71. .el-table--border::after, .el-table--group::after, .el-table::before{
  72. background-color:#fff;
  73. }
  74. </style>
  75. <div id='re_content' >
  76. <div class="con">
  77. <div class="setting">
  78. <div class="block">
  79. <div class="title">
  80. <div style="display:flex;align-items:center;">
  81. <span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>收费记录</b>
  82. </div>
  83. </div>
  84. <el-input v-model="search_form.member_id" style="width:auto;margin-right:16px;margin-bottom:16px;" placeholder="会员ID"></el-input>
  85. <el-input v-model="search_form.member" style="width:auto;margin-right:16px;" placeholder="昵称/姓名/手机号"></el-input>
  86. <el-input v-model="search_form.pay_number" style="width:auto;margin-right:16px;" placeholder="支付流水号"></el-input>
  87. <template>
  88. <el-select v-model="search_form.pay_type" placeholder="支付方式" style="width:auto;margin-right:16px;">
  89. <el-option v-for="item in pay_type_list" :key="item.status" :label="item.label" :value="item.status"></el-option>
  90. </el-select>
  91. </template>
  92. <template>
  93. <span class="demonstration"></span>
  94. <el-date-picker
  95. v-model="search_form.time"
  96. type="datetimerange"
  97. range-separator="至"
  98. start-placeholder="开始日期"
  99. end-placeholder="结束日期"
  100. align="right">
  101. </el-date-picker>
  102. </template>
  103. <el-button type="primary" style="margin-left:16px;" @click="search">搜索</el-button>
  104. </div>
  105. <div style="background: #eff3f6;width:100%;height:15px;"></div>
  106. <div class="block">
  107. <div class="title">
  108. <div style="display:flex;align-items:center;">
  109. <span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span>
  110. <b>记录列表</b>
  111. <span style="width: 4px;height: 18px;margin-right:10px;"></span>
  112. <b>总数:[[ page_total ]]</b>
  113. <span style="width: 4px;height: 18px;margin-right:10px;"></span>
  114. <b>支付金额:[[ amount_total ]]</b>
  115. </div>
  116. </div>
  117. </div>
  118. <el-table :data="tableData" style="padding:0 10px" style="width: 100%">
  119. <el-table-column align="center" label="时间">
  120. <template slot-scope="scope">
  121. <div>[[scope.row.created_at]]</div>
  122. </template>
  123. </el-table-column>
  124. <el-table-column align="center" label="会员">
  125. <template slot-scope="scope">
  126. <img style='width:40px;height:40px' v-if="scope.row.member" :src=scope.row.member.avatar_image style="max-width:100px">
  127. <div>[[scope.row.member?scope.row.member.nickname:'未更新']]</div>
  128. </template>
  129. </el-table-column>
  130. <el-table-column align="center" label="支付流水号">
  131. <template slot-scope="scope">
  132. <div>[[scope.row.pay_number]]</div>
  133. </template>
  134. </el-table-column>
  135. <el-table-column align="center" label="支付金额">
  136. <template slot-scope="scope">
  137. <div v-if="scope.row.pay_amount">¥[[scope.row.pay_amount]]</div>
  138. </template>
  139. </el-table-column>
  140. <el-table-column align="center" label="支付方式">
  141. <template slot-scope="scope">
  142. <div>[[scope.row.pay_type_name]]</div>
  143. </template>
  144. </el-table-column>
  145. <el-table-column align="center" label="操作">
  146. <template slot-scope="scope">
  147. <div v-if="scope.row.pay_type!=54">
  148. <div v-if="scope.row.status==1">
  149. <el-button @click="doRefund(scope.row.id)">退款</el-button>
  150. </div>
  151. <div v-if="scope.row.status==-1">
  152. <el-button type="text" disabled>已退款</el-button>
  153. </div>
  154. </div>
  155. </template>
  156. </el-table-column>
  157. </el-table>
  158. <el-row style="background-color:#fff;">
  159. <el-col :span="24" align="center" migra style="padding:15px 5% 15px 0" v-loading="loading">
  160. <el-pagination background @current-change="currentChange"
  161. layout="prev, pager, next"
  162. :page-size="page_size" :current-page="current_page" :total="page_total">
  163. </el-pagination>
  164. </el-col>
  165. </el-row>
  166. </div>
  167. </div>
  168. </div>
  169. <script>
  170. var vm = new Vue({
  171. el: "#re_content",
  172. delimiters: ['[[', ']]'],
  173. data() {
  174. return {
  175. dataList:[],
  176. loading:false,
  177. search_loading:false,
  178. all_loading:false,
  179. amount_total:0.00,
  180. page_total:0,
  181. page_size:0,
  182. current_page:0,
  183. search_form:{},
  184. real_search_form:{},
  185. pay_type_list: [
  186. {
  187. status: 2,
  188. label: '支付宝'
  189. },
  190. {
  191. status: 55,
  192. label: '微信'
  193. },
  194. ],
  195. tableData: []
  196. }
  197. },
  198. mounted () {
  199. this.getData();
  200. },
  201. methods: {
  202. search() {
  203. this.search_loading = true;
  204. let json={
  205. search:this.search_form,
  206. };
  207. this.$http.post('{!! yzWebFullUrl('plugin.real-name-auth.admin.controllers.charge-log.search') !!}',json
  208. ).then(function (response) {
  209. if (response.data.result){
  210. let datas = response.data.data.list;
  211. this.dataList=datas.data
  212. this.tableData=datas.data
  213. this.page_total = datas.total;
  214. this.page_size = datas.per_page;
  215. this.current_page = datas.current_page;
  216. this.amount_total = response.data.data.amount_total;
  217. this.loading = false;
  218. this.real_search_form=Object.assign({},this.search_form);
  219. }
  220. else {
  221. this.$message({message: response.data.msg,type: 'error'});
  222. }
  223. this.search_loading = false;
  224. },function (response) {
  225. this.search_loading = false;
  226. this.$message({message: response.data.msg,type: 'error'});
  227. }
  228. );
  229. },
  230. currentChange(val) {
  231. this.loading = true;
  232. this.$http.post('{!! yzWebFullUrl('plugin.real-name-auth.admin.controllers.charge-log.search') !!}',{page:val,search:this.real_search_form}).then(function (response){
  233. if (response.data.result){
  234. let datas = response.data.data.list;
  235. this.tableData = datas.data
  236. this.page_total = datas.total;
  237. this.page_size = datas.per_page;
  238. this.current_page = datas.current_page;
  239. this.amount_total = response.data.data.amount_total;
  240. this.loading = false;
  241. } else {
  242. this.$message({message: response.data.msg,type: 'error'});
  243. }
  244. },function (response) {
  245. console.log(response);
  246. this.loading = false;
  247. }
  248. );
  249. },
  250. getData(){
  251. this.$http.post('{!! yzWebFullUrl('plugin.real-name-auth.admin.controllers.charge-log.search') !!}').then(function (response){
  252. if (response.data.result) {
  253. let datas = response.data.data.list;
  254. this.tableData = datas.data;
  255. this.page_total = datas.total;
  256. this.page_size = datas.per_page;
  257. this.current_page = datas.current_page;
  258. this.amount_total = response.data.data.amount_total;
  259. this.loading = false;
  260. }else{
  261. this.$message({message: response.data.msg,type: 'error'});
  262. }
  263. },function (response) {
  264. this.$message({message: response.data.msg,type: 'error'});
  265. })
  266. },
  267. doRefund(id){
  268. let json = {
  269. id:id,
  270. };
  271. this.$confirm('确认退款?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
  272. this.$http.post("{!! yzWebFullUrl('plugin.real-name-auth.admin.controllers.charge-log.doRefund') !!}",json).then(response => {
  273. if(response.data.result==1){
  274. this.$message.success(response.data.msg);
  275. this.currentChange(this.current_page);
  276. }else{
  277. this.$message.error(response.data.msg);
  278. }
  279. this.loading = false;
  280. }),function(res){
  281. console.log(res);
  282. this.loading = false;
  283. };
  284. }).catch(() => {
  285. this.loading = false;
  286. this.$message({type: 'info',message: '已取消操作'});
  287. });
  288. },
  289. },
  290. });
  291. </script>
  292. @endsection