index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <view class="inspage-content" :style="{'--status-bar-': statusBarHeight}">
  3. <u-navbar title="提现详情" :placeholder="true" @leftClick="leftClick" :autoBack="false" :safeAreaInsetTop="true" />
  4. <view class="inspage-content-info">
  5. <!-- 头部主要内容 开始 -->
  6. <!-- <view class="inspage-content-header">
  7. <customNavbar
  8. title="提示"
  9. bgColor="var(--gd-bgm-color)"
  10. :contentStyle="{ color: '#fff' }"
  11. :left-style="{ color: '#fff' }"
  12. ></customNavbar>
  13. </view> -->
  14. <!-- 头部主要内容 结束 -->
  15. <!-- userInfo内容 开始 -->
  16. <view class="inspage-content-userinfo">
  17. <text>{{ withdrawStatus(retailStatistics.status) }}</text>
  18. <text>¥{{retailStatistics.withdrawPrice}}</text>
  19. <view>
  20. <view>
  21. <text>服务费</text>
  22. <text>¥{{ serviceMoney }}</text>
  23. </view>
  24. <view>
  25. <text>到账账户</text>
  26. <text>{{ withdrawType(retailStatistics.withdrawType) }}</text>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- userInfo内容 结束 -->
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import { navigateTo } from "@/utils/util.js"
  36. export default {
  37. data() {
  38. return {
  39. title: '提示',
  40. statusBarHeight: 0, // 状态栏安全距离
  41. tool: [ // 我的工具
  42. { title: "邀请总人数",num: 0,decimals:0 },
  43. { title: "待核销",num: 0,decimals:2 },
  44. { title: "已核销",num: 0,decimals:2 },
  45. ],
  46. retailStatistics: {}, // 统计信息
  47. params: {},
  48. serviceMoney: null,
  49. }
  50. },
  51. onLoad(e) {
  52. this.params = e
  53. },
  54. onShow() {
  55. this.statusBarHeight = getApp().globalData.statusBarHeight
  56. this.orderWithdrawSelectById()
  57. },
  58. methods: {
  59. leftClick(e) {
  60. uni.reLaunch({
  61. url: '/pages/distributor/index'
  62. });
  63. console.log('leftClick', e);
  64. },
  65. /**
  66. * @author ygh
  67. * @data 2023-12-20
  68. */
  69. navigateToFun(item){
  70. navigateTo(item.url)
  71. },
  72. /**
  73. * 数字显示格式化
  74. *
  75. */
  76. numFormat(num=0) {
  77. if(num<100000) {
  78. return num
  79. }else if(num>100000){
  80. return (num/10000).toFixed(2)
  81. }
  82. },
  83. /** 获取数据 */
  84. async orderWithdrawSelectById(){
  85. try{
  86. this.serviceMoney = this.params.serviceMoney
  87. let res = await this.$u.api.orderWithdrawSelectById({
  88. noSign: 1,
  89. userid: this.distribution_user_info.userId,
  90. id: this.params.id
  91. })
  92. if(res && res.code ===200) {
  93. this.retailStatistics = res.data
  94. }
  95. }catch(e){
  96. //TODO handle the exception
  97. console.error("e===",e)
  98. }
  99. },
  100. withdrawType(type){
  101. let src = ''
  102. switch(type) {
  103. case 'wechat': src="微信零钱"; break;
  104. case 'bank': src="银行卡"; break;
  105. }
  106. return src
  107. },
  108. /**
  109. * 申请状态
  110. */
  111. withdrawStatus(type){
  112. let src = ''
  113. switch(type) {
  114. case 0: src="正在提现,请耐心等待!"; break;
  115. case 1: src="提现成功!"; break;
  116. case 2: src="提现失败!"; break;
  117. }
  118. return src
  119. },
  120. /**
  121. * 设置服务费显示
  122. */
  123. setServiceType(data) {
  124. if (data && data.serviceType) {
  125. if(data.serviceType == 1){
  126. return ('¥' + data.serviceCharge)
  127. }else {
  128. let num1 = this.withdrawInfo.serviceCharge;
  129. let num = isNaN(num1) ? 0 : (Number(num1) / 100)
  130. let money = num ? new Decimal(this.moneyValue).mul(new Decimal(num)) : 0
  131. return '¥' + money
  132. }
  133. }
  134. },
  135. }
  136. }
  137. </script>
  138. <style lang="scss" scoped>
  139. .inspage-content {
  140. display: flex;
  141. flex-direction: column;
  142. align-items: center;
  143. justify-content: center;
  144. --header-h: 90rpx;
  145. .inspage-content-info {
  146. width: 100%;
  147. box-sizing: border-box;
  148. }
  149. }
  150. /** 头部主要内容 开始 */
  151. .inspage-content-header {
  152. width: 100%;
  153. height: var(--header-h);
  154. box-sizing: border-box;
  155. ::v-deep .u-search {
  156. padding: 0 30rpx !important;
  157. }
  158. ::v-deep .u-search__action {
  159. color: #fff !important;
  160. }
  161. }
  162. /** 头部主要内容 结束 **/
  163. /** userInfo内容 开始 */
  164. .inspage-content-userinfo {
  165. width: 100%;
  166. padding: 24rpx 40rpx 0;
  167. box-sizing: border-box;
  168. >text {
  169. width: 100%;
  170. display: flex;
  171. justify-content: center;
  172. }
  173. >text:nth-child(1) {
  174. padding: 50rpx 0 100rpx;
  175. font-size: 32rpx;
  176. }
  177. >text:nth-child(2) {
  178. padding: 50rpx 0 100rpx;
  179. color: var(--gd-bgm-color);
  180. font-size: 52rpx;
  181. }
  182. >view {
  183. padding-top: 50rpx;
  184. color: #606060;
  185. font-size: 24rpx;
  186. >view {
  187. padding-bottom: 20rpx;
  188. width: 100%;
  189. display: flex;
  190. justify-content: space-between;
  191. }
  192. }
  193. }
  194. /** userInfo内容 结束 **/
  195. </style>