detail.php 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <div id="user_detail_view" v-if="detailInfo" v-cloak>
  2. <div class="user_info">
  3. <div class="user_detail">
  4. <el-image style="height:50px;width:50px;border-radius: 50%;margin-right: 20px;" :src="detailInfo.user.avatar_url?detailInfo.user.avatar_url:'/resources/img/common/default-avatar.png'" lazy></el-image>
  5. <div style="flex:1;">
  6. <div style="margin-bottom: 20px;" class="my_flex">
  7. <div style="flex:1;">
  8. <div class="user_name">
  9. {{detailInfo.user.nickname}}
  10. </div>
  11. </div>
  12. </div>
  13. <el-row :gutter="24" style="margin-bottom: 20px;">
  14. <el-col :span="6">手机号:{{detailInfo.user.mobile || '无'}}</el-col>
  15. <el-col :span="6">最近访问时间:{{detailInfo.last_time | dateTimeFormat("Y-m-d H:i:s")}}</el-col>
  16. </el-row>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="user_info">
  21. <div class="my_flex">
  22. <div class="assets_info">
  23. <div>累计消费金额</div>
  24. <div class="info">{{detailInfo.pay_money}}</div>
  25. </div>
  26. <div class="assets_info">
  27. <div>累计消费订单数</div>
  28. <div class="info">{{detailInfo.pay_nums}}</div>
  29. </div>
  30. <div class="assets_info">
  31. <div>下单数</div>
  32. <div class="info">{{detailInfo.order_nums}}</div>
  33. </div>
  34. <div class="assets_info">
  35. <div>客单价</div>
  36. <div class="info">{{detailInfo.ke_dan_jia}}</div>
  37. </div>
  38. <div class="assets_info">
  39. <div>累计退款金额</div>
  40. <div class="info">{{detailInfo.refund_money}}</div>
  41. </div>
  42. <div class="assets_info">
  43. <div>累计退款订单数</div>
  44. <div class="info">{{detailInfo.refund_nums}}</div>
  45. </div>
  46. <div class="assets_info">
  47. <div>最近下单时间</div>
  48. <div class="info">{{detailInfo.last_time | dateTimeFormat("Y-m-d H:i:s")}}</div>
  49. </div>
  50. </div>
  51. </div>
  52. <el-table :data="order_detail_list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" >
  53. <el-table-column prop="goods_name" label="商品" align="center"></el-table-column>
  54. <el-table-column prop="num" label="付款件数" align="center"></el-table-column>
  55. <el-table-column prop="goods_price" label="付款金额" align="center"></el-table-column>
  56. </el-table>
  57. <div flex="box:last cross:center">
  58. <div></div>
  59. <div>
  60. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize"
  61. style="display: inline-block;float: right;" background @current-change="pageChange"
  62. layout="prev, pager, next" :total="pagination.totalCount">
  63. </el-pagination>
  64. </div>
  65. </div>
  66. </div>
  67. <script>
  68. // getQuery('order_id'),
  69. const app = new Vue({
  70. el: '#user_detail_view',
  71. data() {
  72. return {
  73. user_id: 0,
  74. detailInfo: null,
  75. order_detail_list:[],
  76. pagination: null,
  77. loading: false,
  78. }
  79. },
  80. mounted(){
  81. this.user_id = getQuery('id');
  82. this.getList();
  83. },
  84. methods:{
  85. getList(){
  86. let that = this;
  87. request({
  88. params: {
  89. r: 'mch/client/user/detail',
  90. id: this.user_id
  91. },
  92. method: 'get'
  93. }).then(res => {
  94. if(res.data.code == 0){
  95. this.propertyArr = [];
  96. this.detailInfo = res.data.data.detail;
  97. this.order_detail_list = res.data.data.order_detail_list.list;
  98. this.pagination = res.data.data.order_detail_list.pagination;
  99. }else{
  100. this.$message.error(res.data.msg);
  101. }
  102. this.tagLoading = false;
  103. }).catch(err => {
  104. })
  105. },
  106. pageChange(page) {
  107. this.search.page = page;
  108. this.getList();
  109. },
  110. }
  111. })
  112. </script>
  113. <style>
  114. .el-main{
  115. flex-basis: unset;
  116. display: flex;
  117. display: -webkit-flex;
  118. }
  119. #user_detail_view{
  120. flex: 1;
  121. }
  122. .user_info{
  123. background: #FFF;
  124. padding: 20px;
  125. margin-bottom: 10px;
  126. }
  127. .user_detail{
  128. display: flex;
  129. /* align-items: center; */
  130. }
  131. .user_detail .info{
  132. display: flex;
  133. font-size: 12px;
  134. color: #939393;
  135. }
  136. .user_detail .info .text{
  137. color: #000;
  138. margin-right: 40px;
  139. }
  140. .user_detail .user_name{
  141. font-size: 15px;
  142. margin-bottom: 10px;
  143. }
  144. .user_material{
  145. display: flex;
  146. margin-bottom: 10px;
  147. }
  148. .material_m{
  149. background: #FFF;
  150. flex: 1;
  151. padding: 10px 30px
  152. }
  153. .material_m:first-child{
  154. margin-right: 8px;
  155. }
  156. .material_m:last-child{
  157. margin-left: 8px;
  158. }
  159. .material_title{
  160. font-size: 16px;
  161. margin-bottom: 20px;
  162. border-left: 5px solid #1479F0;
  163. padding-left: 8px;
  164. line-height: 24px;
  165. }
  166. .my_flex{
  167. display: flex;
  168. }
  169. .assets_title{
  170. font-size: 16px;
  171. margin-bottom: 15px;
  172. align-items: flex-end;
  173. }
  174. .assets_info{
  175. flex: 1;
  176. }
  177. .assets_info .info{
  178. /* font-weight: bold; */
  179. margin-top: 5px;
  180. font-size: 20px;
  181. }
  182. .assets_mo{
  183. background: #F2F2F2;
  184. padding: 20px 30px;
  185. }
  186. .title_bu{
  187. font-size: 12px;
  188. color: #2E8FF6;
  189. margin-left: 10px;
  190. }
  191. .title_bu:hover{
  192. cursor:pointer;
  193. }
  194. .hover-close:hover{
  195. color: #2E8FF6;
  196. cursor:pointer;
  197. }
  198. .title_bu_text{
  199. font-size: 12px;
  200. color: #2E8FF6;
  201. }
  202. .title_bu_text:hover{
  203. cursor:default;
  204. }
  205. .lable_i{
  206. background: #F4F4F4;
  207. padding: 5px 15px;
  208. margin-right: 14px;
  209. }
  210. .round_page{
  211. display: flex;
  212. justify-content: center;
  213. }
  214. .round{
  215. width: 10px;
  216. height: 10px;
  217. background: #F2F2F2;
  218. border-radius: 50%;
  219. margin-right: 10px;
  220. }
  221. .page_sel{
  222. background: #2E8FF4;
  223. }
  224. .el-dialog__body {
  225. padding: 15px 20px 20px;
  226. }
  227. .up_user_s .el-select{
  228. margin-right: 10px;
  229. }
  230. </style>