liujie
2026-09-14 82a8bc62d5b9d5d607f6952329952b17eda2f0a0
1
import{_ as e}from"./guide-nav-bar.Calsbdur.js";import{c as s,w as t,n as a,i,r,o as l,a as o,d as n,t as d,p as u,F as c,q as m,f as p,g as f}from"./index-sVD-BO6M.js";import{_ as h,r as g}from"./uni-app.es.Bk8oaKUr.js";import{o as v}from"./map.C_mmf2ly.js";import{a as _}from"./order.BlKTLeFT.js";import{r as b}from"./guide.CwypCyrH.js";import{b as T}from"./router.DrNfFJ-r.js";import{m as k,f as y}from"./format.DPVLuION.js";import"./system.CMm6Pfb4.js";const x=h({components:{GuideNavBar:e},data:()=>({orderId:"",order:null,isLeaving:!1}),computed:{detail(){if(!this.order)return null;const e=(this.order.customers||[]).map(e=>({...e,phone:k(e.phone||"")})),s=["arrived","serving","completed"].includes(this.order.status);return{serviceTitle:`${this.shortServiceName(this.order.serviceName)} ${y(this.order.durationMinutes||30)}`,scenicName:this.order.scenicShortName||this.order.scenicName||"青城山-前门",statusText:this.pageStatusText(this.order.status),statusClass:this.pageStatusClass(this.order.status),timeline:this.buildTimeline(this.order),showEarning:s,earningAmount:this.formatGuideEarning(this.order.earningAmount),customers:e}},meetingPointDetail(){return b(this.order||{})}},onLoad(e){this.orderId=e.id||"",this.loadOrder()},methods:{loadOrder(){_(this.orderId).then(e=>{this.order=e})},goBack(){this.isLeaving||(this.isLeaving=!0,setTimeout(()=>{T("/pages/orders/index")},280))},shortServiceName:e=>String(e||"精讲").replace("拼团 · ","").replace("包团 · ",""),pageStatusText:e=>({pending:"接单中",accepted:"接单中",arrived:"讲解中",serving:"讲解中",completed:"已完成",canceled:"已取消"}[e]||"接单中"),pageStatusClass:e=>["completed"].includes(e)?"status-completed":["arrived","serving"].includes(e)?"status-serving":"status-pending",buildTimeline(e){const s=[{label:"接单开始时间",value:e.receiveStartTime||e.createdAt||"2026-06-08 16:39:03"}];return["arrived","serving","completed"].includes(e.status)&&s.push({label:"讲解开始时间",value:e.lectureStartTime||e.createdAt||"2026-06-08 16:39:03"}),"completed"===e.status&&s.push({label:"讲解结束时间",value:e.lectureEndTime||e.completedAt||"2026-06-08 16:39:03"}),s},showMeetingPoint(){v(this.meetingPointDetail||this.order||{})},formatGuideEarning(e){if(null==e||""===e)return"-";const s=Number(e);return Number.isFinite(s)?s.toFixed(2):"-"}}},[["render",function(h,v,_,b,T,k){const y=g(r("guide-nav-bar"),e),x=i,N=p;return l(),s(x,{class:a(["order-detail-page",{leaving:T.isLeaving}])},{default:t(()=>[o(y,{title:"历史订单",onBack:k.goBack},null,8,["onBack"]),k.detail?(l(),s(x,{key:0,class:"detail-body"},{default:t(()=>[o(x,{class:"summary-section"},{default:t(()=>[o(x,{class:"summary-head"},{default:t(()=>[o(x,{class:"summary-left"},{default:t(()=>[o(x,{class:"service-line"},{default:t(()=>[n(d(k.detail.serviceTitle),1)]),_:1}),o(x,{class:a(["status-line",k.detail.statusClass])},{default:t(()=>[n(d(k.detail.statusText),1)]),_:1},8,["class"])]),_:1}),o(x,{class:"summary-right"},{default:t(()=>[o(x,{class:"scenic-name"},{default:t(()=>[n(d(k.detail.scenicName),1)]),_:1}),o(x,{class:"meeting-link",onClick:k.showMeetingPoint},{default:t(()=>[n("查看汇合点")]),_:1},8,["onClick"])]),_:1})]),_:1}),o(x,{class:"timeline-list"},{default:t(()=>[(l(!0),u(c,null,m(k.detail.timeline,e=>(l(),s(x,{key:e.label,class:"timeline-row"},{default:t(()=>[o(N,{class:"timeline-label"},{default:t(()=>[n(d(e.label),1)]),_:2},1024),o(N,{class:"timeline-value"},{default:t(()=>[n(d(e.value),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),o(x,{class:"customer-list"},{default:t(()=>[(l(!0),u(c,null,m(k.detail.customers,(e,i)=>(l(),s(x,{key:e.no,class:"customer-row"},{default:t(()=>[o(x,{class:a(["customer-no",`no-${e.no}`])},{default:t(()=>[n(d(e.no),1)]),_:2},1032,["class"]),o(x,{class:"customer-main"},{default:t(()=>[o(x,{class:"customer-phone"},{default:t(()=>[n(d(e.phone),1)]),_:2},1024),o(x,{class:"customer-people"},{default:t(()=>[n(d(e.people)+"人",1)]),_:2},1024)]),_:2},1024),o(x,{class:"customer-side"},{default:t(()=>[o(x,{class:"customer-time"},{default:t(()=>[n(d(e.time),1)]),_:2},1024),0===i&&k.detail.showEarning?(l(),s(x,{key:0,class:"customer-earning"},{default:t(()=>[n(" 收益 ¥"+d(k.detail.earningAmount),1)]),_:1})):f("",!0),e.resultText?(l(),s(x,{key:1,class:a(["customer-result",e.resultClass])},{default:t(()=>[n(d(e.resultText),1)]),_:2},1032,["class"])):f("",!0)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})):(l(),s(x,{key:1,class:"empty-state"},{default:t(()=>[n("订单不存在")]),_:1}))]),_:1},8,["class"])}],["__scopeId","data-v-2c66dca4"]]);export{x as default};