index.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <template>
  2. <view :style="viewColor">
  3. <view class='commission-details'>
  4. <view class='promoterHeader'>
  5. <timeSlot @changeTime="changeTime"></timeSlot>
  6. </view>
  7. <view class='sign-record' v-if="type==1">
  8. <block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
  9. <view class='list'>
  10. <view class='item'>
  11. <view class='listn'>
  12. <view class='itemn acea-row row-between-wrapper'>
  13. <view>
  14. <block v-if="item.status>=0">
  15. <view class='name line1' v-if="item.extract_type == 0">银行卡提现</view>
  16. <view class='name line1' v-if="item.extract_type == 1">微信提现</view>
  17. <view class='name line1' v-if="item.extract_type == 2">支付宝提现</view>
  18. <view class='name line1' v-if="item.extract_type == 3">提现到零钱</view>
  19. </block>
  20. <block v-else>
  21. <view class='name line1'>提现失败<text class="message">({{item.fail_msg}})</text></view>
  22. </block>
  23. <view>{{item.create_time}}</view>
  24. </view>
  25. <view class='nums' v-if="item.status>=0">-{{item.extract_price}}</view>
  26. <view class='nums p-color acea-row row-between-wrapper' v-else>
  27. <text v-if="item.status == 0" class="item-label">冻结中</text>
  28. +{{item.extract_price}}
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </block>
  35. <view v-if="recordList.length == 0">
  36. <emptyPage title='暂无提现记录~'></emptyPage>
  37. </view>
  38. </view>
  39. <view class='sign-record' v-if="type==2">
  40. <block v-for="(item,index) in recordList" :key="index" v-if="recordList.length>0">
  41. <view class='list'>
  42. <view class='item'>
  43. <view class='listn'>
  44. <view class='itemn acea-row row-between-wrapper'>
  45. <view>
  46. <view class='name line1'>{{item.title}}</view>
  47. <view>{{item.create_time}}</view>
  48. </view>
  49. <view class='nums' v-if="item.pm==0">-{{item.number}}</view>
  50. <view class='nums p-color acea-row row-between-wrapper'>
  51. <text v-if="item.status == 0" class="item-label">冻结中</text>
  52. +{{item.number}}
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </block>
  59. <view v-if="recordList.length == 0">
  60. <emptyPage title='暂无提现记录~'></emptyPage>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. // +----------------------------------------------------------------------
  68. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  69. // +----------------------------------------------------------------------
  70. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  71. // +----------------------------------------------------------------------
  72. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  73. // +----------------------------------------------------------------------
  74. // | Author: CRMEB Team <admin@crmeb.com>
  75. // +----------------------------------------------------------------------
  76. import {
  77. getSpreadInfo,
  78. extractLst,
  79. brokerage_list,
  80. spreadInfo
  81. } from '@/api/user.js';
  82. import { mapGetters } from "vuex";
  83. import emptyPage from '@/components/emptyPage.vue';
  84. import timeSlot from '@/components/timeSlot/index.vue';
  85. import { toLogin } from '@/libs/login.js';
  86. export default {
  87. components: {
  88. emptyPage,
  89. timeSlot
  90. },
  91. data() {
  92. return {
  93. name: '',
  94. type: 0,
  95. page: 1,
  96. limit: 12,
  97. recordList: [],
  98. recordType: 0,
  99. recordCount: 0,
  100. status: false,
  101. extractCount: 0,
  102. userInfo:'',
  103. times: [],
  104. start: "",
  105. stop: ""
  106. };
  107. },
  108. computed: mapGetters(['isLogin','viewColor']),
  109. onLoad(options) {
  110. if (this.isLogin) {
  111. this.type = options.type;
  112. } else {
  113. toLogin()
  114. }
  115. },
  116. onShow: function() {
  117. let type = this.type;
  118. if(type == 2){
  119. uni.setNavigationBarTitle({
  120. title: "佣金记录"
  121. });
  122. this.name = '佣金明细';
  123. this.recordType = 2;
  124. }
  125. if(type == 1){
  126. uni.setNavigationBarTitle({
  127. title: "提现记录"
  128. });
  129. this.name = '提现总额';
  130. this.recordType = 1;
  131. }
  132. this.spreadInfo();
  133. this.getRecordList();
  134. },
  135. methods: {
  136. spreadInfo(){
  137. spreadInfo().then(res => {
  138. this.userInfo = res.data
  139. });
  140. },
  141. changeTime(time) {
  142. this.start = time.start
  143. this.stop = time.stop
  144. this.searchSubmitValue()
  145. },
  146. searchSubmitValue(e) {
  147. this.page = 1;
  148. this.limit = 20;
  149. this.status = false;
  150. this.$set(this, 'recordList', []);
  151. this.$set(this, 'times', []);
  152. this.getRecordList()
  153. },
  154. getRecordList: function() {
  155. let that = this;
  156. let page = that.page;
  157. let limit = that.limit;
  158. let status = that.status;
  159. let recordType = that.recordType;
  160. let start = that.start;
  161. let stop = that.stop;
  162. let recordList = that.recordList;
  163. let recordListNew = [];
  164. if (status == true) return;
  165. if(this.type == 1){
  166. extractLst({
  167. page: page,
  168. limit: limit,
  169. start: start,
  170. stop: stop
  171. }, recordType).then(res => {
  172. let len = res.data.list.length;
  173. let recordListData = res.data.list;
  174. recordListNew = recordList.concat(recordListData);
  175. that.status = limit > len;
  176. that.page+=1;
  177. that.$set(that, 'recordList', recordListNew);
  178. });
  179. }
  180. if(this.type == 2){
  181. brokerage_list({
  182. page: page,
  183. limit: limit,
  184. start: start,
  185. stop: stop
  186. }).then(res => {
  187. let len = res.data.list.length;
  188. let recordListData = res.data.list;
  189. recordListNew = recordList.concat(recordListData);
  190. that.status = limit > len;
  191. that.page+=1;
  192. that.$set(that, 'recordList', recordListNew);
  193. });
  194. }
  195. },
  196. getRecordListCount: function() {
  197. let that = this;
  198. getSpreadInfo().then(res => {
  199. that.recordCount = res.data.commissionCount;
  200. that.extractCount = res.data.extractCount;
  201. });
  202. }
  203. },
  204. onReachBottom: function() {
  205. this.getRecordList();
  206. }
  207. }
  208. </script>
  209. <style scoped lang="scss">
  210. .promoterHeader{
  211. background-image: linear-gradient(to right, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
  212. }
  213. .sign-record{
  214. margin-top: 14rpx;
  215. }
  216. .commission-details .promoterHeader .headerCon .money {
  217. font-size: 36rpx;
  218. }
  219. .p-color {
  220. color: var(--view-priceColor);
  221. }
  222. .commission-details .listn .nums {
  223. font-size: 32rpx;
  224. font-weight: bold;
  225. }
  226. .message{
  227. font-size: 18rpx;
  228. color: #fc4141;
  229. }
  230. .item-label{
  231. font-size: 18rpx;
  232. display: flex;
  233. width: 76rpx;
  234. height: 26rpx;
  235. text-align: center;
  236. justify-content: center;
  237. background-color: var(--view-bgColor);
  238. margin-right: 6rpx;
  239. font-weight: normal;
  240. }
  241. </style>