record_show.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <view>
  3. <view class="show">
  4. <view class="head">
  5. <view>换电编号</view>
  6. <view>{{item.exchangeNo || '-'}}</view>
  7. <view @click="copynum">复制</view>
  8. </view>
  9. <view class="foot">
  10. <view class="title">
  11. <view>{{item.plate || '-'}}</view>
  12. <view class="info">
  13. <view class="first">
  14. <view>{{item.stationAddress || '-'}}</view><view>¥{{item.powerFee || '-'}}</view>
  15. </view>
  16. <view class="second">
  17. <view>{{item.createTime || '-'}}</view><view>换电量{{item.exchangePower || '-'}}(kWh)</view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="list">
  22. <view class="details">
  23. <view>司机</view>
  24. <view>{{item.driverName || '-'}}</view>
  25. </view>
  26. <view class="details">
  27. <view>手机号</view>
  28. <view>{{item.driverPhone || '-'}}</view>
  29. </view>
  30. <view class="details">
  31. <view>车辆电池编号</view>
  32. <view>{{item.sourceBatterySn || '-'}}</view>
  33. </view>
  34. <view class="details">
  35. <view>换电电池编号</view>
  36. <view>{{item.targetBatterySn || '-'}}</view>
  37. </view>
  38. <view class="details">
  39. <view>车辆电池SOC</view>
  40. <view>{{item.sourceSoc || '-'}}</view>
  41. </view>
  42. <view class="details">
  43. <view>换电电池SOC</view>
  44. <view>{{item.targetSoc || '-'}}</view>
  45. </view>
  46. <view class="details">
  47. <view>换电开始时间</view>
  48. <view>{{item.startTime || '-'}}</view>
  49. </view>
  50. <view class="details">
  51. <view>换电完成时间</view>
  52. <view>{{item.endTime || '-'}}</view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <tab-bar></tab-bar>
  58. </view>
  59. </template>
  60. <script>
  61. export default {
  62. data() {
  63. return {
  64. id:0,
  65. item:{}
  66. }
  67. },
  68. onLoad(option) {
  69. if(option.id){
  70. this.id=option.id
  71. }else{
  72. this.$utils.msg('id丢失')
  73. }
  74. },
  75. mounted() {
  76. this.getExchangeDetail()
  77. },
  78. methods: {
  79. copynum(){
  80. uni.setClipboardData({
  81. data: this.item.exchangeNo
  82. });
  83. },
  84. //换电记录详情
  85. getExchangeDetail(){
  86. if(this.id>0){
  87. this.$http.exchangeRecordShow(this.id).then(rs=>{
  88. if(rs.code === 0){
  89. this.item=rs.data
  90. }else{
  91. this.$utils.msg(rs.msg);
  92. }
  93. })
  94. .catch(error=>{
  95. this.$utils.msg(error);
  96. });
  97. }
  98. }
  99. }
  100. }
  101. </script>
  102. <style lang="scss" scoped>
  103. .show{
  104. width: 690rpx;
  105. padding: 30rpx;
  106. display: flex;
  107. flex-direction: column;
  108. .head{
  109. display: flex;
  110. padding-left: 25rpx;
  111. view{
  112. margin-right: 25rpx;
  113. }
  114. view:last-child{
  115. color: #58be6b;
  116. font-weight: bold;
  117. font-size: 28rpx;
  118. }
  119. }
  120. .foot{
  121. width: 690rpx;
  122. display: flex;
  123. flex-direction: column;
  124. margin-top: 30rpx;
  125. .title{
  126. width: 690rpx;
  127. height: 184rpx;
  128. background-color: #f2f4f7;
  129. border-top-left-radius: 35rpx;
  130. border-top-right-radius: 35rpx;
  131. display: flex;
  132. padding: 20rpx 30rpx;
  133. box-sizing: border-box;
  134. font-size: 32rpx;
  135. font-weight: bold;
  136. flex-direction: column;
  137. justify-content: space-around;
  138. .info{
  139. width: 100%;
  140. margin-top: 20rpx;
  141. margin-bottom: 10rpx;
  142. font-weight: normal;
  143. .first{
  144. display: flex;
  145. justify-content: space-between;
  146. font-size: 30rpx;
  147. view:last-child{
  148. font-size: 32rpx;
  149. font-weight: bold;
  150. }
  151. }
  152. .second{
  153. color: #86909c;
  154. font-size: 28rpx;
  155. display: flex;
  156. justify-content: space-between;
  157. margin-top: 2rpx;
  158. }
  159. }
  160. }
  161. .list{
  162. display: flex;
  163. background-color: #fff;
  164. width: 690rpx;
  165. border-bottom-left-radius: 35rpx;
  166. border-bottom-right-radius: 35rpx;
  167. padding:0 35rpx;
  168. box-sizing: border-box;
  169. flex-direction: column;
  170. padding-bottom: 25rpx;
  171. .details{
  172. display: flex;
  173. justify-content: space-between;
  174. font-size: 28rpx;
  175. color: #1d2129;
  176. margin: 30rpx 0;
  177. view:first-child{
  178. color: #86909c;
  179. font-weight: bold;
  180. }
  181. }
  182. }
  183. }
  184. }
  185. </style>