index.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  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;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  7. <div slot="header">
  8. <span>资产统计</span>
  9. </div>
  10. <div class="table-body">
  11. <div style="padding-bottom: 20px;">
  12. <div class="flex">
  13. <div class="flex" style="margin-right: 20px;">
  14. <div class="input-title" style="flex-shrink: 0;">门店名称</div>
  15. <el-input size="small" style="width: 130px;" placeholder="请输入门店名称" v-model="searchData.store_name"> </el-input>
  16. </div>
  17. <div class="flex" style="margin-right: 20px;">
  18. <div class="input-title" style="flex-shrink: 0;">店长</div>
  19. <el-input size="small" style="width: 130px;" placeholder="请输入店长姓名" v-model="searchData.storeowner">
  20. </el-input>
  21. </div>
  22. <div class="flex" style="margin-right: 20px;">
  23. <div class="input-title" style="flex-shrink: 0;">绑定会员</div>
  24. <el-input size="small" style="width: 130px;" placeholder="请输入会员名称" v-model="searchData.nickname">
  25. </el-input>
  26. </div>
  27. <div class="item-box" flex="dir:left cross:center">
  28. <div class="label">门店分类</div>
  29. <el-select v-model="searchData.cate_id" @change='searchs' class="select" size="small" style="width: 130px;">
  30. <el-option :key="0" label="所有分类" :value="0"></el-option>
  31. <el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in categorys"></el-option>
  32. </el-select>
  33. </div>
  34. <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
  35. <el-button type="warning" @click="clereSearch" v-if="searchData.store_name || searchData.storeowner || searchData.nickname || searchData.cate_id" style="padding: 9px 15px !important;">清除搜索条件</el-button>
  36. </div>
  37. </div>
  38. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  39. <el-table-column prop="id" label="门店ID" align="center"></el-table-column>
  40. <el-table-column label="门店名称" width="200" prop="store_name" align="center">
  41. <template slot-scope="scope">
  42. <com-image style="float: left;margin-right: 10px;" mode="aspectFill" :src="scope.row.logo_img"></com-image>
  43. <div>{{scope.row.store_name}}</div>
  44. <div>{{scope.row.shop_mobile}}</div>
  45. </template>
  46. </el-table-column>
  47. <el-table-column label="门店分类" prop="category" align="center">
  48. <template slot-scope="scope">
  49. <div>{{scope.row.category}}</div>
  50. </template>
  51. </el-table-column>
  52. <el-table-column label="用户" width="150" align="center">
  53. <template slot-scope="scope">
  54. <com-image style="float: left;margin-right: 5px;" mode="aspectFill" :src="scope.row.avatar_url"></com-image>
  55. <div>{{scope.row.nickname}}</div>
  56. </template>
  57. </el-table-column>
  58. <el-table-column label="店长姓名" prop="shop_owner" align="center">
  59. <template slot-scope="scope">
  60. <div>{{scope.row.shop_owner}}</div>
  61. </template>
  62. </el-table-column>
  63. <el-table-column label="订单总数" prop="total_num" align="center">
  64. <template slot-scope="scope">
  65. <div>{{scope.row.total_num}}</div>
  66. </template>
  67. </el-table-column>
  68. <el-table-column label="订单总金额" prop="total_order_money" align="center">
  69. <template slot-scope="scope">
  70. <div>{{scope.row.total_order_money}}</div>
  71. </template>
  72. </el-table-column>
  73. <el-table-column label="提成已结算总金额" prop="total_settled_amount" align="center">
  74. <template slot-scope="scope">
  75. <div>{{scope.row.total_settled_amount}}</div>
  76. </template>
  77. </el-table-column>
  78. <el-table-column label="提成未结算总金额" prop="unsettled_amount" align="center">
  79. <template slot-scope="scope">
  80. <div>{{scope.row.unsettled_amount}}</div>
  81. </template>
  82. </el-table-column>
  83. <el-table-column label="操作" fixed="right" align="center">
  84. <template slot-scope="scope">
  85. <el-button type="text" size="small" @click="goToDetail(scope.row.id)">详情</el-button>
  86. </template>
  87. </el-table-column>
  88. </el-table>
  89. <div style="text-align: right;margin: 20px 0;">
  90. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  91. </div>
  92. </div>
  93. </el-card>
  94. </div>
  95. <script>
  96. const app = new Vue({
  97. el: '#app',
  98. data: {
  99. searchData: {
  100. cate_id: 0,
  101. nickname: '',
  102. storeowner: '',
  103. store_name: '',
  104. },
  105. currPage: 1,
  106. pageCount: 0,
  107. loading: false,
  108. list: [],
  109. // exportList: [],
  110. categorys: [],
  111. },
  112. mounted() {
  113. this.loadData();
  114. },
  115. methods: {
  116. searchs() {
  117. this.currPage = 1;
  118. this.loadData();
  119. },
  120. clereSearch() {
  121. this.searchData.cate_id = 0;
  122. this.searchData.nickname = '';
  123. this.searchData.storeowner = '';
  124. this.searchData.store_name = '';
  125. this.currPage = 1;
  126. this.loadData();
  127. },
  128. loadData() {
  129. this.loading = true;
  130. request({
  131. params: {
  132. r: 'store/store/index',
  133. page: this.currPage,
  134. ...this.searchData,
  135. },
  136. method: 'get',
  137. }).then(e => {
  138. this.loading = false;
  139. if (e.data.code == 0) {
  140. this.list = e.data.data.list;
  141. this.pageCount = e.data.data.page_count;
  142. this.categorys = e.data.data.cate_list;
  143. } else {
  144. this.$message.error(e.data.msg);
  145. }
  146. }).catch(e => {
  147. this.loading = false;
  148. });
  149. },
  150. pagination(currentPage) {
  151. let self = this;
  152. self.currPage = currentPage;
  153. self.loadData();
  154. },
  155. // 跳转门店详情页
  156. goToDetail(id) {
  157. navigateTo({
  158. r: 'store/store-statistics/income-log',
  159. store_id: id,
  160. });
  161. },
  162. }
  163. });
  164. </script>
  165. <style>
  166. .el-tabs__header {
  167. font-size: 16px;
  168. }
  169. .table-body {
  170. padding: 20px;
  171. background-color: #fff;
  172. }
  173. .input-item {
  174. width: 250px;
  175. margin-right: 40px;
  176. }
  177. .input-item .el-input__inner {
  178. border-right: 0;
  179. }
  180. .input-item .el-input__inner:hover {
  181. border: 1px solid #dcdfe6;
  182. border-right: 0;
  183. outline: 0;
  184. }
  185. .input-item .el-input__inner:focus {
  186. border: 1px solid #dcdfe6;
  187. border-right: 0;
  188. outline: 0;
  189. }
  190. .input-item .el-input-group__append {
  191. background-color: #fff;
  192. border-left: 0;
  193. width: 10%;
  194. padding: 0;
  195. }
  196. .input-item .el-input-group__append .el-button {
  197. padding: 0;
  198. }
  199. .input-item .el-input-group__append .el-button {
  200. margin: 0;
  201. }
  202. .table-body {
  203. padding: 20px;
  204. background-color: #fff;
  205. }
  206. .table-body .el-button {
  207. padding: 0 !important;
  208. border: 0;
  209. margin: 0 5px;
  210. }
  211. .input-item {
  212. width: 250px;
  213. margin: 0 0 20px;
  214. display: inline-block;
  215. }
  216. .input-item .el-input__inner {
  217. border-right: 0;
  218. }
  219. .input-item .el-input__inner:hover {
  220. border: 1px solid #dcdfe6;
  221. border-right: 0;
  222. outline: 0;
  223. }
  224. .input-item .el-input__inner:focus {
  225. border: 1px solid #dcdfe6;
  226. border-right: 0;
  227. outline: 0;
  228. }
  229. .input-item .el-input-group__append {
  230. background-color: #fff;
  231. border-left: 0;
  232. width: 10%;
  233. padding: 0;
  234. }
  235. .input-item .el-input-group__append .el-button {
  236. padding: 0;
  237. }
  238. .input-item .el-input-group__append .el-button {
  239. margin: 0;
  240. }
  241. .batch {
  242. margin: 0 0 20px;
  243. display: inline-block;
  244. }
  245. .batch .el-button {
  246. padding: 9px 15px !important;
  247. }
  248. .el-table th>.cell {
  249. color: #333;
  250. font-weight: bold;
  251. font-size: 14px;
  252. }
  253. .el-table__footer-wrapper,
  254. .el-table__header-wrapper {
  255. border-bottom: 1.4px solid #D6D6D6;
  256. }
  257. .el-table .el-button {
  258. padding: 0 !important;
  259. border: 0;
  260. margin: 0 5px;
  261. }
  262. #app .copy .el-input-group__append {
  263. background-color: #409EFF;
  264. border-color: #409EFF;
  265. padding: 0 10px;
  266. }
  267. #app .table-body .copybtn {
  268. color: #fff;
  269. padding: 0 30px;
  270. }
  271. .el-alert {
  272. padding: 0;
  273. padding-left: 5px;
  274. padding-bottom: 5px;
  275. }
  276. .el-alert--info .el-alert__description {
  277. color: #606266;
  278. }
  279. .el-alert .el-button {
  280. margin-left: 20px;
  281. }
  282. .el-alert__content {
  283. display: flex;
  284. align-items: center;
  285. }
  286. .table-body .el-alert__title {
  287. margin-top: 5px;
  288. font-weight: 400;
  289. }
  290. .el-table th>.cell {
  291. color: #333;
  292. font-weight: bold;
  293. font-size: 14px;
  294. }
  295. .el-table__footer-wrapper,
  296. .el-table__header-wrapper {
  297. border-bottom: 1.4px solid #D6D6D6;
  298. }
  299. .item-box {
  300. margin-right: 20px;
  301. }
  302. .flex {
  303. display: flex;
  304. align-items: center;
  305. }
  306. .input-title {
  307. margin-right: 15px;
  308. }
  309. .item-box .label {
  310. margin-right: 8px;
  311. }
  312. .com-share-pop {
  313. display: inline-block;
  314. }
  315. .grid-icon {
  316. color: #999;
  317. cursor: pointer;
  318. font-size: 18px;
  319. }
  320. </style>