chargingDetails.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <template>
  2. <view>
  3. <u-navbar title="充电价格详情"></u-navbar>
  4. <!-- 主体 -->
  5. <!-- 充电桩信息 -->
  6. <view class="main">
  7. <!-- 收费标准 -->
  8. <view class="rates" v-if="prices&&prices.length">
  9. <view class="rates-title">
  10. <view class="title-left">
  11. 收费标准
  12. </view>
  13. <view class="title-right">
  14. 充电功率计费
  15. </view>
  16. </view>
  17. <!-- 时段分类 -->
  18. <view class="time-rates">
  19. <view class="time-part" v-for="(item,index) in prices" :key="index">
  20. <view class="part-top">
  21. <view class="time">
  22. {{item.minPower}}W-{{item.maxPower}}W
  23. </view>
  24. <view class="price">
  25. <text class="price-number">{{item.price}}</text>
  26. <text class="price-unit">元每小时</text>
  27. </view>
  28. </view>
  29. <!-- <view class="part-bottom">
  30. <view class="unitPrice-servicePrice">
  31. 充电单价:¥{{item.costPrice}} | 服务费:¥{{item.servicePrice}}
  32. </view>
  33. </view> -->
  34. </view>
  35. <view style="
  36. text-align: center;
  37. color: #999999;
  38. ">*充电费用仅供参考,请以充电桩上的费用为准。</view>
  39. </view>
  40. </view>
  41. <!-- 收费标准 -->
  42. <view class="rates" v-if="carPrices&&carPrices.length">
  43. <view class="rates-title">
  44. <view class="title-left">
  45. 收费标准
  46. </view>
  47. <view class="title-right">
  48. 峰谷平电价计费
  49. </view>
  50. </view>
  51. <!-- 时段分类 -->
  52. <view class="time-rates">
  53. <view class="time-part" v-for="(item,index) in carPrices" :key="index">
  54. <view class="part-top">
  55. <view class="time">
  56. {{item.startTime}}-{{item.endTime}}
  57. </view>
  58. <view class="price">
  59. <text class="price-number">{{item.electricityPrice}}</text>
  60. <text class="price-unit">元/度</text>
  61. </view>
  62. </view>
  63. <view class="part-bottom">
  64. <view class="unitPrice-servicePrice">
  65. 充电单价:¥{{item.costPrice}} | 服务费:¥{{item.servicePrice}}
  66. </view>
  67. </view>
  68. </view>
  69. <view style="
  70. text-align: center;
  71. color: #999999;
  72. ">*充电费用仅供参考,请以充电桩上的费用为准。</view>
  73. </view>
  74. </view>
  75. </view>
  76. <!-- 底部按钮 -->
  77. </view>
  78. </template>
  79. <script>
  80. import * as API from '@/apis/finance.js'
  81. export default {
  82. data() {
  83. return {
  84. id:'',
  85. carPrices: [],
  86. device: [],
  87. prices: null,
  88. description: '温馨提示:充电前请确保您的车辆已与充电桩连接!并关闭车内电源。'
  89. }
  90. },
  91. onLoad(op) {
  92. if(op){
  93. this.id=op.id
  94. this.getInfo()
  95. }
  96. },
  97. onReady() {
  98. },
  99. methods: {
  100. getInfo(){
  101. uni.showLoading({
  102. title: "加载中",
  103. mask: true,
  104. })
  105. API.priceList({
  106. deviceNo:this.id
  107. }).then((res) => {
  108. this.carPrices=res.data.carPrices
  109. this.device=res.data.device
  110. this.prices=res.data.prices
  111. uni.hideLoading()
  112. }).catch(error => {
  113. uni.showToast({
  114. title: error
  115. })
  116. })
  117. }
  118. }
  119. }
  120. </script>
  121. <style lang="scss">
  122. // 头部
  123. .title {
  124. width: 100%;
  125. line-height: 44px;
  126. background-color: rgba(255, 255, 255, 100);
  127. text-align: center;
  128. border: 1px solid rgba(242, 242, 242, 100);
  129. position: fixed;
  130. top: 0;
  131. }
  132. // 主体
  133. .main {
  134. width: 100%;
  135. //margin-top: 44px;
  136. // margin-bottom: 64px;
  137. //padding-bottom: 234px;
  138. .main-detail {
  139. display: flex;
  140. justify-content: space-between;
  141. padding: 14px 16px 0 0;
  142. height: 48px;
  143. line-height: 48px;
  144. background-color: #fff;
  145. border-bottom: 1px solid rgba(242, 242, 242, 100);
  146. .detail-name {
  147. margin-left: 16px;
  148. height: 20px;
  149. line-height: 23px;
  150. color: rgba(102, 102, 102, 100);
  151. font-size: 14px;
  152. }
  153. .detail-content {
  154. height: 23px;
  155. line-height: 23px;
  156. color: rgba(51, 51, 51, 100);
  157. font-size: 14px;
  158. }
  159. }
  160. // 收费标准
  161. .rates {
  162. width: 100%;
  163. background-color: #fff;
  164. margin-top: 12px;
  165. .rates-title {
  166. display: flex;
  167. justify-content: space-between;
  168. height: 48px;
  169. line-height: 48px;
  170. padding: 0px 16px 0;
  171. border-bottom: 1px solid rgba(242, 242, 242, 100);
  172. }
  173. .time-part {
  174. width: 100%;
  175. .part-top {
  176. display: flex;
  177. justify-content: space-between;
  178. padding: 16px;
  179. .time {
  180. color: rgba(16, 16, 16, 100);
  181. font-size: 16px;
  182. }
  183. .price {
  184. .price-number {
  185. color: rgba(255, 61, 0, 100);
  186. font-size: 18px;
  187. text-align: right;
  188. font-family: Roboto-regular;
  189. display: inline-block;
  190. height: 20px;
  191. font-weight: 600;
  192. }
  193. .price-unit {
  194. color: rgba(102, 102, 102, 100);
  195. font-size: 14px;
  196. text-align: right;
  197. margin-left: 4px;
  198. display: inline-block;
  199. height: 20px;
  200. }
  201. }
  202. }
  203. .part-bottom {
  204. .unitPrice-servicePrice {
  205. eight: 18px;
  206. color: rgba(136, 136, 136, 100);
  207. font-size: 12px;
  208. text-align: right;
  209. padding-right: 16px;
  210. padding-bottom: 18px;
  211. }
  212. }
  213. }
  214. }
  215. .tips {
  216. font-size: 12px;
  217. margin-top: 24px;
  218. /deep/.u-alert-desc[data-v-4d234687] {
  219. font-size: 12px
  220. }
  221. }
  222. }
  223. // 尾部
  224. .bottom {
  225. background-color: #fff;
  226. ;
  227. width: 100%;
  228. height: 64px;
  229. line-height: 64px;
  230. position: fixed;
  231. bottom: 0;
  232. left: 0;
  233. z-index: 999;
  234. padding: 12px 16px;
  235. .botton {
  236. width: 343px;
  237. height: 40px;
  238. line-height: 40px;
  239. border-radius: 50px;
  240. background-color: rgba(0, 185, 98, 100);
  241. color: rgba(255, 255, 255, 100);
  242. font-size: 16px;
  243. text-align: center;
  244. margin: 0 auto;
  245. }
  246. }
  247. </style>