index.php 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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.store_id" placeholder="请输入门店ID" clearable></el-input>
  14. </el-form-item>
  15. </el-col>
  16. <el-button @click="toSearch" style="padding: 9px 15px !important;" size="small" type="primary">搜索</el-button>
  17. </el-row>
  18. </el-form>
  19. <el-tabs v-model="activeName" >
  20. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" >
  21. <el-table-column prop="id" min-width="30" label="ID" align="center"></el-table-column>
  22. <el-table-column label="门店信息" >
  23. <template slot-scope="scope">
  24. <div class="user_img" flex="cross:center">
  25. <el-image class="default-avatar" :src="scope.row.store.logo_img">
  26. <div slot="error" class="image-slot">
  27. <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
  28. </div>
  29. </el-image>
  30. <div class="uer-nickname over1" v-if="scope.row.store.store_name">{{scope.row.store.store_name}}</div>
  31. <div class="uer-nickname over1" v-else >ID:{{scope.row.store.store_id}}</div>
  32. </div>
  33. </template>
  34. </el-table-column>
  35. <el-table-column label="核销总次数" prop="total_count" ></el-table-column>
  36. <el-table-column label="核销总金额" prop="total_amount" ></el-table-column>
  37. <el-table-column label="核销总收益" prop="total_income" ></el-table-column>
  38. <el-table-column label="最近更新" align="center">
  39. <template slot-scope="scope">
  40. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  41. </template>
  42. </el-table-column>
  43. <el-table-column label="操作" align="center">
  44. <template slot-scope="scope">
  45. <el-button size="mini" type="text" @click="$navigate({r: 'electron-coupon/store-log/detail', id: scope.row.store_id})">详情</el-button>
  46. </template>
  47. </el-table-column>
  48. </el-table>
  49. </el-tabs>
  50. <div flex="box:last cross:center">
  51. <div></div>
  52. <div>
  53. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize"
  54. style="float: right;" background @current-change="pageChange"
  55. layout="prev, pager, next" :total="pagination.totalCount">
  56. </el-pagination>
  57. </div>
  58. </div>
  59. </div>
  60. </el-card>
  61. </div>
  62. <script>
  63. const app = new Vue({
  64. el: '#app',
  65. data: {
  66. searchInfo: {
  67. store_id: '',
  68. },
  69. list: [],
  70. edit_visible: false,
  71. loading: false,
  72. activeName: '-1',
  73. pagination: null,
  74. },
  75. computed: {
  76. },
  77. mounted() {
  78. this.loadData();
  79. },
  80. methods: {
  81. loadData() {
  82. this.loading = true;
  83. let params = {
  84. r: 'electron-coupon/store-log/index'
  85. };
  86. params = Object.assign(params, this.searchInfo);
  87. request({
  88. params: params,
  89. method: 'get',
  90. }).then(e => {
  91. this.loading = false;
  92. if (e.data.code == 0) {
  93. this.list = e.data.data.list;
  94. this.pagination = e.data.data.pagination;
  95. } else {
  96. this.$message.error(e.data.msg);
  97. }
  98. }).catch(e => {
  99. this.loading = false;
  100. });
  101. },
  102. toSearch() {
  103. this.page = 1;
  104. this.loadData();
  105. },
  106. pageChange(page) {
  107. this.search.page = page;
  108. this.loadData();
  109. },
  110. },
  111. created: function() {
  112. },
  113. });
  114. </script>
  115. <style>
  116. .el-tabs__header {
  117. font-size: 16px;
  118. }
  119. .table-body {
  120. padding: 20px;
  121. background-color: #fff;
  122. }
  123. .table-body .el-button {
  124. padding: 0 !important;
  125. border: 0;
  126. margin: 0 5px;
  127. }
  128. .input-item {
  129. width: 250px;
  130. margin: 0 0 20px;
  131. display: inline-block;
  132. }
  133. /*.input-item .el-input__inner {*/
  134. /* border-right: 0;*/
  135. /*}*/
  136. .input-item .el-input__inner:hover {
  137. border: 1px solid #dcdfe6;
  138. /*border-right: 0;*/
  139. outline: 0;
  140. }
  141. .input-item .el-input__inner:focus {
  142. border: 1px solid #dcdfe6;
  143. /*border-right: 0;*/
  144. outline: 0;
  145. }
  146. .input-item .el-input-group__append {
  147. background-color: #fff;
  148. border-left: 0;
  149. width: 10%;
  150. padding: 0;
  151. }
  152. .input-item .el-input-group__append .el-button {
  153. padding: 0;
  154. }
  155. .input-item .el-input-group__append .el-button {
  156. margin: 0;
  157. }
  158. .batch {
  159. margin: 0 0 20px;
  160. display: inline-block;
  161. }
  162. .batch .el-button {
  163. padding: 9px 15px !important;
  164. }
  165. .el-table th>.cell{
  166. color: #333;
  167. font-weight: bold;
  168. font-size: 14px;
  169. }
  170. .el-table__footer-wrapper, .el-table__header-wrapper{
  171. border-bottom: 1.4px solid #D6D6D6;
  172. }
  173. .el-table th>.cell {
  174. color: #333;
  175. font-weight: bold;
  176. font-size: 14px;
  177. }
  178. .table1 .el-table__footer-wrapper,
  179. .table1 .el-table__header-wrapper {
  180. border-bottom: 1.4px solid #D6D6D6;
  181. }
  182. .user_img{
  183. position: relative;
  184. margin-right: 8px;
  185. /* height: 50px;
  186. width: 50px; */
  187. }
  188. .default-avatar{
  189. width: 50px;
  190. height: 50px;
  191. border-radius: 50%;
  192. margin-right: 8px;
  193. }
  194. .uer-nickname {
  195. flex: 1;
  196. }
  197. .container {
  198. display: grid;
  199. text-align: center;
  200. grid-template-columns: repeat(auto-fill, minmax(33.333%, 1fr));
  201. padding: 5px 0;
  202. background-color: #fff;
  203. margin-bottom: 10px;
  204. }
  205. .container .item {
  206. background-color: #E3EFFA;
  207. margin: 10px;
  208. padding: 20px 0;
  209. border-radius: 3px;
  210. }
  211. .container .item .num {
  212. font-size: 22px;
  213. font-weight: bold;
  214. margin-bottom: 10px;
  215. }
  216. .container .item .title {
  217. font-size: 16px;
  218. font-weight: bold;
  219. }
  220. </style>