monthlyCardDetails.vue 5.5 KB

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