store-service-ratio-log.php 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-share-pop');
  4. ?>
  5. <div id="app" v-cloak>
  6. <el-card shadow="never" style="border:0;min-width: 1000px;"
  7. body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  8. <div slot="header">
  9. <span>服务费变动记录</span>
  10. </div>
  11. <div class="table-body">
  12. <div style="padding-bottom: 20px;">
  13. <div class="flex">
  14. <div class="flex" style="margin-right: 20px;">
  15. <div class="input-title" style="flex-shrink: 0;">门店</div>
  16. <el-input size="small" style="width: 200px;" placeholder="请输入门店名称名称/手机号"
  17. v-model="searchData.keyword"></el-input>
  18. </div>
  19. <div class="item-box" flex="dir:left cross:center" style="margin-right: 40px">
  20. <div class="label">创建时间</div>
  21. <el-date-picker
  22. v-model="time"
  23. type="datetimerange"
  24. value-format="yyyy-MM-dd HH:mm:ss"
  25. range-separator="至"
  26. start-placeholder="开始日期"
  27. end-placeholder="结束日期"
  28. @change="addTimeChange"
  29. :default-time="['00:00:00', '23:59:59']"
  30. >
  31. </el-date-picker>
  32. </div>
  33. <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索
  34. </el-button>
  35. <el-button type="warning" @click="clereSearch"
  36. v-if="searchData.keyword || searchData.start_time || searchData.end_time"
  37. style="padding: 9px 15px !important;">清除搜索条件
  38. </el-button>
  39. </div>
  40. </div>
  41. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  42. <!-- <el-table-column prop="id" label="门店ID" align="center"></el-table-column>-->
  43. <el-table-column label="门店" width="200" prop="store_name" align="center">
  44. <template slot-scope="scope">
  45. <com-image style="float: left;margin-right: 10px;" mode="aspectFill"
  46. :src="scope.row.store.logo_img"></com-image>
  47. <div>{{scope.row.store.store_name}}</div>
  48. <div>{{scope.row.store.shop_mobile}}</div>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="修改之前比例" prop="category" align="center">
  52. <template slot-scope="scope">
  53. <div>{{scope.row.before_store_service_ratio}}</div>
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="修改之后比例" prop="category" align="center">
  57. <template slot-scope="scope">
  58. <div>{{scope.row.after_store_service_ratio}}</div>
  59. </template>
  60. </el-table-column>
  61. <el-table-column prop="scope" width="160" label="时间">
  62. <template slot-scope="scope">
  63. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  64. </template>
  65. </el-table-column>
  66. </el-table>
  67. <div style="text-align: right;margin: 20px 0;">
  68. <el-pagination @current-change="pagination" background layout="prev, pager, next"
  69. :page-count="pageCount"></el-pagination>
  70. </div>
  71. </div>
  72. </el-card>
  73. </div>
  74. <script>
  75. const app = new Vue({
  76. el: '#app',
  77. data: {
  78. searchData: {
  79. keyword: null,
  80. start_time: "",
  81. end_time: "",
  82. },
  83. //本地存时间,请求时不发送
  84. time: [],
  85. currPage: 1,
  86. pageCount: 0,
  87. loading: false,
  88. list: [],
  89. // exportList: [],
  90. categorys: [],
  91. },
  92. mounted() {
  93. this.loadData();
  94. },
  95. methods: {
  96. searchs() {
  97. this.currPage = 1;
  98. this.loadData();
  99. },
  100. clereSearch() {
  101. this.searchData.keyword = null;
  102. this.searchData.start_time = '';
  103. this.searchData.end_time = '';
  104. this.currPage = 1;
  105. this.loadData();
  106. },
  107. loadData() {
  108. this.loading = true;
  109. request({
  110. params: {
  111. r: 'store/store-setting/store-service-ratio-log',
  112. page: this.currPage,
  113. ...this.searchData,
  114. },
  115. method: 'get',
  116. }).then(e => {
  117. this.loading = false;
  118. if (e.data.code == 0) {
  119. this.list = e.data.data.list;
  120. this.pageCount = e.data.data.page_count;
  121. this.categorys = e.data.data.cate_list;
  122. } else {
  123. this.$message.error(e.data.msg);
  124. }
  125. }).catch(e => {
  126. this.loading = false;
  127. });
  128. },
  129. pagination(currentPage) {
  130. let self = this;
  131. self.currPage = currentPage;
  132. self.loadData();
  133. },
  134. // 跳转门店详情页
  135. goToDetail(id) {
  136. navigateTo({
  137. r: 'store/store-statistics/income-log',
  138. store_id: id,
  139. });
  140. },
  141. addTimeChange(v) {
  142. this.searchData.start_time = v ? v[0] : '';
  143. this.searchData.end_time = v ? v[1] : '';
  144. },
  145. }
  146. });
  147. </script>
  148. <style>
  149. .el-tabs__header {
  150. font-size: 16px;
  151. }
  152. .table-body {
  153. padding: 20px;
  154. background-color: #fff;
  155. }
  156. .input-item {
  157. width: 250px;
  158. margin-right: 40px;
  159. }
  160. .input-item .el-input__inner {
  161. border-right: 0;
  162. }
  163. .input-item .el-input__inner:hover {
  164. border: 1px solid #dcdfe6;
  165. border-right: 0;
  166. outline: 0;
  167. }
  168. .input-item .el-input__inner:focus {
  169. border: 1px solid #dcdfe6;
  170. border-right: 0;
  171. outline: 0;
  172. }
  173. .input-item .el-input-group__append {
  174. background-color: #fff;
  175. border-left: 0;
  176. width: 10%;
  177. padding: 0;
  178. }
  179. .input-item .el-input-group__append .el-button {
  180. padding: 0;
  181. }
  182. .input-item .el-input-group__append .el-button {
  183. margin: 0;
  184. }
  185. .table-body {
  186. padding: 20px;
  187. background-color: #fff;
  188. }
  189. .table-body .el-button {
  190. padding: 0 !important;
  191. border: 0;
  192. margin: 0 5px;
  193. }
  194. .input-item {
  195. width: 250px;
  196. margin: 0 0 20px;
  197. display: inline-block;
  198. }
  199. .input-item .el-input__inner {
  200. border-right: 0;
  201. }
  202. .input-item .el-input__inner:hover {
  203. border: 1px solid #dcdfe6;
  204. border-right: 0;
  205. outline: 0;
  206. }
  207. .input-item .el-input__inner:focus {
  208. border: 1px solid #dcdfe6;
  209. border-right: 0;
  210. outline: 0;
  211. }
  212. .input-item .el-input-group__append {
  213. background-color: #fff;
  214. border-left: 0;
  215. width: 10%;
  216. padding: 0;
  217. }
  218. .input-item .el-input-group__append .el-button {
  219. padding: 0;
  220. }
  221. .input-item .el-input-group__append .el-button {
  222. margin: 0;
  223. }
  224. .batch {
  225. margin: 0 0 20px;
  226. display: inline-block;
  227. }
  228. .batch .el-button {
  229. padding: 9px 15px !important;
  230. }
  231. .el-table th > .cell {
  232. color: #333;
  233. font-weight: bold;
  234. font-size: 14px;
  235. }
  236. .el-table__footer-wrapper,
  237. .el-table__header-wrapper {
  238. border-bottom: 1.4px solid #D6D6D6;
  239. }
  240. .el-table .el-button {
  241. padding: 0 !important;
  242. border: 0;
  243. margin: 0 5px;
  244. }
  245. #app .copy .el-input-group__append {
  246. background-color: #409EFF;
  247. border-color: #409EFF;
  248. padding: 0 10px;
  249. }
  250. #app .table-body .copybtn {
  251. color: #fff;
  252. padding: 0 30px;
  253. }
  254. .el-alert {
  255. padding: 0;
  256. padding-left: 5px;
  257. padding-bottom: 5px;
  258. }
  259. .el-alert--info .el-alert__description {
  260. color: #606266;
  261. }
  262. .el-alert .el-button {
  263. margin-left: 20px;
  264. }
  265. .el-alert__content {
  266. display: flex;
  267. align-items: center;
  268. }
  269. .table-body .el-alert__title {
  270. margin-top: 5px;
  271. font-weight: 400;
  272. }
  273. .el-table th > .cell {
  274. color: #333;
  275. font-weight: bold;
  276. font-size: 14px;
  277. }
  278. .el-table__footer-wrapper,
  279. .el-table__header-wrapper {
  280. border-bottom: 1.4px solid #D6D6D6;
  281. }
  282. .item-box {
  283. margin-right: 20px;
  284. }
  285. .flex {
  286. display: flex;
  287. align-items: center;
  288. }
  289. .input-title {
  290. margin-right: 15px;
  291. }
  292. .item-box .label {
  293. margin-right: 8px;
  294. }
  295. .com-share-pop {
  296. display: inline-block;
  297. }
  298. .grid-icon {
  299. color: #999;
  300. cursor: pointer;
  301. font-size: 18px;
  302. }
  303. </style>