clerk-log.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-attachment');
  4. ComponentHelper::loadComponentView('com-image');
  5. ComponentHelper::loadComponentView('com-map');
  6. ?>
  7. <div id="app" v-cloak>
  8. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  9. <div slot="header">
  10. <span>核销统计</span>
  11. </div>
  12. <div class="table-body">
  13. <el-form size="small" :inline="true">
  14. <el-form-item>
  15. <el-input style="width: 200px" v-model="searchData.clerk_keyword" placeholder="请输入核销员ID/昵称/手机号" clearable></el-input>
  16. </el-form-item>
  17. <el-form-item>
  18. <el-input style="width: 200px" v-model="searchData.user_keyword" placeholder="请输入用户ID/昵称/手机号" clearable></el-input>
  19. </el-form-item>
  20. <el-form-item>
  21. <el-input style="width: 200px" v-model="searchData.order_no" placeholder="请输入订单编号" clearable></el-input>
  22. </el-form-item>
  23. <el-form-item>
  24. <el-date-picker size="small" v-model="searchData.date" type="datetimerange" style="float: left" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" @change="selectDateTime" end-placeholder="结束日期">
  25. </el-date-picker>
  26. </el-form-item>
  27. <el-form-item>
  28. <el-button type="primary" @click="searchs" style="padding: 9px 15px !important">搜索</el-button>
  29. </el-form-item>
  30. </el-form>
  31. <el-tabs v-model="activeName" >
  32. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" >
  33. <el-table-column prop="clerkUser.id" label="核销员Id" align="center"></el-table-column>
  34. <el-table-column label="核销员" >
  35. <template slot-scope="scope">
  36. <div class="table-info-img-text">
  37. <el-image class="table-info-img circle" :src="scope.row.clerkUser.avatar_url">
  38. <div slot="error" class="image-slot">
  39. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  40. </div>
  41. </el-image>
  42. <div class="table-info-text">
  43. <div style="color:#000;">{{scope.row.clerkUser.nickname}}</div>
  44. <div style="font-size: 12px;">{{scope.row.clerkUser.mobile}}</div>
  45. </div>
  46. </div>
  47. </template>
  48. </el-table-column>
  49. <el-table-column prop="user_id" label="核销/下单用户ID" align="center"></el-table-column>
  50. <el-table-column label="核销/下单用户" >
  51. <template slot-scope="scope">
  52. <div class="table-info-img-text">
  53. <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
  54. <div slot="error" class="image-slot">
  55. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  56. </div>
  57. </el-image>
  58. <div class="table-info-text">
  59. <div style="color:#000;">{{scope.row.user.nickname}}</div>
  60. <div style="font-size: 12px;">{{scope.row.user.mobile}}</div>
  61. </div>
  62. </div>
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="所属门店" prop="store.store_name" align="center" ></el-table-column>
  66. <el-table-column label="订单号" prop="order_no" align="center"></el-table-column>
  67. <el-table-column label="创建时间" align="center">
  68. <template slot-scope="scope">
  69. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  70. </template>
  71. </el-table-column>
  72. <!-- <el-table-column label="操作" align="center">
  73. <template slot-scope="scope">
  74. <el-button type="text" @click="$navigate({r:'store/client/reserve-staff/detail', id: scope.row.user_id})" class="all_text">查看</el-button>
  75. <el-button type="text" @click="onDelete(scope.row, scope.$index)" class="all_text" style="margin-left: 10px">删除</el-button>
  76. <el-button type="text" @click="association(scope.row)" class="all_text" style="margin-left: 10px">关联商品</el-button>
  77. </template>
  78. </el-table-column> -->
  79. </el-table>
  80. </el-tabs>
  81. <div flex="box:last cross:center">
  82. <div></div>
  83. <div>
  84. <el-pagination v-if="pagination" :page-size="page_size"
  85. style="float: right;" background @current-change="pageChange"
  86. layout="prev, pager, next" :total="pagination.totalCount">
  87. </el-pagination>
  88. </div>
  89. </div>
  90. </div>
  91. </el-card>
  92. </div>
  93. <script>
  94. const app = new Vue({
  95. el: '#app',
  96. data: {
  97. searchData: {
  98. user_keyword: '',
  99. clerk_keyword: '', //会员昵称/手机号
  100. order_no: '',
  101. name: '',//用户来源
  102. mobile: '',//注册开始时间
  103. address: '',//注册结束时间
  104. date_start: '',
  105. date_end: '',
  106. date: '',
  107. },
  108. form: {
  109. user_id: '',
  110. level: '',
  111. idcard: '',
  112. idcard_front: '',
  113. idcard_back: '',
  114. address: '',
  115. longitude: '',
  116. latitude: '',
  117. nickname: '',
  118. name: '',
  119. mobile: '',
  120. qualification_certificate: [],
  121. avatar: '',
  122. age: '',
  123. gender: '1',
  124. },
  125. list: [],
  126. loading: false,
  127. btnLoading: false,
  128. activeName: '-1',
  129. pagination: null,
  130. page_size: 10,
  131. currentItem: null,
  132. drawer: false,
  133. direction: 'rtl',
  134. rules: {},
  135. levels: [],
  136. add: true,
  137. origin_level: '',
  138. user: {
  139. keyword: ''
  140. },
  141. lng_lat: '',
  142. page: 1,
  143. custom_text: '',
  144. dialogVisibleAssociation: false,
  145. dialogVisibleAssociationAdd: false,
  146. gridData:[],
  147. gridDataGoodsList:[],
  148. multipleSelection: [2096],
  149. searchGoodsData: {
  150. keyword: '',
  151. },
  152. checkedList:[],
  153. paginationAdd: null,
  154. user_id:'',
  155. selectedGoodsIds:[],
  156. },
  157. computed: {
  158. },
  159. mounted() {
  160. this.loadData();
  161. },
  162. methods: {
  163. selectDateTime(e) {
  164. if (e != null) {
  165. this.searchData.date_start = e[0];
  166. this.searchData.date_end = e[1];
  167. } else {
  168. this.searchData.date_start = '';
  169. this.searchData.date_end = '';
  170. }
  171. this.searchs();
  172. },
  173. loadData() {
  174. this.loading = true;
  175. let params = {
  176. r: 'happiness/store-clerk/clerk-log',
  177. page: this.page,
  178. };
  179. params = Object.assign(params, this.searchData);
  180. request({
  181. params: params,
  182. method: 'get',
  183. }).then(e => {
  184. this.loading = false;
  185. if (e.data.code == 0) {
  186. this.list = e.data.data.list;
  187. this.pagination = e.data.data.pagination;
  188. this.page_size = e.data.data.page_size;
  189. console.log('list', this.list);
  190. } else {
  191. this.$message.error(e.data.msg);
  192. }
  193. }).catch(e => {
  194. this.loading = false;
  195. });
  196. },
  197. searchs() {
  198. this.page = 1;
  199. this.loadData();
  200. },
  201. pageChange(page) {
  202. this.page = page;
  203. this.loadData();
  204. },
  205. handleClose(done) {
  206. this.drawer = false
  207. done()
  208. },
  209. }
  210. });
  211. </script>
  212. <style>
  213. .el-tabs__header {
  214. font-size: 16px;
  215. }
  216. .table-body {
  217. padding: 20px;
  218. background-color: #fff;
  219. }
  220. .table-body .el-button {
  221. padding: 0 !important;
  222. border: 0;
  223. margin: 0 5px;
  224. }
  225. .input-item {
  226. width: 250px;
  227. margin: 0 0 20px;
  228. display: inline-block;
  229. }
  230. /*.input-item .el-input__inner {*/
  231. /* border-right: 0;*/
  232. /*}*/
  233. .input-item .el-input__inner:hover {
  234. border: 1px solid #dcdfe6;
  235. /*border-right: 0;*/
  236. outline: 0;
  237. }
  238. .input-item .el-input__inner:focus {
  239. border: 1px solid #dcdfe6;
  240. /*border-right: 0;*/
  241. outline: 0;
  242. }
  243. .input-item .el-input-group__append {
  244. background-color: #fff;
  245. border-left: 0;
  246. width: 10%;
  247. padding: 0;
  248. }
  249. .input-item .el-input-group__append .el-button {
  250. padding: 0;
  251. }
  252. .input-item .el-input-group__append .el-button {
  253. margin: 0;
  254. }
  255. .batch {
  256. margin: 0 0 20px;
  257. display: inline-block;
  258. }
  259. .batch .el-button {
  260. padding: 9px 15px !important;
  261. }
  262. .el-table th>.cell{
  263. color: #333;
  264. font-weight: bold;
  265. font-size: 14px;
  266. }
  267. .el-table__footer-wrapper, .el-table__header-wrapper{
  268. border-bottom: 1.4px solid #D6D6D6;
  269. }
  270. .el-table th>.cell {
  271. color: #333;
  272. font-weight: bold;
  273. font-size: 14px;
  274. }
  275. .table1 .el-table__footer-wrapper,
  276. .table1 .el-table__header-wrapper {
  277. border-bottom: 1.4px solid #D6D6D6;
  278. }
  279. .user_img{
  280. position: relative;
  281. margin-right: 8px;
  282. /* height: 50px;
  283. width: 50px; */
  284. }
  285. .default-avatar{
  286. width: 50px;
  287. height: 50px;
  288. border-radius: 50%;
  289. margin-right: 8px;
  290. }
  291. .uer-nickname {
  292. flex: 1;
  293. }
  294. .v-modal {
  295. z-index: 200 !important;
  296. }
  297. .add-image-btn {
  298. width: 100px;
  299. height: 100px;
  300. color: #419EFB;
  301. border: 1px solid #e2e2e2;
  302. cursor: pointer;
  303. }
  304. .del-btn {
  305. position: absolute;
  306. right: -14px;
  307. top: -14px;
  308. }
  309. .width-300 {
  310. max-width: 320px;
  311. }
  312. .card-covers {
  313. display: grid;
  314. grid-template-columns: repeat(3, 1fr);
  315. grid-gap: 10px;
  316. grid-auto-rows: minmax(100px, auto);
  317. grid-auto-flow: dense;
  318. }
  319. </style>