team_member.blade.php 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. @extends('layouts.base')
  2. @section('title', "开团详情")
  3. @section('content')
  4. <style>
  5. .rightlist #app .rightlist-head{line-height:50px;padding:15px 0;}
  6. .rightlist #app{margin-left:30px;}
  7. .rightlist #app .el-breadcrumb{padding:30px 0;font-size:16px;}
  8. /* .el-form-item__label{padding-right:30px;} */
  9. .tip{font-size:12px;color:#999;font-weight:500}
  10. .rightlist-head-con{padding-right:20px;font-size:16px;color:#888;}
  11. /* .rightlist-head-con{float:left;padding-right:20px;font-size:16px;color:#888;} */
  12. .el-tag{font-weight:700;font-size:15px;margin-bottom:30px;}
  13. .el-icon-edit{font-size:16px;padding:0 15px;color:#409EFF;cursor: pointer;}
  14. /* 滑块选择小白点 */
  15. .el-switch.is-checked .el-switch__core::after {left: 100%;margin-left: -17px;}
  16. .el-switch__core::after {content: "";position: absolute;top: 1px;left: 1px;border-radius: 100%;transition: all .3s;width: 16px;height: 16px;background-color: #fff;}
  17. .tip1{font-size:12px;color:red;font-weight:500}
  18. [v-cloak]{
  19. display:none;
  20. }
  21. </style>
  22. <div class="rightlist">
  23. <div id="app" v-cloak v-loading="all_loading">
  24. <el-breadcrumb separator-class="el-icon-arrow-right">
  25. <el-breadcrumb-item><a href="{{ yzWebFullUrl('plugin.fight-groups.admin.controllers.fight-groups.index') }}">活动列表</a></el-breadcrumb-item>
  26. <el-breadcrumb-item>开团详情</el-breadcrumb-item>
  27. </el-breadcrumb>
  28. <template>
  29. <el-form :inline="true" :model="search_form" ref="search_form" style="padding:20px 0 0 0;">
  30. <el-row>
  31. <el-form-item label="订单编号" prop="order_sn">
  32. <el-input v-model="search_form.order_sn" placeholder="请输入订单编号"></el-input>
  33. </el-form-item>
  34. <el-form-item label="昵称" prop="member_name">
  35. <el-input v-model="search_form.member_name" placeholder="请输入昵称"></el-input>
  36. </el-form-item>
  37. <a href="#">
  38. <el-button type="success" icon="el-icon-search" @click="search()">搜索</el-button>
  39. </a>
  40. </el-row>
  41. </el-form>
  42. <template>
  43. <!-- 表格start -->
  44. <el-table :data="list" style="width: 100%" v-loading="table_loading">
  45. <el-table-column prop="id" label="昵称" align="center">
  46. <template slot-scope="scope">
  47. <img :src="scope.row.avatar" style="width:50px;height:50px">
  48. <div>【[[scope.row.member_id]]】[[scope.row.nickname]]</div>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="规格和数量" align="center">
  52. <template slot-scope="scope">
  53. <div>[[scope.row.option_title?scope.row.option_title:'单规格']]*[[scope.row.purchase_quantity]]</div>
  54. </template>
  55. </el-table-column>
  56. <el-table-column prop="price" label="拼团单价" align="center"></el-table-column>
  57. <el-table-column prop="total_price" label="拼团总价" align="center"></el-table-column>
  58. <el-table-column prop="total" label="拼团时间" min-width="150" align="center">
  59. <template slot-scope="scope">
  60. [[scope.row.created_at]]
  61. </template>
  62. </el-table-column>
  63. <el-table-column prop="total" label="支付时间" min-width="150" align="center">
  64. <template slot-scope="scope">
  65. <span v-if="!scope.row.join_time">---:---</span>
  66. <span v-else>[[scope.row.join_time]]</span>
  67. </template>
  68. </el-table-column>
  69. <el-table-column prop="order_sn" label="订单编号" align="center"></el-table-column>
  70. <el-table-column prop="status_message" label="参团状态" align="center"></el-table-column>
  71. <el-table-column label="管理" min-width="80" align="center">
  72. <template slot-scope="scope">
  73. <a target="_blank" :href="'{{ yzWebFullUrl('plugin.fight-groups.admin.controllers.order-store.detail', array('id' => '')) }}'+[[scope.row.order_id]]">
  74. 查看订单
  75. </a><br>
  76. </template>
  77. </el-table-column>
  78. </el-table>
  79. <!-- 表格end -->
  80. </template>
  81. <!-- 分页 -->
  82. <el-row>
  83. <el-col :span="24" align="right" style="padding:15px 5% 15px 0">
  84. <el-pagination layout="prev, pager, next" @current-change="currentChange" :total="total" :page-size="per_size" :current-page="current_page" background v-loading="loading"></el-pagination>
  85. </el-col>
  86. </el-row>
  87. </template>
  88. </div>
  89. <script>
  90. var app = new Vue({
  91. el:"#app",
  92. delimiters: ['[[', ']]'],
  93. data() {
  94. return{
  95. id:"",
  96. search_form:{},
  97. form:{},
  98. list:[],
  99. loading:false,
  100. dialog_loading:false,
  101. table_loading:false,
  102. rules:{},
  103. //分页
  104. total:0,
  105. per_size:0,
  106. current_page:0,
  107. rules:{},
  108. }
  109. },
  110. created() {
  111. //获得url传过来的id
  112. var url = window.location.href;
  113. var url_arr = url.split("=");
  114. this.id = url_arr[url_arr.length-1];
  115. let new_url = "";
  116. for(let i=0;i<url_arr.length;i++) {
  117. if(this.id.charAt(i)!="#") {
  118. new_url = new_url+this.id.charAt(i);
  119. }
  120. }
  121. this.id = new_url;
  122. let json = {team_id:this.id}
  123. this.getData(json);
  124. },
  125. methods: {
  126. getData(json) {
  127. var that = this;
  128. that.all_loading = true;
  129. that.$http.post("{!! yzWebFullUrl('plugin.fight-groups.admin.controllers.team-store.search-details') !!}",json).then(response => {
  130. if(response.data.result==1){
  131. console.log(response)
  132. that.list = response.data.data.data;
  133. that.list.forEach((item,index) => {
  134. if(item.join_time){
  135. item.join_time = that.timeStyle(item.join_time)
  136. }
  137. // if(item.refund_time){
  138. // item.refund_time = that.timeStyle(item.refund_time)
  139. // }
  140. });
  141. that.total = response.data.data.total;
  142. that.per_size = response.data.data.per_page;
  143. that.current_page = response.data.data.current_page;
  144. }
  145. else{
  146. that.$message.error(response.data.msg);
  147. }
  148. console.log(this.list)
  149. that.all_loading = false;
  150. }),function(res){
  151. console.log(res);
  152. that.all_loading = false;
  153. };
  154. },
  155. // 分页
  156. currentChange(page) {
  157. var that = this;
  158. let json = {page:page,team_id:that.id,member_name:that.search_form.member_name,order_sn:that.search_form.order_sn};
  159. that.getData(json);
  160. },
  161. // 搜索
  162. search() {
  163. var that = this;
  164. console.log(that.search_form)
  165. let json = {page:1,team_id:that.id,member_name:that.search_form.member_name,order_sn:that.search_form.order_sn};
  166. that.getData(json);
  167. },
  168. add0(m) {
  169. return m<10?'0'+m:m
  170. },
  171. timeStyle(time) {
  172. let time1 = new Date(time*1000);
  173. let y = time1.getFullYear();
  174. let m = time1.getMonth()+1;
  175. let d = time1.getDate();
  176. let h = time1.getHours();
  177. let mm = time1.getMinutes();
  178. let s = time1.getSeconds();
  179. return y+'-'+this.add0(m)+'-'+this.add0(d)+' '+this.add0(h)+':'+this.add0(mm)+':'+this.add0(s);
  180. },
  181. },
  182. })
  183. </script>
  184. @endsection