2 lines
4.9 KiB
JavaScript
2 lines
4.9 KiB
JavaScript
"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js"),n=require("../../api/api.js"),i=require("../../utils/fun.js"),o=require("../../hooks/useNav.js");if(!Array){(e.resolveComponent("up-icon")+e.resolveComponent("up-swiper")+e.resolveComponent("orderList")+e.resolveComponent("up-tag")+e.resolveComponent("up-button")+e.resolveComponent("z-paging")+e.resolveComponent("up-popup"))()}Math||((()=>"../../uni_modules/uview-plus/components/u-icon/u-icon.js")+(()=>"../../uni_modules/uview-plus/components/u-swiper/u-swiper.js")+(()=>"../../components/orderList/orderList.js")+(()=>"../../uni_modules/uview-plus/components/u-tag/u-tag.js")+(()=>"../../uni_modules/uview-plus/components/u-button/u-button.js")+(()=>"../../uni_modules/z-paging/components/z-paging/z-paging.js")+(()=>"../../uni_modules/uview-plus/components/u-popup/u-popup.js"))();const u={__name:"detail",setup(u){const{nav:s,navTo:r}=o.useNav(),a=e.ref(!1),l=e.index.getSystemInfoSync().statusBarHeight+"px";let p=e.reactive({}),m=e.ref(!1);const c=e.ref([]),f=e.ref(null);let v=e.ref(!1);const d=e.computed((()=>{var e;return(null==(e=null==p?void 0:p.priceList)?void 0:e.find((e=>1==e.isCurrent)))||{}}));e.onLoad((e=>{g(e.id,e.distance)})),e.onPageScroll((t=>{t.scrollTop>e.index.getSystemInfoSync().statusBarHeight+44?a.value=!0:a.value=!1}));const g=async(e,t)=>{let i=await n.infoAroundApi({id:e});i.distance=t,Object.assign(p,i)};e.ref(["https://cdn.uviewui.com/uview/swiper/swiper3.png","https://cdn.uviewui.com/uview/swiper/swiper2.png","https://cdn.uviewui.com/uview/swiper/swiper1.png"]);let w=()=>{e.index.scanCode({success:function(t){let n=i.urlQuery(t.result);n.num?r(`/pages/home/star?id=${n.num}`):e.index.showToast({title:"请扫描正确的设备码",icon:"none"})}})};const h=()=>{e.index.navigateBack()},x=async()=>{n.listByStationId({stationId:p.id}).then((e=>{f.value.complete(e)})).catch((e=>{f.value.complete(!1)}))},y=()=>{m.value=!0,f.value.reload()};return(n,o)=>({a:l,b:e.o(h),c:e.p({name:"arrow-left",bold:!0,color:"#000"}),d:e.o(h),e:a.value?1:0,f:e.o((()=>{})),g:a.value?"#FFF":"",h:e.p({list:e.unref(p).pictures,height:"530rpx"}),i:e.p({info:{...e.unref(p),priceAmount:d.value.totalAmount},type:"info"}),j:e.p({color:"#333",size:"28rpx",name:"arrow-right"}),k:e.o((t=>e.isRef(v)?v.value=!0:v=!0)),l:e.p({size:"mini",text:`当前计费时间段:${d.value.startTime}-${d.value.endTime}`,plain:!0,plainFill:!0}),m:e.t(d.value.totalAmount),n:t._imports_0$4,o:e.t(e.unref(p).gunCount-e.unref(p).gunUseCount),p:e.t(e.unref(p).gunCount),q:e.p({color:"#fff",size:"28rpx",name:"arrow-right"}),r:e.o(y),s:e.t(e.unref(p).merchantName),t:t._imports_1$3,v:e.o((t=>e.unref(i.lookImg)([e.unref(p).licenseImage]))),w:e.t(e.unref(p).busineHours),x:e.o((t=>e.unref(i.lookImg)([e.unref(p).licenseImage]))),y:e.t(e.unref(p).invoice),z:e.t(e.unref(p).remarks||""),A:e.t(e.unref(p).stationTel),B:e.o((t=>e.unref(i.call)(e.unref(p).stationTel))),C:e.t(d.value.totalAmount),D:e.o(((...t)=>e.unref(w)&&e.unref(w)(...t))),E:t._imports_0$4,F:e.t(e.unref(p).gunCount-e.unref(p).gunUseCount),G:e.t(e.unref(p).gunCount),H:e.o((t=>e.isRef(m)?m.value=!0:m=!0)),I:e.f(c.value,((t,n,i)=>e.e({a:1==t.realtimeStatus},1==t.realtimeStatus?{b:"57f46e64-8-"+i+",57f46e64-7",c:e.p({size:"mini",type:"error",text:"故障",plain:!0,plainFill:!0})}:2==t.realtimeStatus?{e:"57f46e64-9-"+i+",57f46e64-7",f:e.p({size:"mini",type:"success",text:"空闲",plain:!0,plainFill:!0})}:3==t.realtimeStatus?{h:"57f46e64-10-"+i+",57f46e64-7",i:e.p({size:"mini",type:"warning",text:"充电中",plain:!0,plainFill:!0})}:{j:"57f46e64-11-"+i+",57f46e64-7",k:e.p({size:"mini",type:"error",text:"离线",plain:!0,plainFill:!0})},{d:2==t.realtimeStatus,g:3==t.realtimeStatus,l:1==t.insertStatus},1==t.insertStatus?{m:"57f46e64-12-"+i+",57f46e64-7",n:e.p({size:"mini",text:"已插枪",plain:!0,plainFill:!0})}:{},{o:e.t(t.gunName),p:e.t(t.deviceNo),q:e.t(t.maxPower),r:e.t(t.maxVoltage),s:2==t.realtimeStatus},2==t.realtimeStatus?{t:e.o((n=>(async t=>{e.index.navigateTo({url:"./star?id="+t.deviceGunNo})})(t)),n),v:"57f46e64-13-"+i+",57f46e64-7",w:e.p({shape:"circle",type:"success",plain:!0,text:"启动充电"})}:{},{x:1==t.realtimeStatus||0==t.realtimeStatus},1==t.realtimeStatus||0==t.realtimeStatus?{y:"57f46e64-14-"+i+",57f46e64-7",z:e.p({shape:"circle",type:"error",plain:!0,text:"报故障",openType:"contact"})}:{},{A:n}))),J:e.sr(f,"57f46e64-7,57f46e64-6",{k:"paging"}),K:e.o(x),L:e.o((e=>c.value=e)),M:e.p({fixed:!1,"loading-more-enabled":!1,height:"600rpx;",auto:!1,"show-refresher-when-reload":!0,modelValue:c.value}),N:e.o((t=>e.isRef(m)?m.value=!1:m=!1)),O:e.p({show:e.unref(m),closeable:!0,round:"10"}),P:e.f(e.unref(p).priceList,((t,n,i)=>e.e({a:1==t.isCurrent},(t.isCurrent,{}),{b:e.t(t.startTime),c:e.t(t.endTime),d:e.t(t.electricityRate),e:e.t(t.serviceFeeRate),f:e.t(t.totalAmount),g:n}))),Q:e.o((t=>e.isRef(v)?v.value=!1:v=!1)),R:e.p({show:e.unref(v),closeable:!0,round:"10"})})}},s=e._export_sfc(u,[["__scopeId","data-v-57f46e64"]]);u.__runtimeHooks=1,wx.createPage(s);
|