details.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892
  1. <template>
  2. <view class="time-head">
  3. <ujp-navbar title="充电详情">
  4. <view slot="right" style="margin-right: 10px;" @click="openModalBl=true">
  5. <view class="iconfont qr-code">
  6. &#xe60d;
  7. </view>
  8. </view>
  9. </ujp-navbar>
  10. <view class="slogan-4 " v-for="(item,i) in bannerListYXJ" :key="i" v-if="i==0">
  11. <u-icon name="close-circle-fill" color="#989898" @click="bannerListYXJ=[]"></u-icon>
  12. <img :src="item.picUrl" @click="gotoUrl2(item.linkUrl)" >
  13. </view>
  14. <u-modal v-model="openModalBl" @confirm="confirmPhoneBl" confirm-text="拨打电话" confirm-color="#606266"
  15. :show-cancel-button="true" ref="uModal" :asyncClose="true" title="客服电话" :content="consumerPhone"
  16. :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
  17. <view class="details-time">
  18. <view class="time">
  19. <view class="time1">
  20. <view class="time13" v-if="chargeDetail.deviceType==1&&chargeDetail.endSoc">
  21. 启动: {{chargeDetail.startSoc}}%
  22. </view>
  23. <view class="time12">{{geth1(chargeDetail.startTime?chargeDetail.startTime:chargeDetail.createTime)}}
  24. </view>
  25. <view class="time11">
  26. {{getday(chargeDetail.startTime?chargeDetail.startTime:chargeDetail.createTime)}}</view>
  27. </view>
  28. <view class="time2">
  29. <view class="time21">
  30. {{ getPercent(chargeDetail)}}
  31. </view>
  32. <view class="time22"></view>
  33. <view class="time21" style="color: #fff;">-</view>
  34. </view>
  35. <view class="time1" style=" text-align: end;">
  36. <view class="time13" v-if="chargeDetail.deviceType==1&&chargeDetail.endSoc">
  37. 停止: {{chargeDetail.endSoc}}%
  38. </view>
  39. <view class="time12">{{geth1(chargeDetail.endTime)}}</view>
  40. <view class="time11">{{getday(chargeDetail.endTime)}}</view>
  41. </view>
  42. </view>
  43. <view class="oldTextjp18px" v-if="false">
  44. <view class="details-row">
  45. <p>充电时长</p>
  46. <span>{{chargeDetail.chargingMinute != null ? getPercent(chargeDetail.chargingMinute) : '0秒'}}</span>
  47. </view>
  48. <view class="details-row" >
  49. <p>实付款</p>
  50. <span>{{chargeDetail.actualFee != null ? chargeDetail.actualFee.toFixed(2) : '0.00'}}元</span>
  51. </view>
  52. <view class="details-row" v-if="chargeDetail.deviceType==1" >
  53. <p>充电SOC</p>
  54. <span>
  55. {{chargeDetail.startSoc}}%>{{chargeDetail.endSoc}}%
  56. </span>
  57. </view>
  58. <view class="details-row" v-if="false">
  59. <p>充电度数</p>
  60. <span>{{chargeDetail.electricQuantity != null ? chargeDetail.electricQuantity/10000 : '0.000'}}度</span>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="details">
  65. <view class="details-title">
  66. <h4 class="oldTextjp20px" oldstyle="font-size: 20px;">费用信息</h4>
  67. </view>
  68. <view class="oldTextjp18px" oldstyle="font-size: 18px;">
  69. <view class="details-row">
  70. <p>订单总额</p><span>{{chargeDetail.dueFee != null ? chargeDetail.dueFee.toFixed(2) : '0.00'}}元</span>
  71. </view>
  72. <view class="details-row">
  73. <p>电费</p>
  74. <span>{{chargeDetail.totalElecMoney != null ? chargeDetail.totalElecMoney.toFixed(2) : '0.00'}}元</span>
  75. </view>
  76. <view class="details-row">
  77. <p>服务费</p>
  78. <span>{{chargeDetail.totalServiceMoney != null ? chargeDetail.totalServiceMoney.toFixed(2) : '0.00'}}元</span>
  79. </view>
  80. <view class="details-row"
  81. v-if="chargeDetail.serviceDiscountRatio&&chargeDetail.serviceDiscountRatio!=100">
  82. <p>折前服务费</p>
  83. <span>{{(chargeDetail.dueServiceMoney?chargeDetail.dueServiceMoney:0).toFixed(2)}}元</span>
  84. </view>
  85. <view class="details-row"
  86. v-if="chargeDetail.realityServiceDiscountRatio&&chargeDetail.realityServiceDiscountRatio!=100">
  87. <p>服务费折扣</p><span style="color:#ef7041">{{discountRatio10(chargeDetail.realityServiceDiscountRatio)}}折</span>
  88. </view>
  89. <view class="details-row"
  90. v-else-if="chargeDetail.serviceDiscountRatio&&chargeDetail.serviceDiscountRatio!=100">
  91. <p>服务费折扣</p><span style="color:#ef7041">{{discountRatio10(chargeDetail.serviceDiscountRatio)}}折</span>
  92. </view>
  93. <view class="details-row">
  94. <p>优惠券抵扣</p><span style="color:#ef7041">
  95. {{userCouponObj&&userCouponObj.useText?(userCouponObj.useText=='服务费0折'?'免服务费':userCouponObj.useText):'未使用'}}
  96. </span>
  97. </view>
  98. <view class="details-row" v-if="chargeDetail.userCardId">
  99. <p>会员活动</p><span style="color:#ef7041">折扣卡</span>
  100. </view>
  101. <view class="details-row" v-if="chargeDetail.discountAmount">
  102. <p>实际减免</p><span style="color:#ef7041">-{{chargeDetail.discountAmount.toFixed(2)}}元</span>
  103. </view>
  104. <view class="details-row">
  105. <p>实付款</p>
  106. <span style="color:#ef7041;font-size: 20px;" ><b>{{chargeDetail.actualFee != null ? chargeDetail.actualFee.toFixed(2) : '0.00'}}元</b></span>
  107. </view>
  108. <view class="details-row">
  109. <p>支付方式</p>
  110. <span ><b>{{chargeDetail.payTypeText}}</b></span>
  111. </view>
  112. <view class="details-row" v-if="chargeDetail.payType==1">
  113. <p>预付款</p>
  114. <span ><b>{{chargeDetail.estimateFee != null ? chargeDetail. estimateFee.toFixed(2) : '0.00'}}元</b></span>
  115. </view>
  116. <view class="details-row" v-if="chargeDetail.payType==1">
  117. <p>预付款自动退款</p>
  118. <span ><b>{{chargeDetail.estimateFee != null ? (chargeDetail.estimateFee -chargeDetail. actualFee).toFixed(2) : '0.00'}}元</b></span>
  119. </view>
  120. <view class="details-row" v-if="chargeDetail.payType==2||chargeDetail.payType==3">
  121. <p>余额</p>
  122. <span ><b>{{chargeDetail. balance != null ? chargeDetail. balance.toFixed(2) : '0.00'}}元</b></span>
  123. </view>
  124. </view>
  125. </view>
  126. <!-- 优惠券2 -->
  127. <view v-if="0&&chargeDetail.carNumber" class="details" >
  128. <view class="details-title">
  129. <h4 class="oldTextjp20px" oldstyle="font-size: 20px;">充电免费停车优惠券</h4>
  130. </view>
  131. <view class="oldTextjp18px" oldstyle="font-size: 18px;">
  132. <view class="details-row">
  133. <view>1.优惠券时长为:充电时间+30分钟
  134. <view style="margin-top: 8rpx;">2.充电时填写车牌号生效</view>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. <view class="piccBanner"
  140. v-for="(itemJNT,index ) in bannerListJNT" v-show="index==0"
  141. @click="gotoUrl2(itemJNT.linkUrl)" :key="index"
  142. style="
  143. text-align: center;
  144. padding: 0px 16px;">
  145. <image :src="itemJNT.picUrl" style="height: 204rpx;width: 100%;border-radius: 10px;" ></image>
  146. </view>
  147. <view class="details" :style="(!electricRecordListBl?'margin-bottom: 60px;':'')+(!remarkBl?'padding: 40rpx 40rpx 0 40rpx;':'')">
  148. <view class="details-title">
  149. <h4 class="oldTextjp20px" @click="remarkBl=!remarkBl" >充电信息
  150. <span style="float: right;">
  151. <u-icon name="arrow-up" v-show="remarkBl" ></u-icon>
  152. <u-icon name="arrow-down" v-show="!remarkBl" ></u-icon>
  153. </span>
  154. </h4>
  155. </view>
  156. <view class="oldTextjp18px" v-show="remarkBl">
  157. <view class="details-row">
  158. <p>结束原因</p><span>{{chargeDetail.remark}}</span>
  159. </view>
  160. <view class="details-row">
  161. <p>订单状态</p><span>{{chargeDetail.statusText}}</span>
  162. </view>
  163. <view class="details-row" v-if="false">
  164. <p>更新时间</p><span>{{chargeDetail.updateTime}}</span>
  165. </view>
  166. <view class="details-row">
  167. <p>充电站点</p><span>{{chargeDetail.stationName}}</span>
  168. </view>
  169. <view class="details-row">
  170. <p>充电桩编号</p><span>{{chargeDetail.deviceName}}</span>
  171. </view>
  172. <view class="details-row">
  173. <p>充电车辆</p><span>{{chargeDetail.carNumber}}</span>
  174. </view>
  175. </view>
  176. <view v-show="remarkBl" style=" border-top: dashed 1px #777; margin-top: 10px;">
  177. <view class="details-row"><p>开始时间</p><span style="color:#777777">{{chargeDetail.startTime}}</span></view>
  178. <view class="details-row"><p>结束时间</p><span style="color:#777777">{{chargeDetail.endTime}}</span></view>
  179. </view>
  180. <view class="chargeDetailsClass" v-show="remarkBl" style=" border-top: dashed 1px #777; margin-top: 10px;" v-if="chargeDetails.length">
  181. <view v-for="(item,i) in chargeDetails" :key="i" >
  182. <view class="details-row" style=" margin-top: 18px;" >
  183. <p>区间充电量({{item.startTime}}-{{item.endTime}})</p>
  184. <span v-if="item.fixKwh&&item.kwh" >{{(item.kwh+item.fixKwh).toFixed(2) }}度</span>
  185. <span v-else >{{item.kwh }}度</span>
  186. </view>
  187. <view class="details-row" style="display: block;" >
  188. <p>
  189. <span style=" color: #37393c;">区间定价</span>
  190. <span style="float: right; color: #333;font-weight: normal;" v-if="item.discountServicePrice||item.discountServicePrice==0" >{{((item.electricityPrice*100+item.discountServicePrice*100)/100).toFixed(2)}}元/度 <span style="text-decoration:line-through;margin-left: 3px;">{{((item.electricityPrice*100+item.servicePrice*100)/100).toFixed(2)}}元/度</span></span>
  191. <span style="float: right; color: #333;font-weight: normal;" v-else >{{((item.electricityPrice*100+item.servicePrice*100)/100).toFixed(2)}}元/度</span>
  192. </p>
  193. <view class="details-row-grey">
  194. <view class="details-row-grey-row">
  195. <span>电费</span>
  196. <span class="details-row-grey-span" >{{item.electricityPrice.toFixed(2)}}元/度</span>
  197. </view>
  198. <template v-if="item.discountServicePrice||item.discountServicePrice==0" >
  199. <view class="details-row-grey-row">
  200. <span>充电服务费</span>
  201. <span class="details-row-grey-span" >{{item.discountServicePrice.toFixed(2)}}元/度</span>
  202. </view>
  203. <view class="details-row-grey-row">
  204. <span>折前服务费</span>
  205. <span class="details-row-grey-span details-row-grey-span2" >{{item.servicePrice.toFixed(2)}}元/度</span>
  206. </view>
  207. </template>
  208. <template v-else >
  209. <view class="details-row-grey-row">
  210. <span>充电服务费</span>
  211. <span class="details-row-grey-span" >{{item.servicePrice.toFixed(2)}}元/度</span>
  212. </view>
  213. </template>
  214. </view>
  215. <!-- <span class="details-row-sum" style="float:none" v-if="item.discountServicePrice||item.discountServicePrice==0" >电费{{item.electricityPrice.toFixed(2)}}元/度|服务费{{item.discountServicePrice.toFixed(2)}}元/度(折前{{item.servicePrice.toFixed(2)}}元/度) </span>
  216. <span class="details-row-sum" v-else >{{item.electricityPrice.toFixed(2)}}元/度(电费)+{{item.servicePrice.toFixed(2)}}元/度(服务费) </span>
  217. -->
  218. </view>
  219. </view>
  220. </view>
  221. </view>
  222. <view class="details" style="padding: 20rpx;margin-bottom: 60px;" v-show="electricRecordListBl">
  223. <view id="pieEcharts" style="min-height:180px;">
  224. </view>
  225. <view style="color:#9e9e9e;margin-top: 4px;">注:充电时间每5分钟获取一次数据</view>
  226. </view>
  227. <view class="buttonClass" >
  228. <u-button size="medium" class="detailsBtn-btn " :customStyle="customStyle" type="info" shape="circle"
  229. @click="openModalBl=true">
  230. <view class="iconfont ">
  231. &#xe60d;
  232. </view>
  233. 联系客服</u-button>
  234. <u-button class="detailsBtn-btn " size="medium" type="success" shape="circle"
  235. @click="gotoUrl('pages/user/message')">填写反馈意见</u-button>
  236. </view>
  237. </view>
  238. </template>
  239. <script>
  240. import * as API from '@/apis/index.js'
  241. import * as echarts from "echarts";
  242. import * as newsApi from '@/apis/news.js'
  243. import {
  244. newDate,
  245. currentTimeStamp,
  246. parseUnixTime,
  247. secondsDistance,
  248. } from '@/utils'
  249. export default {
  250. data() {
  251. return {
  252. id: '',
  253. remarkBl:false,
  254. myChart: null,
  255. electricRecordList: [],
  256. chargeDetail: {},
  257. chargeDetails:[],
  258. bannerListJNT:[],
  259. bannerListYXJ:[],
  260. userCouponObj: {},
  261. electricRecordListBl: true,
  262. elderStatus: false,
  263. consumerPhone: "",
  264. openModalBl: false,
  265. customStyle:{
  266. color: '#00B962'
  267. },
  268. payList: [{},
  269. {
  270. name: "先付后退",
  271. tips: "游客不享受平台优惠活动",
  272. value: "1",
  273. select: false,
  274. }, {
  275. name: "个人账户支付",
  276. tips: "可使用折扣卡、优惠券、折扣卷等",
  277. value: "2",
  278. select: false,
  279. }, {
  280. name: "单位账户支付",
  281. tips: "账户余额:99999元",
  282. value: "3",
  283. select: false,
  284. }, {
  285. name: "充电金",
  286. tips: "账户余额:99999元",
  287. value: "4",
  288. select: false,
  289. }, {
  290. name: "充电金",
  291. tips: "账户余额:99999元",
  292. value: "4",
  293. select: false,
  294. }],
  295. }
  296. },
  297. onLoad(op) {
  298. if (op.id) {
  299. this.id = op.id;
  300. this.getchargingDetail();
  301. }
  302. if (this.carhelp.get("getElderModeClass") == "长辈模式") {
  303. this.elderStatus = true;
  304. } else {
  305. this.elderStatus = false;
  306. }
  307. var consumerPhone = "400-8899-619"
  308. // img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
  309. if (consumerPhone) {
  310. this.consumerPhone = consumerPhone
  311. }
  312. this.getBannerInfo("JNT-list-end","bannerListJNT");
  313. this.getBannerInfo("YXJ-list-end","bannerListYXJ");
  314. },
  315. methods: {
  316. getBannerInfo(code,list) {
  317. newsApi.getBannerInfo(code).then((res) => {
  318. if(list){
  319. this[list] = res.data;
  320. }else{
  321. this.bannerList = res.data;
  322. }
  323. //uni.hideLoading()
  324. //document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 120px;"
  325. }).catch(error => {
  326. uni.showToast({
  327. title: error,
  328. icon: "none"
  329. })
  330. })
  331. },
  332. confirmPhoneBl() {
  333. this.openModalBl = false;
  334. uni.makePhoneCall({
  335. phoneNumber: this.consumerPhone //仅为示例
  336. });
  337. },
  338. getday(time) {
  339. if(time){
  340. return time.substring(0, 10);
  341. }else {
  342. return ''
  343. }
  344. },
  345. geth1(time) {
  346. if (time) {
  347. return time.substring(11)
  348. } else
  349. return ''
  350. },
  351. geth(time) {
  352. if (time) {
  353. return time.substring(11, 16)
  354. } else
  355. return ''
  356. },
  357. getPercent(chargingRecord) {
  358. if (!chargingRecord.startTime) {
  359. return '00:00:00'
  360. }
  361. var Hour = 0;
  362. var Fen = 0;
  363. var S = 0;
  364. var now = newDate(chargingRecord.startTime).getTime();
  365. var date = newDate(chargingRecord.endTime).getTime();
  366. var seconds = parseInt(( date-now ) / 1000);
  367. var ms = seconds;
  368. Hour = parseInt(Math.floor(ms / (60 * 60)));
  369. Fen = parseInt(Math.floor(ms % (60 * 60) / 60));
  370. S = parseInt(Math.floor(ms % (60)));
  371. var obj = (Hour > 9 ? "" : "0") + Hour + ":" + (Fen > 9 ? "" : "0") + Fen + ":" + (S > 9 ? "" : "0") + S
  372. return obj;
  373. },
  374. toHome() {
  375. uni.navigateTo({
  376. url: '/pages/index/index'
  377. })
  378. },
  379. getPie(data) {
  380. if (!this.myChart) {
  381. this.myChart = echarts.init(document.getElementById('pieEcharts'));
  382. // this.myChart.on("dataZoom", (res) => {
  383. // showkey = "";
  384. // this.headitemby = "";
  385. // });
  386. }
  387. var timeList = []
  388. var seriesList1 = []
  389. var seriesList2 = []
  390. var seriesList3 = []
  391. //var sz2 = ['soc', 'power', 'ampere', 'voltage','temperature'];
  392. console.log(data)
  393. var dataInterval = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
  394. for (var i in data) {
  395. var item = data[i]
  396. timeList.push(this.geth(item.recordTime));
  397. seriesList1.push(item.soc ? item.soc : '')
  398. seriesList2.push(item.power ? (item.power / 1000).toFixed(1) : '')
  399. //seriesList3.push(item.temperature?item.temperature:0)
  400. seriesList3.push(item.temperature ? item.temperature : '')
  401. }
  402. var spaceNum = 5
  403. let maxA = Math.max(...seriesList2); // 最大值A
  404. let maxint = Math.ceil(maxA / spaceNum); //最大平均值(向上取整)= 最大值A / 间隔数
  405. let maxB = maxint * spaceNum; // 最大值B = 最大平均值 * 间隔数 (注:最大值B>最大值A)
  406. var max = Math.max(maxB, 10); // 为了防止maxB数据为0时,Y轴不显示,给个默认最大值10
  407. var interval = max / spaceNum;
  408. const colors = ['#ea9832', '#429fc8', '#b13331'];
  409. var option = {
  410. color: colors,
  411. tooltip: {
  412. formatter: (value) => {
  413. console.log(value)
  414. var name = value[0].axisValue;
  415. var style = "float: right;margin-left: 3px;"
  416. var text1 = ""
  417. var ulist = ['%', 'kW', '℃', '', '', '']
  418. for (var i in value) {
  419. var u = ulist[i];
  420. if (value[i].data == '') {
  421. continue
  422. }
  423. text1 += "<p>" + value[i].marker + value[i].seriesName + '<span style="' + style +
  424. '">' + value[i].data + u + '</span></p>';
  425. }
  426. return `<p>${name}</p>` + text1
  427. },
  428. trigger: 'axis',
  429. },
  430. grid: {
  431. top:'24%',
  432. left: '8%',
  433. right: '10%',
  434. bottom: '10%',
  435. // containLabel: true
  436. },
  437. legend: {
  438. data: ['SOC', '功率', '温度']
  439. },
  440. xAxis: [{
  441. type: 'category',
  442. axisTick: {
  443. alignWithLabel: true
  444. },
  445. splitNumber: 2,
  446. // prettier-ignore
  447. data: timeList
  448. }],
  449. yAxis: [{
  450. type: 'value',
  451. name: '℃/SOC',
  452. //data: [0,10,20,30,40,50,60,70,80,90,100],
  453. max: 100,
  454. min: 0,
  455. minInterval: 10,
  456. position: 'right',
  457. alignTicks: true,
  458. axisLine: {
  459. show: true,
  460. lineStyle: {
  461. color: colors[0]
  462. }
  463. },
  464. axisLabel: {
  465. formatter: '{value}'
  466. }
  467. },
  468. {
  469. type: 'value',
  470. name: 'kW',
  471. position: 'left',
  472. alignTicks: true,
  473. interval: interval,
  474. max: max,
  475. min: 0,
  476. axisLine: {
  477. show: true,
  478. lineStyle: {
  479. color: colors[1]
  480. }
  481. },
  482. axisLabel: {
  483. formatter: '{value}'
  484. }
  485. }
  486. ],
  487. series: [{
  488. name: 'SOC',
  489. type: 'line',
  490. symbolSize: 3,
  491. data: seriesList1
  492. },
  493. {
  494. name: '功率',
  495. type: 'line',
  496. symbolSize: 3,
  497. yAxisIndex: 1,
  498. data: seriesList2
  499. },
  500. {
  501. name: '温度',
  502. type: 'line',
  503. symbolSize: 3,
  504. yAxisIndex: 0,
  505. data: seriesList3
  506. }
  507. ]
  508. };
  509. console.log(option)
  510. this.myChart.setOption(option);
  511. },
  512. getchargingDetail() {
  513. uni.showLoading({
  514. title: "加载中",
  515. mask: true,
  516. })
  517. API.chargingDetail(this.id).then((res) => {
  518. uni.hideLoading();
  519. this.chargeDetail = res.data.chargingRecord;
  520. if(this.chargeDetail.chargeDetails){
  521. this.chargeDetails=JSON.parse(this.chargeDetail.chargeDetails)
  522. }
  523. this.userCouponObj = res.data.userCoupon;
  524. this.electricRecordList = res.data.electricRecordList
  525. if (res.data.electricRecordList && res.data.electricRecordList.length) {
  526. this.getPie(res.data.electricRecordList);
  527. } else {
  528. this.electricRecordListBl = false
  529. }
  530. }).catch(error => {
  531. uni.showToast({
  532. title: error,
  533. icon: "none"
  534. })
  535. })
  536. }
  537. }
  538. }
  539. </script>
  540. <style>
  541. page {
  542. background-color: #F7F7F7;
  543. }
  544. </style>
  545. <style lang="scss" scoped>
  546. .details-row-grey{
  547. background-color: rgba(245, 245, 245, 1);
  548. border-radius: 8px;
  549. padding: 20rpx 36rpx;
  550. margin-top:16rpx ;
  551. .details-row-grey-row{
  552. margin-top:4rpx ;
  553. .details-row-grey-span{
  554. float: right;
  555. }
  556. .details-row-grey-span2{
  557. text-decoration: line-through;
  558. }
  559. }
  560. }
  561. .slogan-4 {
  562. margin-top: 10px;
  563. display: flex;
  564. /* text-decoration: underline; */
  565. z-index: 999;
  566. text-align: center;
  567. position: fixed;
  568. /* top: 40px; */
  569. bottom: 180px;
  570. right: 20px;
  571. line-height: 20px;
  572. font-size: 16px;
  573. //background: linear-gradient(95deg, #FF9800, #FF5722);
  574. //box-shadow: 0 4rpx 24rpx 0 #FF5722;
  575. //padding-top: 8px;
  576. color: #fff;
  577. border-radius: 25px;
  578. flex-direction: column;
  579. align-items: flex-end;
  580. img{
  581. //height: 160rpx;
  582. width: 144rpx;
  583. }
  584. }
  585. .time-head {
  586. background: linear-gradient(180deg, rgba(0, 185, 98, 1) 0%, rgba(246, 248, 248, 1) 240px);
  587. padding-bottom: 20px;
  588. }
  589. .details-time {
  590. background: linear-gradient(180deg, #b7ebcf 0%, rgba(255, 255, 255, 1) 33%);
  591. .time {
  592. display: flex;
  593. justify-content: space-between;
  594. //border-bottom: 1px solid #E8E8E8;
  595. white-space: pre;
  596. .time1 {
  597. .time13 {
  598. font-size: 28rpx;
  599. font-weight: bold;
  600. }
  601. .time11 {
  602. font-size: 24rpx;
  603. }
  604. .time12 {
  605. font-size: 36rpx;
  606. color: rgba(0, 185, 98, 1);
  607. margin: 4rpx 0;
  608. font-weight: bold;
  609. text-align: center;
  610. }
  611. }
  612. .time2 {
  613. color: #B8B8B8;
  614. width: 90%;
  615. // align-items: center;
  616. // display: flex;
  617. // justify-content: space-between;
  618. display: flex;
  619. flex-direction: column;
  620. justify-content: center;
  621. align-items: center;
  622. .time21 {
  623. //border: 1px solid #B8B8B8;
  624. //border-radius: 100rpx;
  625. // line-height: 46rpx;
  626. // height: 48rpx;
  627. // width: 48rpx;
  628. color: rgba(51, 51, 51, 1);
  629. font-size: 28rpx;
  630. text-align: center;
  631. }
  632. .time22 {
  633. width: 80%;
  634. border-top: 1px solid #CFCFCF;
  635. }
  636. }
  637. }
  638. }
  639. .oldTextClassF {
  640. .oldTextjp18px {
  641. font-size: 36rpx !important;
  642. }
  643. .oldTextjp20px {
  644. font-size: 40rpx !important;
  645. }
  646. }
  647. .detailsBtn {
  648. margin: 16px;
  649. .detailsBtn-btn {
  650. border-color: #00B962 !important;
  651. border-radius: 8px !important;
  652. background: none !important;
  653. color: #00B962 !important;
  654. }
  655. }
  656. .details-title {
  657. margin-bottom: 16px;
  658. h4 {
  659. font-weight: bold;
  660. font-size: 16px;
  661. position: relative;
  662. padding-left: 10px;
  663. &::after {
  664. content: '';
  665. position: absolute;
  666. height: 12px;
  667. width: 4px;
  668. background-color: #27B148;
  669. left: 0;
  670. top: 5px;
  671. }
  672. }
  673. }
  674. .details-row {
  675. display: flex;
  676. justify-content: space-between;
  677. align-items: center;
  678. margin-top: 10px;
  679. p {
  680. color: #333;
  681. //width: 180rpx;
  682. min-width: 80px;
  683. }
  684. span {
  685. color: #101010;
  686. font-weight: bold;
  687. }
  688. }
  689. .chargeDetailsClass{
  690. span {
  691. color: rgb(51, 51, 51);
  692. font-weight: normal;
  693. }
  694. .details-row-sum{
  695. float: right;
  696. color: #888;
  697. font-size: 24rpx;
  698. }
  699. }
  700. .details,
  701. .details-time {
  702. margin: 32rpx;
  703. padding: 40rpx;
  704. background-color: #fff;
  705. border-radius: 8px;
  706. box-shadow: 0px 2px 6px 0px #00b96226;
  707. border: 1px solid rgba(255, 255, 255, 1);
  708. .details-head {
  709. display: flex;
  710. align-items: center;
  711. justify-content: center;
  712. h4 {
  713. font-size: 18px;
  714. font-weight: normal;
  715. margin-left: 4px;
  716. }
  717. }
  718. .details-price {
  719. margin-top: 28px;
  720. display: flex;
  721. align-items: flex-end;
  722. justify-content: center;
  723. h3 {
  724. font-size: 36px;
  725. color: #FF6200;
  726. line-height: 36px;
  727. margin: 0 4px;
  728. font-weight: normal;
  729. }
  730. span {
  731. font-size: 20px;
  732. color: #FF6200;
  733. }
  734. }
  735. .details-main {
  736. text-align: center;
  737. margin-bottom: 20px;
  738. p {
  739. color: #777;
  740. margin-top: 4px;
  741. }
  742. }
  743. }
  744. .qr-code {
  745. font-size: 24px;
  746. color: #666666;
  747. // position: absolute;
  748. right: 16px;
  749. }
  750. .buttonClass{
  751. display: flex;
  752. text-align: center;
  753. position: fixed;
  754. bottom: 0px;
  755. width: 100%;
  756. background: #fff;
  757. padding: 10px 0;
  758. .detailsBtn-btn{
  759. // margin:0 32rpx;
  760. }
  761. }
  762. </style>