clerk-log.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <style>
  2. </style>
  3. <div id="app" v-cloak>
  4. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  5. <div slot="header">
  6. <span>核销明细</span>
  7. </div>
  8. <div class="table-body">
  9. <el-form ref="form" style="margin-bottom: 10px;" :model="searchInfo" label-width="96px" size="mini">
  10. <el-row :gutter="24">
  11. <el-col :span="5" style="padding-left: 0;" class="top_form">
  12. <el-form-item label="会员ID">
  13. <el-input v-model="searchInfo.user_id" placeholder="请输入会员ID" clearable></el-input>
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="5" style="padding-left: 0;" class="top_form">
  17. <el-form-item label="订单编号">
  18. <el-input v-model="searchInfo.order_no" placeholder="请输入订单编号" clearable></el-input>
  19. </el-form-item>
  20. </el-col>
  21. <el-button @click="toSearch" style="padding: 9px 15px !important;" size="small" type="primary">搜索</el-button>
  22. </el-row>
  23. </el-form>
  24. <el-tabs v-model="activeName" >
  25. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" >
  26. <el-table-column prop="id" min-width="30" label="ID" align="center"></el-table-column>
  27. <el-table-column label="会员" >
  28. <template slot-scope="scope">
  29. <div class="user_img" flex="cross:center">
  30. <el-image class="default-avatar" :src="scope.row.user.avatar_url">
  31. <div slot="error" class="image-slot">
  32. <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
  33. </div>
  34. </el-image>
  35. <div class="uer-nickname over1" v-if="scope.row.user.nickname">{{scope.row.user.nickname}}</div>
  36. <div class="uer-nickname over1" v-else >ID:{{scope.row.user_id}}</div>
  37. </div>
  38. </template>
  39. </el-table-column>
  40. <el-table-column label="电话" prop="mobile" ></el-table-column>
  41. <el-table-column label="订单编号" prop="order_no" ></el-table-column>
  42. <el-table-column label="核销时间" align="center">
  43. <template slot-scope="scope">
  44. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  45. </template>
  46. </el-table-column>
  47. </el-table>
  48. </el-tabs>
  49. <div flex="box:last cross:center">
  50. <div></div>
  51. <div>
  52. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize"
  53. style="float: right;" background @current-change="pageChange"
  54. layout="prev, pager, next" :total="pagination.totalCount">
  55. </el-pagination>
  56. </div>
  57. </div>
  58. </div>
  59. </el-card>
  60. </div>
  61. <script>
  62. const app = new Vue({
  63. el: '#app',
  64. data: {
  65. levels:[],
  66. searchInfo: {
  67. user_id: '',
  68. nickname_or_mobile: '', //会员昵称/手机号
  69. clerk_id:0,
  70. },
  71. list: [],
  72. editForm:{},
  73. channelArr: [],//渠道
  74. edit_visible: false,
  75. loading: false,
  76. activeName: '-1',
  77. pagination: null,
  78. },
  79. computed: {
  80. },
  81. mounted() {
  82. this.loadData();
  83. },
  84. methods: {
  85. loadData() {
  86. this.loading = true;
  87. let params = {
  88. r: 'store/client/clerk/clerk-log'
  89. };
  90. params = Object.assign(params, this.searchInfo);
  91. request({
  92. params: params,
  93. method: 'get',
  94. }).then(e => {
  95. this.loading = false;
  96. if (e.data.code == 0) {
  97. this.list = e.data.data.list;
  98. this.pagination = e.data.data.pagination;
  99. this.levels = e.data.data.levels;
  100. } else {
  101. this.$message.error(e.data.msg);
  102. }
  103. }).catch(e => {
  104. this.loading = false;
  105. });
  106. },
  107. toSearch() {
  108. this.page = 1;
  109. this.loadData();
  110. },
  111. pageChange(page) {
  112. this.search.page = page;
  113. this.loadData();
  114. },
  115. },
  116. created: function() {
  117. this.searchInfo.clerk_id = getQuery('id');
  118. },
  119. });
  120. </script>
  121. <style>
  122. .el-tabs__header {
  123. font-size: 16px;
  124. }
  125. .table-body {
  126. padding: 20px;
  127. background-color: #fff;
  128. }
  129. .table-body .el-button {
  130. padding: 0 !important;
  131. border: 0;
  132. margin: 0 5px;
  133. }
  134. .input-item {
  135. width: 250px;
  136. margin: 0 0 20px;
  137. display: inline-block;
  138. }
  139. /*.input-item .el-input__inner {*/
  140. /* border-right: 0;*/
  141. /*}*/
  142. .input-item .el-input__inner:hover {
  143. border: 1px solid #dcdfe6;
  144. /*border-right: 0;*/
  145. outline: 0;
  146. }
  147. .input-item .el-input__inner:focus {
  148. border: 1px solid #dcdfe6;
  149. /*border-right: 0;*/
  150. outline: 0;
  151. }
  152. .input-item .el-input-group__append {
  153. background-color: #fff;
  154. border-left: 0;
  155. width: 10%;
  156. padding: 0;
  157. }
  158. .input-item .el-input-group__append .el-button {
  159. padding: 0;
  160. }
  161. .input-item .el-input-group__append .el-button {
  162. margin: 0;
  163. }
  164. .batch {
  165. margin: 0 0 20px;
  166. display: inline-block;
  167. }
  168. .batch .el-button {
  169. padding: 9px 15px !important;
  170. }
  171. .el-table th>.cell{
  172. color: #333;
  173. font-weight: bold;
  174. font-size: 14px;
  175. }
  176. .el-table__footer-wrapper, .el-table__header-wrapper{
  177. border-bottom: 1.4px solid #D6D6D6;
  178. }
  179. .el-table th>.cell {
  180. color: #333;
  181. font-weight: bold;
  182. font-size: 14px;
  183. }
  184. .table1 .el-table__footer-wrapper,
  185. .table1 .el-table__header-wrapper {
  186. border-bottom: 1.4px solid #D6D6D6;
  187. }
  188. .user_img{
  189. position: relative;
  190. margin-right: 8px;
  191. /* height: 50px;
  192. width: 50px; */
  193. }
  194. .default-avatar{
  195. width: 50px;
  196. height: 50px;
  197. border-radius: 50%;
  198. margin-right: 8px;
  199. }
  200. .uer-nickname {
  201. flex: 1;
  202. }
  203. </style>