monthlyCardDetails.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <view>
  3. <u-navbar>订单详情</u-navbar>
  4. <view class="details">
  5. <view class="details-title">
  6. <h4>订单明细</h4>
  7. </view>
  8. <view class="details-row">
  9. <p>商品名称 </p>
  10. <span>{{monthlyRentCard.name}}</span>
  11. </view>
  12. <view class="details-row">
  13. <p>订单金额</p>
  14. <span>{{regUserCard.payFee?regUserCard.payFee.toFixed(2):0}}元</span>
  15. </view>
  16. <view class="details-row">
  17. <p>月卡卡号</p>
  18. <span>{{regUserCard.cardNo}}</span>
  19. </view>
  20. <view class="details-row">
  21. <p>订单编号</p>
  22. <span>{{regUserCard.outOrderNo}}</span>
  23. </view>
  24. <view class="details-row">
  25. <p>购买时间</p>
  26. <span>{{regUserCard.payTime}}</span>
  27. </view>
  28. </view>
  29. <view class="details">
  30. <view class="details-title">
  31. <h4>更多信息</h4>
  32. </view>
  33. <!-- <view class="details-row">
  34. <p>用户昵称 </p>
  35. <span>{{buyRegUser.nickName?buyRegUser.nickName:'未命名'}}</span>
  36. </view> -->
  37. <view class="details-row">
  38. <p>用户姓名 </p>
  39. <span>{{buyRegUser.realName?buyRegUser.realName:'未命名'}}</span>
  40. </view>
  41. <view class="details-row">
  42. <p>车牌号 </p>
  43. <span>{{buyRegUser.carNum?buyRegUser.carNum:'未绑定'}}</span>
  44. </view>
  45. <view class="details-row">
  46. <p>联系方式</p>
  47. <span>{{getPhone(buyRegUser.phone)}}</span>
  48. </view>
  49. <view class="details-row">
  50. <p>月卡有效期</p>
  51. <span>{{regUserCard.startTime?regUserCard.startTime.slice(0,10):''}}至{{regUserCard.endTime?regUserCard.endTime.slice(0,10):''}}</span>
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import {
  58. parseUnixTime,
  59. substrMb
  60. } from '@/utils'
  61. import * as API from '@/apis/finance.js'
  62. export default {
  63. data() {
  64. return {
  65. buyRegUser: {},
  66. monthlyRentCard: {},
  67. regUserCard: {},
  68. }
  69. },
  70. onLoad(op) {
  71. this.id = op.id;
  72. this.getInfo()
  73. },
  74. methods: {
  75. getPhone(phone){
  76. var backphone="";
  77. if(phone){
  78. backphone=substrMb(phone,0,3)+"****"+substrMb(phone,7,4)
  79. }
  80. return backphone;
  81. },
  82. getInfo() {
  83. uni.showLoading({
  84. title: "加载中",
  85. mask: true,
  86. })
  87. API.buyCardDetail({
  88. id: this.id
  89. }).then((res) => {
  90. this.buyRegUser = res.data.buyRegUser
  91. this.monthlyRentCard = res.data.monthlyRentCard
  92. this.regUserCard = res.data.regUserCard
  93. uni.hideLoading()
  94. }).catch(error => {
  95. uni.showToast({
  96. title: error
  97. })
  98. })
  99. }
  100. }
  101. }
  102. </script>
  103. <style>
  104. page {
  105. background-color: #F7F7F7;
  106. }
  107. </style>
  108. <style lang="scss" scoped>
  109. .detailsBtn {
  110. margin: 16px;
  111. .detailsBtn-btn {
  112. border-color: #185AC6 !important;
  113. border-radius: 8px !important;
  114. background: none !important;
  115. color: #185AC6 !important;
  116. }
  117. }
  118. .details-title {
  119. margin-bottom: 20px;
  120. h4 {
  121. font-weight: normal;
  122. font-size: 16px;
  123. position: relative;
  124. padding-left: 10px;
  125. &::after {
  126. content: '';
  127. position: absolute;
  128. height: 12px;
  129. width: 4px;
  130. background-color: #185ac6;
  131. left: 0;
  132. top: 5px;
  133. }
  134. }
  135. }
  136. .details-row {
  137. display: flex;
  138. justify-content: space-between;
  139. align-items: center;
  140. margin-top: 15px;
  141. p {
  142. color: #86898C;
  143. }
  144. }
  145. .details-row-sum {
  146. float: right;
  147. color: #101010;
  148. font-size: 14px;
  149. }
  150. .details {
  151. margin: 16px;
  152. padding: 20px;
  153. background-color: #fff;
  154. border-radius: 8px;
  155. position: relative;
  156. .details-head {
  157. text-align: center;
  158. display: flex;
  159. align-items: center;
  160. justify-content: center;
  161. h4 {
  162. font-size: 18px;
  163. font-weight: normal;
  164. margin-left: 4px;
  165. }
  166. }
  167. .details-price {
  168. margin-top: 12px;
  169. margin-bottom: 4px;
  170. display: flex;
  171. align-items: flex-end;
  172. justify-content: center;
  173. h3 {
  174. font-size: 36px;
  175. color: #27B148;
  176. line-height: 36px;
  177. margin: 0 4px;
  178. font-weight: normal;
  179. }
  180. span {
  181. font-size: 20px;
  182. color: #27B148;
  183. }
  184. }
  185. .details-main {
  186. text-align: center;
  187. .withdraw {
  188. width: 21.3vw;
  189. height: 21.3vw;
  190. position: absolute;
  191. top: 2vw;
  192. right: 2.5vw;
  193. }
  194. p {
  195. color: #777;
  196. margin-top: 4px;
  197. }
  198. }
  199. }
  200. </style>