agent-detail.php 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <style>
  2. .table-body {
  3. padding: 20px;
  4. background-color: #fff;
  5. }
  6. .input-item {
  7. display: inline-block;
  8. width: 250px;
  9. margin: 0 0 20px;
  10. }
  11. .input-item .el-input__inner {
  12. border-right: 0;
  13. }
  14. .input-item .el-input__inner:hover {
  15. border: 1px solid #dcdfe6;
  16. border-right: 0;
  17. outline: 0;
  18. }
  19. .input-item .el-input__inner:focus {
  20. border: 1px solid #dcdfe6;
  21. border-right: 0;
  22. outline: 0;
  23. }
  24. .input-item .el-input-group__append {
  25. background-color: #fff;
  26. border-left: 0;
  27. width: 10%;
  28. padding: 0;
  29. }
  30. .input-item .el-input-group__append .el-button {
  31. padding: 0;
  32. }
  33. .input-item .el-input-group__append .el-button {
  34. margin: 0;
  35. }
  36. .table-body .el-button {
  37. padding: 0 !important;
  38. border: 0;
  39. margin: 0 5px;
  40. }
  41. .form-body {
  42. background-color: #fff;
  43. margin-bottom: 20px;
  44. }
  45. .el-tabs__header {
  46. background-color: #fff;
  47. }
  48. .el-tabs__item {
  49. width: 100px;
  50. text-align: center;
  51. }
  52. .el-table th>.cell {
  53. color: #333;
  54. font-weight: bold;
  55. font-size: 14px;
  56. }
  57. .el-table__footer-wrapper,
  58. .el-table__header-wrapper {
  59. border-bottom: 1.4px solid #D6D6D6;
  60. }
  61. .flex-y-center {
  62. display: -webkit-box;
  63. display: -webkit-flex;
  64. display: flex;
  65. -webkit-box-align: center;
  66. -webkit-align-items: center;
  67. -ms-flex-align: center;
  68. -ms-grid-row-align: center;
  69. align-items: center;
  70. }
  71. .flex-x-center {
  72. display: -webkit-box;
  73. display: -webkit-flex;
  74. /* #ifndef APP-NVUE */
  75. display: flex;
  76. /* #endif */
  77. -webkit-box-pack: center;
  78. -webkit-justify-content: center;
  79. -ms-flex-pack: center;
  80. justify-content: center;
  81. }
  82. </style>
  83. <div id="app" v-cloak>
  84. <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  85. <div slot="header">
  86. <div>
  87. <span>经销明细</span>
  88. <!-- <div style="float: right">
  89. <el-button type="primary" size="small" style="padding: 9px 15px !important;" @click="add">
  90. </el-button>
  91. </div> -->
  92. </div>
  93. </div>
  94. <div class="table-body">
  95. <div class="input-item">
  96. <el-input @keyup.enter.native="search" size="small" placeholder="请输入订单编号/会员昵称" v-model="keyword" clearable @clear="search">
  97. <el-button slot="append" icon="el-icon-search" @click="search"></el-button>
  98. </el-input>
  99. </div>
  100. <el-table v-loading="listLoading" :data="list" stripe style="width: 100%">
  101. <el-table-column label="ID" prop="id" min-width="80" align="center">
  102. <template slot-scope="scope">
  103. <div size="small">{{scope.row.id}}</div>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="结算时间" prop="created_at" min-width="80" align="center">
  107. <template slot-scope="scope">
  108. <div size="small" v-if="scope.row.created_at != 0">{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  109. <div size="small" v-else>--</div>
  110. </template>
  111. </el-table-column>
  112. <el-table-column label="订单编号" prop="orderno" min-width="80" align="center">
  113. <template slot-scope="scope">
  114. <div size="small">{{scope.row.orderno}}</div>
  115. </template>
  116. </el-table-column>
  117. <el-table-column label="会员信息" prop="nickname" min-width="80" align="center">
  118. <template slot-scope="scope">
  119. <div size="small" v-if="scope.row.avatar_url" class="flex-y-center flex-x-center">
  120. <com-image style="border-radius: 22px;" width='45px' height='45px' :src=scope.row.avatar_url></com-image>
  121. </div>
  122. <div size="small" v-else class="flex-y-center flex-x-center"><com-image style="border-radius: 22px;" width='45px' height='45px'></com-image></div>
  123. <div size="small" class="flex-y-center flex-x-center">
  124. <span size="small" v-if="scope.row.nickname">昵称:{{scope.row.nickname}}</span>
  125. <span size="small" v-else>昵称:--</span>
  126. </div>
  127. <div size="small" class="flex-y-center flex-x-center">
  128. <span size="small" v-if="scope.row.mobile">手机:{{scope.row.mobile}}</span>
  129. <span size="small" v-else>手机:--</span>
  130. </div>
  131. <!-- <div style="position: relative;top:-40px;left:0px;" size="small" v-if="scope.row.nickname">昵称:{{scope.row.nickname}}</div>
  132. <div style="position: relative;top:-40px;left:15px;" size="small" v-else>昵称:--</div>
  133. <div style="position: relative;top:-30px;left:0px;" size="small" v-if="scope.row.mobile">手机:{{scope.row.mobile}}</div>
  134. <div style="position: relative;top:-30px;left:15px;" size="small" v-else>手机:--</div> -->
  135. </template>
  136. </el-table-column>
  137. <el-table-column label="经销信息" prop="level" min-width="80" align="center">
  138. <template slot-scope="scope">
  139. <div size="small">经销等级:等级{{scope.row.agent_level}}</div>
  140. <div style="font-size: 12px;" size="small">结算类型:{{scope.row.type_text}}</div>
  141. </template>
  142. </el-table-column>
  143. <el-table-column label="订单金额" prop="real_pay" min-width="30" align="center">
  144. <template slot-scope="scope">
  145. <div size="small">{{scope.row.real_pay}}</div>
  146. </template>
  147. </el-table-column>
  148. <el-table-column label="结算金额" prop="commission" min-width="30" align="center">
  149. <template slot-scope="scope">
  150. <div size="small">{{scope.row.commission}}</div>
  151. </template>
  152. </el-table-column>
  153. <el-table-column label="订单状态" prop="order_status_text" min-width="30" align="center">
  154. <template slot-scope="scope">
  155. <div size="small">{{scope.row.order_status_text}}</div>
  156. </template>
  157. </el-table-column>
  158. <el-table-column label="结算状态" prop="is_send_text" min-width="30" align="center">
  159. <template slot-scope="scope">
  160. <div size="small">{{scope.row.is_send_text}}</div>
  161. </template>
  162. </el-table-column>
  163. </el-table>
  164. <div style="text-align: right;margin: 20px 0;">
  165. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  166. </div>
  167. </div>
  168. </el-card>
  169. </div>
  170. <script>
  171. const app = new Vue({
  172. el: '#app',
  173. data() {
  174. return {
  175. status: 0,
  176. list: [],
  177. keyword: '',
  178. listLoading: false,
  179. page: 1,
  180. pageCount: 0
  181. };
  182. },
  183. methods: {
  184. search() {
  185. this.page = 1;
  186. this.getList();
  187. },
  188. pagination(currentPage) {
  189. let self = this;
  190. self.page = currentPage;
  191. self.getList();
  192. },
  193. // 0.1 获取卡券列表
  194. getList() {
  195. let self = this;
  196. self.listLoading = true;
  197. request({
  198. params: {
  199. r: 'plugin/course/admin/income-log/agent-detail',
  200. page: self.page,
  201. keyword: this.keyword
  202. },
  203. method: 'get',
  204. }).then(e => {
  205. self.listLoading = false;
  206. self.list = e.data.data.list;
  207. self.pageCount = e.data.data.page_count;
  208. }).catch(e => {
  209. console.log(e);
  210. });
  211. }
  212. },
  213. mounted: function() {
  214. this.getList();
  215. }
  216. });
  217. </script>