monthlyCardDetails.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <template>
  2. <view>
  3. <ujp-navbar>分润详情</ujp-navbar>
  4. <view class="details">
  5. <view class="details-main">
  6. <view class="details-price">
  7. <h3>{{rentCardShareProfit.shareProfitAmount?rentCardShareProfit.shareProfitAmount.toFixed(2):0}}<span style="font-size: 12px;">元</span></h3>
  8. </view>
  9. <p>分润金额</p>
  10. <img
  11. v-if="rentCardShareProfit.status==2"
  12. class="withdraw" src="../..//assets/img/withdraw.png" alt="">
  13. </view>
  14. </view>
  15. <view class="details">
  16. <view class="details-title">
  17. <h4>订单明细</h4>
  18. </view>
  19. <template v-if="rentCardShareProfit.stationName">
  20. <!-- 庄主显示内容 -->
  21. </template>
  22. <template v-else>
  23. <!-- 平台显示内容 -->
  24. <view class="details-row">
  25. <p>平台收益</p>
  26. <span>{{rentCardShareProfit.disProportion}}%</span>
  27. </view>
  28. </template>
  29. <view class="details-row">
  30. <p>月卡总金额</p>
  31. <span>{{regUserCard.payFee?regUserCard.payFee.toFixed(2):0}}元</span>
  32. </view>
  33. <view class="details-row" v-if="rentCardShareProfit.stationName" >
  34. <p>服务费总金额</p>
  35. <span>{{rentCardShareProfit.serviceTotalAmount?rentCardShareProfit.serviceTotalAmount.toFixed(2):0}}元</span>
  36. </view>
  37. <view class="details-row" v-if="rentCardShareProfit.stationName">
  38. <p>分润比例</p>
  39. <span>{{rentCardShareProfit.stationProportion}}%</span>
  40. </view>
  41. <view class="details-row">
  42. <p>月卡分润金额</p>
  43. <span>{{rentCardShareProfit.shareProfitAmount?rentCardShareProfit.shareProfitAmount.toFixed(2):0}}元</span>
  44. </view>
  45. <view class="details-row" v-if="rentCardShareProfit.stationName">
  46. <p>周期内充电次数</p>
  47. <span>{{rentCardShareProfit.chargingCount}}次</span>
  48. </view>
  49. </view>
  50. <view class="details">
  51. <view class="details-title">
  52. <h4>更多信息</h4>
  53. </view>
  54. <view class="details-row" v-if="rentCardShareProfit.stationName">
  55. <p>来源站点 </p>
  56. <span>{{rentCardShareProfit.stationName}}</span>
  57. </view>
  58. <view class="details-row" v-if="rentCardShareProfit.stationName" >
  59. <p>设备名称</p>
  60. <span>{{rentCardShareProfit.deviceName}}</span>
  61. </view>
  62. <view class="details-row">
  63. <p>用户姓名 </p>
  64. <span>{{regUser.realName?regUser.realName:'未命名'}}</span>
  65. </view>
  66. <view class="details-row">
  67. <p>车牌号 </p>
  68. <span>{{regUser.carNum?regUser.carNum:'未绑定'}}</span>
  69. </view>
  70. <view class="details-row">
  71. <p>月卡卡号</p>
  72. <span>{{regUserCard.cardNo}}</span>
  73. </view>
  74. <view class="details-row">
  75. <p>月卡有效期</p>
  76. <span>{{regUserCard.startTime?regUserCard.startTime.slice(0,10):''}}至{{regUserCard.endTime?regUserCard.endTime.slice(0,10):''}}</span>
  77. </view>
  78. <view class="details-row">
  79. <p>结算时间</p>
  80. <span>{{rentCardShareProfit.createTime}}</span>
  81. </view>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. import {
  87. parseUnixTime,
  88. substrMb
  89. } from '@/utils'
  90. import * as API from '@/apis/finance.js'
  91. export default {
  92. data() {
  93. return {
  94. regUser: {},
  95. rentCardShareProfit: {},
  96. regUserCard: {},
  97. }
  98. },
  99. onLoad(op) {
  100. this.id = op.id;
  101. this.getInfo()
  102. },
  103. methods: {
  104. getPhone(phone){
  105. var backphone="";
  106. if(phone){
  107. backphone=substrMb(phone,0,3)+"****"+substrMb(phone,7,4)
  108. }
  109. return backphone;
  110. },
  111. getInfo() {
  112. uni.showLoading({
  113. title: "加载中",
  114. mask: true,
  115. })
  116. API.cardProfitDataDetail({
  117. id: this.id
  118. }).then((res) => {
  119. this.regUser = res.data.regUser
  120. this.regUserCard = res.data.regUserCard
  121. this.rentCardShareProfit = res.data.rentCardShareProfit
  122. uni.hideLoading()
  123. }).catch(error => {
  124. uni.showToast({
  125. title: error
  126. })
  127. })
  128. }
  129. }
  130. }
  131. </script>
  132. <style>
  133. page {
  134. background-color: #F7F7F7;
  135. }
  136. </style>
  137. <style lang="scss" scoped>
  138. .detailsBtn {
  139. margin: 16px;
  140. .detailsBtn-btn {
  141. border-color: #185AC6 !important;
  142. border-radius: 8px !important;
  143. background: none !important;
  144. color: #185AC6 !important;
  145. }
  146. }
  147. .details-title {
  148. margin-bottom: 20px;
  149. h4 {
  150. font-weight: normal;
  151. font-size: 16px;
  152. position: relative;
  153. padding-left: 10px;
  154. &::after {
  155. content: '';
  156. position: absolute;
  157. height: 12px;
  158. width: 4px;
  159. background-color: #185ac6;
  160. left: 0;
  161. top: 5px;
  162. }
  163. }
  164. }
  165. .details-row {
  166. display: flex;
  167. justify-content: space-between;
  168. align-items: center;
  169. margin-top: 15px;
  170. p {
  171. color: #86898C;
  172. }
  173. }
  174. .details-row-sum {
  175. float: right;
  176. color: #101010;
  177. font-size: 14px;
  178. }
  179. .details {
  180. margin: 16px;
  181. padding: 20px;
  182. background-color: #fff;
  183. border-radius: 8px;
  184. position: relative;
  185. .details-head {
  186. text-align: center;
  187. display: flex;
  188. align-items: center;
  189. justify-content: center;
  190. h4 {
  191. font-size: 18px;
  192. font-weight: normal;
  193. margin-left: 4px;
  194. }
  195. }
  196. .details-price {
  197. margin-top: 12px;
  198. margin-bottom: 4px;
  199. display: flex;
  200. align-items: flex-end;
  201. justify-content: center;
  202. h3 {
  203. font-size: 36px;
  204. color: #27B148;
  205. line-height: 36px;
  206. margin: 0 4px;
  207. font-weight: normal;
  208. }
  209. span {
  210. font-size: 20px;
  211. color: #27B148;
  212. }
  213. }
  214. .details-main {
  215. text-align: center;
  216. .withdraw{
  217. width: 21.3vw;
  218. height: 21.3vw;
  219. position: absolute;
  220. top: 2vw;
  221. right: 2.5vw;
  222. }
  223. p {
  224. color: #777;
  225. margin-top: 4px;
  226. }
  227. }
  228. }
  229. </style>