wallet.vue 8.0 KB

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