index.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-dialog-select');
  4. ComponentHelper::loadComponentView('com-export-dialog');
  5. ?>
  6. <div id="app" v-cloak>
  7. <el-card shadow="never" style="border:0;min-width: 1200px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  8. <div slot="header">
  9. <span>奖励明细</span>
  10. <el-form size="small" :inline="true" :model="search" style="float: right;margin-top: -5px;">
  11. <el-form-item>
  12. <com-export-dialog :field_list='exportList' :action_url="export_url" :params="search" @selected="confirmSubmit">
  13. </com-export-dialog>
  14. </el-form-item>
  15. </el-form>
  16. </div>
  17. <div class="table-body">
  18. <p style="padding-bottom: 20px; color: red"><strong>小店订单数据会有1-10分钟延迟,已下单奖励请耐心等待哦</strong></p>
  19. <el-form size="small" :inline="true" flex="dir:left cross:center">
  20. <!-- <div class="item-box">-->
  21. <!-- <el-select v-model="search.audit_status" placeholder="请选择审核状态搜索" clearable size="small">-->
  22. <!-- <el-option v-for="(name, index) in status_map" :key="index" :label="name" :value="index"></el-option>-->
  23. <!-- </el-select>-->
  24. <!-- </div>-->
  25. <div class="item-box">
  26. <el-input clearable size="small" style="width: 200px" v-model="search.user_id" placeholder="请输入分销员ID"></el-input>
  27. </div>
  28. <div class="item-box">
  29. <el-input clearable size="small" style="width: 200px" v-model="search.mobile" placeholder="请输入分销员手机号/昵称"></el-input>
  30. </div>
  31. <div class="item-box">
  32. <el-select v-model="search.settle_status" placeholder="结算状态" clearable size="small">
  33. <el-option label="待结算" value="1"></el-option>
  34. <el-option label="已结算" value="100"></el-option>
  35. </el-select>
  36. </div>
  37. <div class="item-box">
  38. <el-date-picker style="margin-top: 1px;" size="small" @change="changeTime" v-model="datetime" type="datetimerange"
  39. value-format="yyyy-MM-dd HH:mm:ss" range-separator="至"
  40. start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']"></el-date-picker>
  41. </div>
  42. <div class="item-box" flex="dir:left cross:center">
  43. <el-button size="small" type="primary" style="padding: 9px 15px !important;" @click="searchs">搜索</el-button>
  44. </div>
  45. </el-form>
  46. <el-tabs v-model="activeName" @tab-click="handleClick" v-="loading">
  47. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" @selection-change="handleSelectionChange">
  48. <el-table-column label="分销员ID" prop="user_id" align="center"></el-table-column>
  49. <el-table-column label="分销员信息" align="left">
  50. <template slot-scope="scope">
  51. <div class="table-info-img-text">
  52. <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
  53. <div slot="error" class="image-slot">
  54. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  55. </div>
  56. </el-image>
  57. <div class="table-info-text">
  58. <div style="color:#000; text-align: left">{{scope.row.user.nickname}}</div>
  59. <div style="font-size: 12px; text-align: left">{{scope.row.user.mobile}}</div>
  60. </div>
  61. </div>
  62. </template>
  63. </el-table-column>
  64. <el-table-column label="客户ID" prop="buy_user_id" align="center"></el-table-column>
  65. <el-table-column label="客户信息" align="left">
  66. <template slot-scope="scope">
  67. <div class="table-info-img-text">
  68. <el-image class="table-info-img circle" :src="scope.row.buyUser.avatar_url">
  69. <div slot="error" class="image-slot">
  70. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  71. </div>
  72. </el-image>
  73. <div class="table-info-text">
  74. <div style="color:#000; text-align: left">{{scope.row.buyUser.nickname}}</div>
  75. <div style="font-size: 12px; text-align: left">{{scope.row.buyUser.mobile}}</div>
  76. </div>
  77. </div>
  78. </template>
  79. </el-table-column>
  80. <el-table-column prop="order_no" label="订单编号" align="center"></el-table-column>
  81. <el-table-column prop="order_amount" label="成交金额" align="center"></el-table-column>
  82. <el-table-column label="收益类型" align="center">
  83. <template slot-scope="scope">
  84. <el-tag size="mini" :type="scope.row.commission_type == 1 ? 'success' : 'danger'">
  85. {{scope.row.commission_type == 1 ? '佣金结算' : '积分结算'}}
  86. </el-tag>
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="收益说明" prop="remark" align="left"></el-table-column>
  90. <el-table-column label="结算状态" align="center">
  91. <template slot-scope="scope">
  92. <el-tag size="mini" :type="scope.row.settle_status == 1 ? 'danger' : 'success'">
  93. {{scope.row.settle_status == 1 ? '待自动结算' : '已自动结算'}}
  94. </el-tag>
  95. </template>
  96. </el-table-column>
  97. <el-table-column label="收益" align="left">
  98. <template slot-scope="scope">
  99. <div>
  100. {{scope.row.commission | parseAmount}} {{scope.row.commission_type == 1 ? '元' : '积分'}}
  101. </div>
  102. </template>
  103. </el-table-column>
  104. <el-table-column label="更新时间" width="160" align="center">
  105. <template slot-scope="scope">
  106. <div>{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  107. </template>
  108. </el-table-column>
  109. </el-table>
  110. </el-tabs>
  111. <!-- 分页器 -->
  112. <div flex="box:last cross:center">
  113. <div></div>
  114. <div>
  115. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize" style="display: inline-block;" background @current-change="pageChange" layout="prev, pager, next" :total="pagination.totalCount">
  116. </el-pagination>
  117. </div>
  118. </div>
  119. </div>
  120. <!-- 这个是复制用的容器,已隐藏 -->
  121. <textarea id="inputs" style="opacity: 0;width: 0;height: 0;">这是幕后黑手</textarea>
  122. </el-card>
  123. </div>
  124. <script>
  125. const app = new Vue({
  126. el: '#app',
  127. data: {
  128. page: 1,
  129. time: [], //本地存时间,请求时不发送
  130. search: {
  131. keyword: '',
  132. settle_status: '',
  133. member: '',
  134. mobile: '',
  135. date_start: '',
  136. date_end: '',
  137. },
  138. loading: false,
  139. activeName: '-1',
  140. list: [], //列表数据
  141. pagination: null,
  142. status_map: {
  143. 0: '全部',
  144. 2: '审核拒绝',
  145. 3: '审核通过'
  146. },
  147. wxList: [],
  148. goodsDialogVisible: false,
  149. goodsForm: {
  150. cats: [],
  151. goods_id: 0,
  152. attr: [],
  153. sale_attr: [],
  154. seven_day_return: 0,
  155. qualifications: [],
  156. cat_id: 0
  157. },
  158. exportList: {},
  159. btnLoading: false,
  160. rules: {},
  161. good: null,
  162. catInfo: null,
  163. catInfoLoading: false,
  164. catLoading: false,
  165. datetime: [],
  166. export_url: 'wechat-video-shop/commission/index', // 导出路径
  167. },
  168. mounted() {
  169. // 获取列表首页数据
  170. this.loadData(this.page, this.search); //获取列表数据
  171. },
  172. methods: {
  173. changeTime(e) {
  174. // console.log(e)
  175. this.search.date_start = e[0]
  176. this.search.date_end = e[1]
  177. },
  178. // 1.0 获取视频列表
  179. loadData(page, others) {
  180. this.loading = true;
  181. request({
  182. method: 'get',
  183. params: {
  184. r: 'wechat-video-shop/commission/index',
  185. page: page,
  186. limit: 10,
  187. ...others, //其他搜索字段
  188. },
  189. }).then(e => {
  190. this.loading = false;
  191. if (e.data.code === 0) {
  192. this.list = e.data.data.list;
  193. this.exportList = e.data.data.export_list;
  194. this.pagination = e.data.data.pagination;
  195. } else {
  196. this.$message.error(e.data.msg);
  197. }
  198. }).catch(e => {});
  199. },
  200. pageChange(page) {
  201. this.page = page;
  202. this.loadData(this.page, this.search);
  203. },
  204. handleClick(tab, event) {
  205. this.page = 1;
  206. this.search.status = this.activeName;
  207. this.loadData(this.page, this.search)
  208. },
  209. handleSelectionChange(val) {
  210. let self = this;
  211. self.choose_list = [];
  212. val.forEach(function(item) {
  213. self.choose_list.push(item.id);
  214. })
  215. },
  216. searchs() {
  217. this.page = 1;
  218. this.loadData(this.page, this.search);
  219. },
  220. confirmSubmit() {
  221. console.log(this.activeName)
  222. this.search.status = this.activeName
  223. },
  224. },
  225. });
  226. </script>
  227. <style>
  228. .set-el-button {
  229. padding: 0 !important;
  230. border: 0;
  231. margin: 0 5px;
  232. }
  233. .sort-input {
  234. width: 100%;
  235. background-color: #F3F5F6;
  236. height: 32px;
  237. }
  238. .sort-input span {
  239. height: 32px;
  240. width: 100%;
  241. line-height: 32px;
  242. display: inline-block;
  243. padding: 0 10px;
  244. font-size: 13px;
  245. }
  246. .sort-input .el-input__inner {
  247. height: 32px;
  248. line-height: 32px;
  249. background-color: #F3F5F6;
  250. float: left;
  251. padding: 0 10px;
  252. border: 0;
  253. }
  254. .table-body {
  255. padding: 20px;
  256. background-color: #fff;
  257. }
  258. .table-info .el-button {
  259. padding: 0 !important;
  260. border: 0;
  261. margin: 0 5px;
  262. }
  263. .input-item {
  264. margin: 0 0 20px;
  265. }
  266. .input-item-name {
  267. margin-right: 5px;
  268. }
  269. .input-search {
  270. margin-right: 30px;
  271. }
  272. .input-item .el-input-group__append {
  273. background-color: #fff;
  274. border-left: 0;
  275. width: 10%;
  276. padding: 0;
  277. }
  278. .input-item .el-input-group__append .el-button {
  279. padding: 0;
  280. }
  281. .input-item .el-input-group__append .el-button {
  282. margin: 0;
  283. }
  284. .data-pop-info {
  285. /* padding: 18px 15px 30px; */
  286. color: #333;
  287. }
  288. .data-pop-mode {
  289. background: #F8F8F8;
  290. border-radius: 4px;
  291. margin-bottom: 10px;
  292. }
  293. .data-pop-top {
  294. height: 90px;
  295. }
  296. .data-price {
  297. width: 200px;
  298. flex-direction: column;
  299. border-right: 1px solid #E5E5E5;
  300. }
  301. .data-info {
  302. flex: 1;
  303. padding: 22px 15px;
  304. font-size: 16px;
  305. }
  306. .data-info-name {
  307. display: inline-block;
  308. text-align: end;
  309. }
  310. .data-pop-detail {
  311. padding: 15px 18px;
  312. }
  313. .data-detail-mode {
  314. min-width: 33%;
  315. flex-shrink: 0;
  316. text-align: center;
  317. margin-top: 16px;
  318. line-height: 26px;
  319. font-size: 16px;
  320. }
  321. .share-pop-model {
  322. margin-top: 20px;
  323. }
  324. .share-name {
  325. width: 90px;
  326. display: inline-block;
  327. margin-right: 18px;
  328. text-align: end;
  329. }
  330. .flex-y-center {
  331. display: -webkit-box;
  332. display: -webkit-flex;
  333. display: flex;
  334. -webkit-box-align: center;
  335. -webkit-align-items: center;
  336. -ms-flex-align: center;
  337. -ms-grid-row-align: center;
  338. align-items: center;
  339. }
  340. </style>
  341. <style>
  342. .el-tabs__header {
  343. font-size: 16px;
  344. }
  345. .table-body {
  346. padding: 20px;
  347. background-color: #fff;
  348. }
  349. .table-body .el-button {
  350. padding: 0 !important;
  351. border: 0;
  352. margin: 0 5px;
  353. }
  354. .input-item {
  355. width: 250px;
  356. margin: 0 0 20px;
  357. display: inline-block;
  358. }
  359. .input-item .el-input__inner {
  360. border-right: 0;
  361. }
  362. .input-item .el-input__inner:hover {
  363. border: 1px solid #dcdfe6;
  364. border-right: 0;
  365. outline: 0;
  366. }
  367. .input-item .el-input__inner:focus {
  368. border: 1px solid #dcdfe6;
  369. border-right: 0;
  370. outline: 0;
  371. }
  372. .input-item .el-input-group__append {
  373. background-color: #fff;
  374. border-left: 0;
  375. width: 10%;
  376. padding: 0;
  377. }
  378. .input-item .el-input-group__append .el-button {
  379. padding: 0;
  380. }
  381. .input-item .el-input-group__append .el-button {
  382. margin: 0;
  383. }
  384. .batch {
  385. margin: 0 0 20px;
  386. display: inline-block;
  387. }
  388. .batch .el-button {
  389. padding: 9px 15px !important;
  390. }
  391. .item-box {
  392. margin-right: 20px;
  393. }
  394. .item-box .label {
  395. margin-right: 8px;
  396. }
  397. .item-box .symbol {
  398. margin: 0 6px;
  399. }
  400. .form-nickname {
  401. width: 180px;
  402. white-space: nowrap;
  403. overflow: hidden;
  404. text-overflow: ellipsis;
  405. }
  406. .index-video-url {
  407. width: 300px;
  408. }
  409. .index-video-url video {
  410. width: 100%;
  411. }
  412. .index-related-info {
  413. width: 500px;
  414. }
  415. .video-top {
  416. width: 100%;
  417. display: flex;
  418. align-items: flex-start;
  419. box-sizing: border-box;
  420. padding: 20px;
  421. /* opacity: .5; */
  422. background-color: #FFFFFF;
  423. }
  424. .video-top .top-right {
  425. line-height: 26px;
  426. }
  427. .video-top .top-right .top-title {
  428. font-size: 18px;
  429. white-space: nowrap;
  430. overflow: hidden;
  431. text-overflow: ellipsis;
  432. width: 360px;
  433. }
  434. .video-top .top-right .wrapper {
  435. display: flex;
  436. /* align-items: flex-start; */
  437. }
  438. .video-top .top-right .wrapper .to-copy {
  439. /* color: #03C5FF; */
  440. margin-left: 20px;
  441. }
  442. .video-top .top-right .detail-price {
  443. color: #BC0100;
  444. font-size: 18px;
  445. font-family: Microsoft YaHei;
  446. font-weight: bold;
  447. }
  448. /* .atooltip {
  449. background: #FFFFFF !important;
  450. border: none !important;
  451. } */
  452. .el-table th>.cell {
  453. color: #333;
  454. font-weight: bold;
  455. font-size: 14px;
  456. }
  457. .el-table__footer-wrapper,
  458. .el-table__header-wrapper {
  459. border-bottom: 1.4px solid #D6D6D6;
  460. }
  461. .price_col {
  462. color: #FF5D05;
  463. }
  464. </style>