details.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view>
  3. <u-navbar title="收益详情"></u-navbar>
  4. <view class="details">
  5. <view class="details-head">
  6. <u-icon name="charging-pile-fill" custom-prefix="custom-icon" color="#27B148" size="48"></u-icon>
  7. <h4>{{detail.deviceName}}/{{detail.deviceNo}}</h4>
  8. </view>
  9. <view class="details-main">
  10. <view class="details-price">
  11. <span>¥</span><h3>{{detail.shareProfitAmount}}</h3><span>元</span>
  12. </view>
  13. <p>本单收益</p>
  14. </view>
  15. <view class="details-row"><p>电费(元)</p><span>¥400.00</span></view>
  16. <view class="details-row"><p>服务费(元)</p><span>¥100.00</span></view>
  17. <view class="details-row"><p>桩号</p><span>A0001</span></view>
  18. <view class="details-row"><p>分润标准</p><span>15%</span></view>
  19. </view>
  20. <view class="details">
  21. <view class="details-title">
  22. <h4>充电详情</h4>
  23. </view>
  24. <view class="details-row"><p>电费(元)</p><span>¥400.00</span></view>
  25. <view class="details-row"><p>服务费(元)</p><span>¥100.00</span></view>
  26. <view class="details-row"><p>桩号</p><span>A0001</span></view>
  27. <view class="details-row"><p>分润标准</p><span>15%</span></view>
  28. </view>
  29. <view class="detailsBtn">
  30. <u-button class="detailsBtn-btn" @click="back" type="primary" plain>返回</u-button>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import * as API from '@/apis/finance.js'
  36. export default {
  37. data() {
  38. return {
  39. id:'',
  40. detail:{
  41. }
  42. }
  43. },
  44. onLoad(op){
  45. this.id=op.id;
  46. this.getInfo()
  47. },
  48. methods: {
  49. back(){
  50. uni.navigateBack({
  51. })
  52. },
  53. getInfo(){
  54. uni.showLoading({
  55. title:"加载中",mask:true,
  56. })
  57. API.incomeDetails({
  58. detailId:this.id
  59. }).then((res) => {
  60. this.detail=res.data.detail
  61. uni.hideLoading()
  62. }).catch(error => {
  63. uni.showToast({
  64. title:error
  65. })
  66. })
  67. }
  68. }
  69. }
  70. </script>
  71. <style>
  72. page{
  73. background-color: #F7F7F7;
  74. }
  75. </style>
  76. <style lang="scss" scoped>
  77. .detailsBtn{
  78. margin: 16px;
  79. .detailsBtn-btn{
  80. border-color:#185AC6!important;
  81. border-radius: 8px!important;
  82. background: none!important;
  83. color:#185AC6!important;
  84. }
  85. }
  86. .details-title{
  87. margin-bottom: 16px;
  88. h4{
  89. font-weight: normal;
  90. font-size: 16px;
  91. position: relative;
  92. padding-left:10px;
  93. &::after{
  94. content: '';
  95. position: absolute;
  96. height: 12px;
  97. width: 4px;
  98. background-color: #27B148;
  99. left: 0;
  100. top:5px;
  101. }
  102. }
  103. }
  104. .details-row{
  105. display: flex;
  106. justify-content: space-between;
  107. align-items: center;
  108. margin-top: 15px;
  109. p{color:#888}
  110. }
  111. .details{
  112. margin: 16px;
  113. padding: 20px;
  114. background-color: #fff;
  115. border-radius: 8px;
  116. .details-head{
  117. display: flex;
  118. align-items: center;
  119. justify-content: center;
  120. h4{
  121. font-size: 18px;
  122. font-weight: normal;
  123. margin-left: 4px;
  124. }
  125. }
  126. .details-price{
  127. margin-top: 28px;
  128. display: flex;
  129. align-items: flex-end;
  130. justify-content: center;
  131. h3{
  132. font-size: 36px;
  133. color:#27B148;
  134. line-height: 36px;
  135. margin: 0 4px;
  136. font-weight: normal;
  137. }
  138. span{
  139. font-size: 20px;
  140. color:#27B148;
  141. }
  142. }
  143. .details-main{
  144. text-align: center;
  145. margin-bottom: 20px;
  146. p{
  147. color:#777;
  148. margin-top: 4px;
  149. }
  150. }
  151. }
  152. </style>