import{g as a,b as t,d as e,p as s,e as l,o as u,c as i,f as n,i as c,h as o,x as r,l as d,m,F as v,k as f,j as _,n as p,v as y,t as k,q as g}from"./index-e69583df.js";import{_ as x,a as h}from"./_plugin-vue_export-helper.85faaf7d.js";import{o as b,a as j,b as C,c as w}from"./uni-app.es.89276228.js";import{m as L}from"./api.bd8559c2.js";import{i as I,f as S}from"./filterIdentity.81d9718c.js";import{S as T}from"./search.39602408.js";import"./bottom.64dd5779.js";const q=x({__name:"my",setup(x){b((()=>{I()?(S(),q.value=a("bus_card_number")):t({url:"/pages/404/404?message=请在微信客户端打开链接"})})),j((()=>{D.value=0,F.value=1,U.value=1,A.value=[],E()})),C((()=>{U.value=1,A.value=[],E(),setTimeout((function(){e()}),500)})),w((()=>{A.value.length<z.value?(U.value++,E()):s({title:"没有更多数据了",icon:"none"})}));const q=l(""),O=l([{text:"全部",value:0},{text:"预约成功",value:1},{text:"已乘车",value:2},{text:"候补中",value:3},{text:"已取消",value:4},{text:"已爽约",value:5},{text:"爽约已核销",value:6}]),B=l([{text:"全部",value:0},{text:"当天",value:1},{text:"本周",value:2},{text:"本月",value:3}]),D=l(0),F=l(1),H=l(5),U=l(1),z=l(null),A=l([]),E=async()=>{const a=await L({url:"/appqueryUserOrders.action",data:{result_state:D.value,date_state:F.value,card_number:q.value,rows:H.value,page:U.value}});z.value=a.data.totalCount,A.value=[...A.value,...a.data.list]},G=async a=>{const t=await L({url:"/appBoarding.action",data:{card_number:q.value,record_id:a}});t&&(s({title:t.message}),setTimeout((()=>{U.value=1,A.value=[],E()}),1500))},J=async a=>{const t=await L({url:"/appcancelOrder.action",data:{card_number:q.value,record_id:a}});t&&(s({title:t.message}),setTimeout((()=>{U.value=1,A.value=[],E()}),1500))},K=a=>{D.value=a.typeIndex,F.value=a.timeIndex-0+1,U.value=1,A.value=[],E()};return(a,t)=>{const e=c;return u(),i(e,{class:"container"},{default:n((()=>[o(r(T),{typeList:O.value,timeList:B.value,onHandLeConveyData:K},null,8,["typeList","timeList"]),(u(!0),d(v,null,m(A.value,((a,t)=>(u(),i(e,{class:"list",key:t},{default:n((()=>[o(e,{class:y(["list-title","南昌-靖安"===a.route?"type":"type2"])},{default:n((()=>[o(e,null,{default:n((()=>[_(k(a.route),1)])),_:2},1024),o(e,{class:y(["list-img",[1===a.state?"mr-30":"",{blue:"南昌-靖安"===a.route}]])},{default:n((()=>[1===a.state?(u(),i(e,{key:0,class:""},{default:n((()=>[_("预约成功")])),_:1})):p("",!0),2===a.state?(u(),i(e,{key:1,class:""},{default:n((()=>[_("已乘车")])),_:1})):p("",!0),3===a.state?(u(),i(e,{key:2,class:""},{default:n((()=>[_("候补中...")])),_:1})):p("",!0),4===a.state?(u(),i(e,{key:3,class:""},{default:n((()=>[_("已取消")])),_:1})):p("",!0),5===a.state?(u(),i(e,{key:4,class:""},{default:n((()=>[_("已爽约")])),_:1})):p("",!0),6===a.state?(u(),i(e,{key:5,class:""},{default:n((()=>[_("爽约已核销")])),_:1})):p("",!0)])),_:2},1032,["class"])])),_:2},1032,["class"]),o(e,{class:"list-info"},{default:n((()=>[o(e,{class:"list-info-item"},{default:n((()=>[f("span",null,"预约号："),_(" "+k(a.row_num.toString().padStart(2,"0")),1)])),_:2},1024),3!==a.state?(u(),i(e,{key:0,class:y(["list-info-item",1==a.state?"highlight":""])},{default:n((()=>[f("span",null,"车牌号："),_(" "+k(a.car_number),1)])),_:2},1032,["class"])):p("",!0),1===a.state||2===a.state?(u(),i(e,{key:1,class:"list-info-item"},{default:n((()=>[f("span",null,"容 量："),_(" "+k(a.contain)+"人 ",1)])),_:2},1024)):p("",!0),o(e,{class:"list-info-item"},{default:n((()=>[f("span",null,"站点："),_(" "+k(a.route_end),1)])),_:2},1024),1===a.state?(u(),i(e,{key:2,class:"list-info-item highlight"},{default:n((()=>[f("span",null,"发车时间："),_(" "+k(a.yy_date),1)])),_:2},1024)):p("",!0),1===a.state?(u(),i(e,{key:3,class:"list-info-item highlight"},{default:n((()=>[f("span",null,"扫码时间段："),_(" "+k(a.sm_time),1)])),_:2},1024)):p("",!0),o(e,{class:"list-info-item"},{default:n((()=>[f("span",null,"下单时间："),_(" "+k(a.yy_time),1)])),_:2},1024),1===a.state||2===a.state?(u(),i(e,{key:4,class:"list-info-item2"},{default:n((()=>[f("span",null,"变更信息："),_(" "+k(""!=a.remark?a.remark:"无"),1)])),_:2},1024)):p("",!0)])),_:2},1024),o(e,{class:"list-button"},{default:n((()=>[1===a.state&&6==a.contain?(u(),i(e,{key:0,class:"list-button-change",onClick:t=>{return e=a.id,void g({title:"提示",content:"确定已经上车吗？",success:a=>{a.confirm?G(e):a.cancel}});var e}},{default:n((()=>[_("我已上车")])),_:2},1032,["onClick"])):p("",!0),1===a.state||3===a.state?(u(),i(e,{key:1,class:"list-button-cancel",onClick:t=>{return e=a.id,void g({title:"提示",content:"确定取消预约吗？",success:a=>{a.confirm?J(e):a.cancel}});var e}},{default:n((()=>[_("取消预约")])),_:2},1032,["onClick"])):p("",!0)])),_:2},1024)])),_:2},1024)))),128)),0==A.value.length?(u(),i(e,{key:0,class:"list-nodata"},{default:n((()=>[f("img",{src:h}),o(e,null,{default:n((()=>[_("暂无数据")])),_:1})])),_:1})):p("",!0)])),_:1})}}},[["__scopeId","data-v-1056bea2"]]);export{q as default};
