wallet.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <template>
  2. <view>
  3. <!-- view class="headers ">
  4. <view class="dis a-c j-start ">
  5. <u-icon name="arrow-left" style="color: #fff;" size="40" @tap="back"></u-icon>
  6. <text style="margin: auto;">钱包</text>
  7. </view>
  8. </view> -->
  9. <view class="amount-money">
  10. <view class="team dis" style="height: 11vh;">
  11. <image src="/static/img/touxiang.png"></image>
  12. <view style="color:#fff">
  13. <view>{{totalList.userName}}</view>
  14. <view>{{totalList.userId}}</view>
  15. </view>
  16. </view>
  17. <view class="amount-total" style="margin:12px 15px">
  18. <view style="font-size: 13px;">总金额</view>
  19. <view class="dis a-c j-s">
  20. <view class="amount-tixian">
  21. <text>¥</text>
  22. <text>{{totalList.cashFee}}</text>
  23. </view>
  24. <view>
  25. <u-button class="view-now" @click="toWithdraw">提现</u-button>
  26. </view>
  27. </view>
  28. <view class="dis total">
  29. <view>贡献总保费</view>
  30. <view>抽成比例</view>
  31. </view>
  32. <view class="dis total" style="color: #343EEF ;">
  33. <view>¥<text style="font-size: 20px">{{totalList.sumpremium}}</text></view>
  34. <view text style="font-size: 20px">{{totalList.proportional}}%</view>
  35. </view>
  36. </view>
  37. <view class="withdrawal">
  38. <view class="withdrawal-background ">
  39. <view class="dis j-s" style="margin:5px 0 10px 0;font-weight: 700;font-size: 14px;">
  40. <text>提现记录</text>
  41. <!-- <view class="statisticsDate dis a-c ">
  42. <view style="width: 180upx;flex-shrink: 0;" class="dis a-c j-c">
  43. <picker style="padding: 0;margin-right: 5px;" @change="bindPickerChange"
  44. :value="queryTimeTypeIndex" :range="queryTimeTypeArray">
  45. <view>{{queryTimeTypeArray[queryTimeTypeIndex]}}</view>
  46. </picker>
  47. <u-icon name="arrow-down-fill" color="#333" size="16"></u-icon>
  48. </view>
  49. <view class="d-flex a-center j-center flex-1" @click="onShowDatePicker">
  50. {{dateRange[0].replace('/','-')}} -
  51. {{dateRange[1]}}
  52. </view>
  53. <view class="d-flex a-center j-center" style="width: 60upx;flex-shrink: 0;">
  54. <view class="icon iconfont icon-search-1-copy"></view>
  55. </view>
  56. </view> -->
  57. </view>
  58. <view class="withdrawal-con">
  59. <view style="border-bottom: 1px solid #ccc;padding: 10px 0;" v-for="val in withdrawalList"
  60. :key="val.number">
  61. <view class="dis j-s ">
  62. <view class="dis " style="line-height: normal;">
  63. <image v-if="val.status=='1'" class="Withdrawal-icon"
  64. src="/static/icon/chenggong.png"></image>
  65. <image v-if="val.status=='0'" class="Withdrawal-icon"
  66. src="/static/icon/tixianzhong.png"></image>
  67. <image v-if="val.status=='2'" class="Withdrawal-icon" src="/static/icon/bohui.png">
  68. </image>
  69. <text>提现-{{ val.status=='0'?'提现中':val.status=='1'?'成功':val.status=='2'?'驳回':'无' }}</text>
  70. </view>
  71. <text style="font-weight: 700;">-{{val.cashFee}}</text>
  72. </view>
  73. <view>交易号:{{val.number}}</view>
  74. <view class="dis j-s">
  75. <text style="color: rgba(51,51,51,0.8);">{{val.createTime}}</text>
  76. <text class="view" @click="detail(val.id)">查看详情</text>
  77. </view>
  78. </view>
  79. <o-empty v-if="withdrawalList.length==0" height="20vh" />
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <mx-date-picker :show="showDatePicker" type="range" :value="dateRange" :show-tips="true" @confirm="onSelected"
  85. @cancel="onSelected" />
  86. </view>
  87. </template>
  88. <script>
  89. import MxDatePicker from "@/components/modules/tools/team/mx-datepicker/mx-datepicker.vue";
  90. import {
  91. mapState,
  92. } from "vuex"
  93. export default {
  94. data() {
  95. return {
  96. totalList: {},
  97. queryTimeTypeArray: ['本月查询', '本年查询', '自定义查询'],
  98. queryTimeTypeIndex: 0,
  99. dateRange: [new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-01', new Date()
  100. .getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate()
  101. ],
  102. showDatePicker: false,
  103. teamTabIndex: 0,
  104. withdrawalList: []
  105. }
  106. },
  107. computed: {
  108. ...mapState(['userInfo', "userCheckInfo", ]),
  109. },
  110. components: {
  111. MxDatePicker
  112. },
  113. async onLoad() {
  114. this.queryData()
  115. this.WithdrawalqueryData()
  116. },
  117. methods: {
  118. //页面返回按钮
  119. back() {
  120. uni.navigateBack({
  121. delta: 1, // 返回的页面数,如果是1表示返回上一页
  122. success: function() {}
  123. });
  124. // uni.navigateTo({
  125. // url: "/pages/index/index"
  126. // })
  127. },
  128. detail(id) {
  129. uni.navigateTo({
  130. url: "/pages/institutional/walletDetail?id=" + id
  131. })
  132. },
  133. async queryData() {
  134. let res = await this.$http.get('/agency/queryExtractFee');
  135. if (res.code == '200') {
  136. this.totalList = res.data
  137. }
  138. },
  139. async WithdrawalqueryData() {
  140. let params = {
  141. // "endTime": this.dateRange[1],
  142. // "beginTime": this.dateRange[0],
  143. }
  144. // let res = await this.$http.post('/sysAgencyFeeApproval/queryOperateInfo', params);
  145. // if (res.code == '200') {
  146. // this.withdrawalList=res.data
  147. // }
  148. },
  149. onShowDatePicker() { //显示
  150. this.showDatePicker = true;
  151. },
  152. onSelected(e) { //选择
  153. this.showDatePicker = false;
  154. if (e) {
  155. this.dateRange = e.value;
  156. this.WithdrawalqueryData();
  157. }
  158. },
  159. bindPickerChange: function(e) {
  160. this.queryTimeTypeIndex = e.target.value
  161. if (e.target.value == 0) {
  162. this.dateRange = [new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + '01',
  163. new Date()
  164. .getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate()
  165. ];
  166. this.WithdrawalqueryData();
  167. }
  168. if (e.target.value == 1) {
  169. this.dateRange = [new Date().getFullYear() + '-01-01', new Date().getFullYear() + '-12-31'];
  170. this.WithdrawalqueryData();
  171. }
  172. if (e.target.value == 2) {
  173. this.showDatePicker = true;
  174. }
  175. },
  176. async toWithdraw() {
  177. let res = await this.$http.post('/userBank/getUserBankList', {
  178. auditStatus: "1",
  179. delFlag: '0'
  180. });
  181. if (res.data.length) {
  182. this.navigate({
  183. url: `/pages/wallet/withdraw?amount=${this.totalList.cashFee}`,
  184. }, "navigateTo", true)
  185. } else {
  186. uni.showToast({
  187. title: '暂无审核通过的银行卡,不可提现',
  188. duration: 3000,
  189. icon: "none"
  190. });
  191. }
  192. },
  193. }
  194. }
  195. </script>
  196. <style lang="scss" scoped>
  197. .amount-money {
  198. background-color: #343EEF;
  199. background-image: url(/static/img/group.png);
  200. background-repeat: no-repeat;
  201. background-size: 50%;
  202. background-position: right top;
  203. }
  204. .team {
  205. padding: 15px 20px;
  206. image {
  207. width: 50px;
  208. height: 50px;
  209. margin-right: 20px;
  210. }
  211. }
  212. .amount-total {
  213. background: linear-gradient(90deg, #E6E9FE 0%, #F6F7FF 50%, #E4E7FE 100%);
  214. border-radius: 12px 12px 12px 12px;
  215. padding: 13px
  216. }
  217. .headers {
  218. position: fixed;
  219. top: 0;
  220. left: 0;
  221. width: 100%;
  222. z-index: 999999;
  223. padding-top: 15px;
  224. height: auto;
  225. color: #fff;
  226. background: #343EEF;
  227. text {
  228. font-size: 18px;
  229. font-weight: bold;
  230. }
  231. }
  232. .amount-tixian {
  233. color: #343EEF;
  234. }
  235. .amount-tixian>text:last-child {
  236. font-weight: bold;
  237. font-size: 34px;
  238. background: linear-gradient(0deg, #3447EF 0%, #3492EF 100%);
  239. -webkit-background-clip: text;
  240. -webkit-text-fill-color: transparent;
  241. }
  242. .view-now {
  243. background: linear-gradient(90deg, #6D75F3 0%, #343EEF 100%);
  244. color: #fff;
  245. font-size: 13px;
  246. }
  247. .total>view {
  248. width: 50%;
  249. }
  250. .statisticsDate {
  251. color: rgba(51, 51, 51, 0.8);
  252. height: 34px;
  253. background: rgba(255, 255, 255, 0.4);
  254. border-radius: 6px;
  255. }
  256. .withdrawal {
  257. height: 50vh;
  258. border-radius: 40px 40px 0px 0px;
  259. border-bottom-left-radius: 0;
  260. border-bottom-right-radius: 0;
  261. background-color: #fff;
  262. padding: 20px;
  263. }
  264. .withdrawal-background {
  265. padding: 5px;
  266. background: #E7E8FD;
  267. border-radius: 12px 12px 12px 12px;
  268. }
  269. .withdrawal-con {
  270. background: #fff;
  271. border-radius: 12px 12px 12px 12px;
  272. padding: 0 10px;
  273. height: 40vh;
  274. overflow-y: auto;
  275. }
  276. .view {
  277. background: linear-gradient(90deg, #7E99D1 0%, #4F78B1 100%);
  278. border-radius: 20px 20px 20px 20px;
  279. padding: 3px 10px;
  280. font-size: 11px;
  281. color: #fff;
  282. }
  283. .Withdrawal-icon {
  284. width: 20px;
  285. height: 20px;
  286. margin-right: 5px;
  287. }
  288. </style>