index.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. <?php
  2. ?>
  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. <el-row :gutter="10" style="margin-bottom: 10px;">
  9. <el-col :span="8">
  10. <el-card shadow="never">
  11. <template #header>
  12. <strong>
  13. 提成总金额
  14. </strong>
  15. </template>
  16. <template>
  17. <div>
  18. <strong class="text-danger" style="font-size: 32px">{{total_commission|amount}}</strong>
  19. <span class="text-info" style="font-size: 12px; margin-left: 5px">元</span>
  20. </div>
  21. </template>
  22. </el-card>
  23. </el-col>
  24. <el-col :span="8">
  25. <el-card shadow="never">
  26. <template #header>
  27. <strong>
  28. 今日笔数
  29. </strong>
  30. </template>
  31. <template>
  32. <div>
  33. <strong class="text-danger" style="font-size: 32px">{{today_count}}</strong>
  34. <span class="text-info" style="font-size: 12px; margin-left: 5px">笔</span>
  35. </div>
  36. </template>
  37. </el-card>
  38. </el-col>
  39. <el-col :span="8">
  40. <el-card shadow="never">
  41. <template #header>
  42. <strong>
  43. 今日金额
  44. </strong>
  45. </template>
  46. <template>
  47. <div>
  48. <strong class="text-danger" style="font-size: 32px">{{today_commission|amount}}</strong>
  49. <span class="text-info" style="font-size: 12px; margin-left: 5px">元</span>
  50. </div>
  51. </template>
  52. </el-card>
  53. </el-col>
  54. </el-row>
  55. <div class="table-body">
  56. <div style="padding-bottom: 20px;">
  57. <div class="flex">
  58. <div class="flex" style="margin-right: 20px;">
  59. <el-input size="small" placeholder="请输入团长会员ID" v-model="searchData.user_id">
  60. </el-input>
  61. </div>
  62. <div class="flex" style="margin-right: 20px;">
  63. <el-input size="small" placeholder="团长昵称/手机号" v-model="searchData.member">
  64. </el-input>
  65. </div>
  66. <div class="flex" style="margin-right: 20px;">
  67. <el-input size="small" placeholder="自提点名称" v-model="searchData.name">
  68. </el-input>
  69. </div>
  70. <div class="flex" style="margin-right: 20px;">
  71. <span class="demonstration">更新时间</span>
  72. <el-date-picker style="margin-top: 1px;" @change="changeTime" v-model="datetime" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']"></el-date-picker>
  73. </div>
  74. <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
  75. <el-button type="warning" @click="clereSearch" v-if="searchData.user_id || searchData.name ||
  76. searchData.member" style="font-size:12px;padding: 9px 15px !important;">清除搜索条件</el-button>
  77. </div>
  78. </div>
  79. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  80. <el-table-column prop="id" label="序号" width="100" align="center"></el-table-column>
  81. <el-table-column label="团长昵称" width="200" prop="user_id" align="center">
  82. <template slot-scope="scope">
  83. <div class="table-info-img-text">
  84. <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
  85. <div slot="error" class="image-slot">
  86. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  87. </div>
  88. </el-image>
  89. <div class="table-info-text">
  90. <div style="color:#000; text-align: left">{{scope.row.user.nickname}}</div>
  91. <div style="font-size: 12px; text-align: left">ID:{{scope.row.user.id}}</div>
  92. </div>
  93. </div>
  94. </template>
  95. </el-table-column>
  96. <el-table-column label="手机号" width="160" prop="mobile" align="center">
  97. <template slot-scope="scope">
  98. <div>{{scope.row.head.mobile}}</div>
  99. </template>
  100. </el-table-column>
  101. <el-table-column label="自提点名称" prop="name" align="center">
  102. <template slot-scope="scope">
  103. <div>{{scope.row.head.name}}</div>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="自提点logo" prop="license_img" align="center">
  107. <template slot-scope="scope">
  108. <com-image mode="aspectFill" :width="'auto'" :src="scope.row.head.logo"></com-image>
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="奖励" prop="status" width="200" align="center">
  112. <template slot-scope="scope">
  113. <div>
  114. <strong style="font-size: 18px">{{scope.row.commission|amount}}</strong>{{reward_map[scope.row.reward_type]}}
  115. </div>
  116. </template>
  117. </el-table-column>
  118. <el-table-column label="提成说明" prop="intro" align="center"></el-table-column>
  119. <el-table-column label="更新时间" prop="updated_at" align="center">
  120. <template slot-scope="scope">
  121. <div>
  122. {{scope.row.updated_at | dateTimeFormat('Y-m-d H:i:s')}}
  123. </div>
  124. </template>
  125. </el-table-column>
  126. </el-table>
  127. <div style="text-align: right;margin: 20px 0;">
  128. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  129. </div>
  130. </div>
  131. </el-card>
  132. </div>
  133. <script>
  134. const app = new Vue({
  135. el: '#app',
  136. data: {
  137. searchData: {
  138. user_id: '',
  139. member: '',
  140. name: '',
  141. start: null,
  142. end: null,
  143. limit: 10
  144. },
  145. currPage: 1,
  146. pageCount: 0,
  147. loading: false,
  148. dialogVisible: false,
  149. list: [],
  150. dialogLoading: false,
  151. addTime: '', //注册时间
  152. storeStatus: {
  153. 1: '正常',
  154. 2: '禁用'
  155. },
  156. total_commission: 0,
  157. today_count: 0,
  158. today_commission: 0,
  159. reward_map: {},
  160. datetime: [],
  161. },
  162. mounted() {
  163. this.loadData();
  164. },
  165. methods: {
  166. searchs() {
  167. this.currPage = 1;
  168. this.loadData();
  169. },
  170. addTimeChange(v) {
  171. this.searchData.date_start = v ? v[0] : '';
  172. this.searchData.date_end = v ? v[1] : '';
  173. },
  174. clereSearch() {
  175. this.searchData.member = '';
  176. this.searchData.user_id = '';
  177. this.searchData.name = '';
  178. this.searchData.start = '';
  179. this.searchData.end = '';
  180. this.currPage = 1;
  181. this.loadData();
  182. },
  183. loadData() {
  184. this.loading = true;
  185. request({
  186. params: {
  187. r: 'community/commission/index',
  188. page: this.currPage,
  189. ...this.searchData,
  190. },
  191. method: 'get',
  192. }).then(e => {
  193. this.loading = false;
  194. if (e.data.code == 0) {
  195. this.list = e.data.data.list;
  196. this.total_commission = e.data.data.commission
  197. this.today_count = e.data.data.today_count
  198. this.today_commission = e.data.data.today_commission
  199. this.pageCount = e.data.data.page_count;
  200. this.reward_map = e.data.data.reward_map
  201. } else {
  202. this.$message.error(e.data.msg);
  203. }
  204. }).catch(e => {
  205. this.loading = false;
  206. });
  207. },
  208. pagination(currentPage) {
  209. let self = this;
  210. self.currPage = currentPage;
  211. self.loadData();
  212. },
  213. changeTime(e) {
  214. if (e === null) {
  215. this.searchData.start = null
  216. this.searchData.end = null
  217. }else {
  218. this.searchData.start = e[0]
  219. this.searchData.end = e[1]
  220. }
  221. },
  222. },
  223. filters: {
  224. amount: function(val) {
  225. if (!val) {
  226. val = 0
  227. }
  228. return parseFloat(val / 100).toFixed(2)
  229. }
  230. }
  231. });
  232. </script>
  233. <style>
  234. .el-tabs__header {
  235. font-size: 16px;
  236. }
  237. .table-body {
  238. padding: 20px;
  239. background-color: #fff;
  240. }
  241. .input-item {
  242. width: 250px;
  243. margin-right: 40px;
  244. }
  245. .input-item .el-input__inner {
  246. border-right: 0;
  247. }
  248. .input-item .el-input__inner:hover {
  249. border: 1px solid #dcdfe6;
  250. border-right: 0;
  251. outline: 0;
  252. }
  253. .input-item .el-input__inner:focus {
  254. border: 1px solid #dcdfe6;
  255. border-right: 0;
  256. outline: 0;
  257. }
  258. .input-item .el-input-group__append {
  259. background-color: #fff;
  260. border-left: 0;
  261. width: 10%;
  262. padding: 0;
  263. }
  264. .input-item .el-input-group__append .el-button {
  265. padding: 0;
  266. }
  267. .input-item .el-input-group__append .el-button {
  268. margin: 0;
  269. }
  270. .table-body {
  271. padding: 20px;
  272. background-color: #fff;
  273. }
  274. .table-body .el-button {
  275. padding: 0 !important;
  276. border: 0;
  277. margin: 0 5px;
  278. }
  279. .input-item {
  280. width: 250px;
  281. margin: 0 0 20px;
  282. display: inline-block;
  283. }
  284. .input-item .el-input__inner {
  285. border-right: 0;
  286. }
  287. .input-item .el-input__inner:hover {
  288. border: 1px solid #dcdfe6;
  289. border-right: 0;
  290. outline: 0;
  291. }
  292. .input-item .el-input__inner:focus {
  293. border: 1px solid #dcdfe6;
  294. border-right: 0;
  295. outline: 0;
  296. }
  297. .input-item .el-input-group__append {
  298. background-color: #fff;
  299. border-left: 0;
  300. width: 10%;
  301. padding: 0;
  302. }
  303. .input-item .el-input-group__append .el-button {
  304. padding: 0;
  305. }
  306. .input-item .el-input-group__append .el-button {
  307. margin: 0;
  308. }
  309. .batch {
  310. margin: 0 0 20px;
  311. display: inline-block;
  312. }
  313. .batch .el-button {
  314. padding: 9px 15px !important;
  315. }
  316. .el-table th>.cell {
  317. color: #333;
  318. font-weight: bold;
  319. font-size: 14px;
  320. }
  321. .el-table__footer-wrapper,
  322. .el-table__header-wrapper {
  323. border-bottom: 1.4px solid #D6D6D6;
  324. }
  325. .el-table .el-button {
  326. padding: 0 !important;
  327. border: 0;
  328. margin: 0 5px;
  329. }
  330. #app .copy .el-input-group__append {
  331. background-color: #409EFF;
  332. border-color: #409EFF;
  333. padding: 0 10px;
  334. }
  335. #app .table-body .copybtn {
  336. color: #fff;
  337. padding: 0 30px;
  338. }
  339. .el-alert {
  340. padding: 0;
  341. padding-left: 5px;
  342. padding-bottom: 5px;
  343. }
  344. .el-alert--info .el-alert__description {
  345. color: #606266;
  346. }
  347. .el-alert .el-button {
  348. margin-left: 20px;
  349. }
  350. .el-alert__content {
  351. display: flex;
  352. align-items: center;
  353. }
  354. .table-body .el-alert__title {
  355. margin-top: 5px;
  356. font-weight: 400;
  357. }
  358. .el-table th>.cell {
  359. color: #333;
  360. font-weight: bold;
  361. font-size: 14px;
  362. }
  363. .el-table__footer-wrapper,
  364. .el-table__header-wrapper {
  365. border-bottom: 1.4px solid #D6D6D6;
  366. }
  367. .item-box {
  368. margin-right: 20px;
  369. }
  370. .flex {
  371. display: flex;
  372. align-items: center;
  373. }
  374. .input-title {
  375. margin-right: 15px;
  376. }
  377. .item-box .label {
  378. margin-right: 8px;
  379. }
  380. .com-share-pop {
  381. display: inline-block;
  382. }
  383. .grid-icon {
  384. color: #999;
  385. cursor: pointer;
  386. font-size: 18px;
  387. }
  388. .el-input__inner {
  389. height: 32px;
  390. line-height: 32px;
  391. }
  392. .el-range-editor.el-input__inner {
  393. padding: 0 15px;
  394. }
  395. .el-date-editor .el-range-input,
  396. .el-date-editor .el-range-separator {
  397. font-size: 13px;
  398. height: auto;
  399. }
  400. </style>