index.php 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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. .el-table th>.cell {
  42. color: #333;
  43. font-weight: bold;
  44. font-size: 14px;
  45. }
  46. .el-table__footer-wrapper,
  47. .el-table__header-wrapper {
  48. border-bottom: 1.4px solid #D6D6D6;
  49. }
  50. .el-date-editor .el-range-separator {
  51. /* 设置选择日期框的中间的 ‘至’ 的宽度 */
  52. width: 8%;
  53. }
  54. </style>
  55. <div id="app" v-cloak>
  56. <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;" style="min-width: 1000px;">
  57. <div slot="header">
  58. <div>
  59. <span>签约记录列表</span>
  60. </div>
  61. </div>
  62. <div class="table-body">
  63. <div class="head" style="display: flex;flex-wrap: wrap;">
  64. <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
  65. <div style="flex-shrink: 0;align-items: center;">会员ID:</div>
  66. <el-input clearable size="small" type="text" v-model="search.user_id" placeholder="请输入会员ID精准搜索" @keyup.enter.native="toSearch"></el-input>
  67. </div>
  68. <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
  69. <div style="flex-shrink: 0;align-items: center;">会员昵称/手机号</div>
  70. <el-input clearable size="small" type="text" v-model="search.user_keyword" placeholder="请输入会员昵称/手机号" @keyup.enter.native="toSearch"></el-input>
  71. </div>
  72. <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
  73. <div style="flex-shrink: 0;align-items: center;">银行卡号:</div>
  74. <el-input clearable size="small" type="text" v-model="search.card_no" placeholder="请输入银行卡号" @keyup.enter.native="toSearch"></el-input>
  75. </div>
  76. <div style="display: flex;margin-right: 20px;align-items: center;margin-bottom: 20px;">
  77. <div style="flex-shrink: 0;align-items: center;">签约时间:</div>
  78. <el-date-picker size="small" v-model="time" @change="datetimeChange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" align="center">
  79. </el-date-picker>
  80. </div>
  81. <div class="item-box" flex="dir:left cross:center">
  82. <el-button size="small" type="primary" style="margin-bottom: 20px;" @click="toSearch">搜索
  83. </el-button>
  84. </div>
  85. <div class="item-box" flex="dir:left cross:center" v-if="search.card_no || search.start_time || search.end_time || search.user_id || search.user_keyword">
  86. <el-button size="small" type="warning" style="margin-bottom: 20px; margin-left: 10px;" @click="resetFun">清除搜索条件 </el-button>
  87. </div>
  88. </div>
  89. <el-table v-loading="listLoading" :data="list" stripe style="width: 100%">
  90. <el-table-column label="会员ID" min-width="120" align="center">
  91. <template slot-scope="scope">
  92. <div size="small">{{scope.row.user_id}}</div>
  93. </template>
  94. </el-table-column>
  95. <el-table-column prop="avatar_url,nickname" label="会员" min-width="120">
  96. <template slot-scope="scope">
  97. <div class="table-info-img-text">
  98. <el-image class="table-info-img circle" :src="scope.row.avatar_url"> </el-image>
  99. <div class="table-info-text">
  100. <div v-if="scope.row.nickname">{{scope.row.nickname}}</div>
  101. <div>{{scope.row.mobile}}</div>
  102. </div>
  103. </div>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="订单号" min-width="150" align="center">
  107. <template slot-scope="scope">
  108. <div size="small">{{scope.row.order_no}}</div>
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="银行名称" min-width="100" align="center">
  112. <template slot-scope="scope">
  113. <div size="small">{{scope.row.bank_name}}</div>
  114. </template>
  115. </el-table-column>
  116. <el-table-column label="银行卡号" min-width="100" align="center">
  117. <template slot-scope="scope">
  118. <div size="small">{{scope.row.bank_card_no}}</div>
  119. </template>
  120. </el-table-column>
  121. <el-table-column label="银行卡类型" min-width="100" align="center">
  122. <template slot-scope="scope">
  123. <div size="small">{{scope.row.card_type_name}}</div>
  124. </template>
  125. </el-table-column>
  126. <el-table-column label="时间" min-width="100" align="center">
  127. <template slot-scope="scope">
  128. <div size="small">{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  129. </template>
  130. </el-table-column>
  131. <!--
  132. <el-table-column
  133. label="操作"
  134. align="center"
  135. min-width="100">
  136. <template slot-scope="scope">
  137. <el-button style="margin: 1px;" type="primary" size="mini" @click="seeOrder(scope.row)">查看订单<i class="el-icon-caret-right el-icon--right"></i></el-button>
  138. </template>
  139. </el-table-column>
  140. -->
  141. </el-table>
  142. <div flex="box:last cross:center">
  143. <div></div>
  144. <div>
  145. <el-pagination v-if="list.length > 0" style="display: inline-block;float: right;" background :page-size="pagination.pageSize" @current-change="pageChange" layout="prev, pager, next" :current-page="pagination.current_page" :page-count="pageCount">
  146. </el-pagination>
  147. </div>
  148. </div>
  149. </div>
  150. </el-card>
  151. </div>
  152. <script>
  153. const app = new Vue({
  154. el: '#app',
  155. data() {
  156. return {
  157. list: [],
  158. listLoading: false,
  159. page: 1,
  160. pageCount: 0,
  161. search: {
  162. page: 1,
  163. user_keyword: '',
  164. start_time: '',
  165. end_time: '',
  166. card_no: '',
  167. },
  168. time: '',
  169. pagination: null,
  170. };
  171. },
  172. methods: {
  173. resetFun() {
  174. this.search = {
  175. page: 1,
  176. user_keyword: '',
  177. start_time: '',
  178. end_time: '',
  179. card_no: '',
  180. };
  181. this.time = '';
  182. this.toSearch();
  183. },
  184. datetimeChange() {
  185. if (this.time) {
  186. this.search.start_time = this.time[0];
  187. this.search.end_time = this.time[1];
  188. } else {
  189. this.search.start_time = '';
  190. this.search.end_time = '';
  191. }
  192. this.toSearch();
  193. },
  194. toSearch() {
  195. this.search.page = 1;
  196. this.getList();
  197. },
  198. pageChange(currentPage) {
  199. let self = this;
  200. self.search.page = currentPage;
  201. self.getList();
  202. },
  203. getList() {
  204. let self = this;
  205. self.listLoading = true;
  206. let params = {
  207. r: 'join-pay/default/sign-record'
  208. }
  209. params = Object.assign(params, this.search);
  210. request({
  211. params: params,
  212. method: 'get',
  213. }).then(e => {
  214. self.listLoading = false;
  215. if (e.data.code == 0) {
  216. self.list = e.data.data.list;
  217. self.pagination = e.data.data.pagination;
  218. self.pageCount = e.data.data.page_count;
  219. } else {
  220. self.$message.error(e.data.msg);
  221. }
  222. }).catch(e => {
  223. console.log(e);
  224. self.$message.error(e);
  225. });
  226. },
  227. },
  228. mounted: function() {
  229. this.getList();
  230. }
  231. });
  232. </script>