import{h as e,o as a,d as t,w as s,e as l,f as n,a as u,u as i,c as o,j as d,F as c,g as _,t as r,k as f,l as m,p,s as g}from"./index-4574ca9e.js";import{_ as v}from"./uni-datetime-picker.1dd0594b.js";import{_ as k,o as b,r as h}from"./uni-app.es.952bcabe.js";import{E as y,H as w}from"./index.eefdbc54.js";const C=k({__name:"CheckItemMainList",setup(k){let C=e({dateRange:["2021-05-01","2049-01-01"]}),M=e([]);const x=()=>{y({searchInfo:C.value}).then((e=>{console.log(e),e.status&&(M.value=e.data.list)}))},D=e=>{C.value.dateRange=e,x()},I=(e,a)=>{let t={do_type:e,appointment_type:2,regnum:a.reg_num,entrustid:[a.entrust_id],episodeid:a.episodeid};p({url:"/pages/PlanList?data="+encodeURIComponent(JSON.stringify(t))})};return b((()=>{var e=function(){var e=new Date;function a(e){return e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)}var t,s=a(e),l=a((t=e,new Date(t.getFullYear(),t.getMonth()-1,t.getDate()))),n=a(function(e){return new Date(e.getFullYear(),e.getMonth()+1,e.getDate())}(e));return{currentDate:s,previousMonth:l,nextMonth:n}}();C.value.dateRange=[e.previousMonth,e.nextMonth],x()})),(e,p)=>{const k=l,b=h(_("uni-datetime-picker"),v);return a(),t(k,{class:"CheckItemMain"},{default:s((()=>[n(k,{class:"head"}),n(k,{class:"userInfo"},{default:s((()=>[n(k,{class:"title"},{default:s((()=>[u("患者信息")])),_:1}),n(k,{class:"row"},{default:s((()=>[n(k,{class:"label"},{default:s((()=>[u("姓名：")])),_:1}),n(k,{class:"value"},{default:s((()=>[u("张三")])),_:1})])),_:1}),n(k,{class:"row"},{default:s((()=>[n(k,{class:"label"},{default:s((()=>[u("性别：")])),_:1}),n(k,{class:"value"},{default:s((()=>[u("女")])),_:1})])),_:1}),n(k,{class:"row"},{default:s((()=>[n(k,{class:"label"},{default:s((()=>[u("手机号：")])),_:1}),n(k,{class:"value"},{default:s((()=>[u("99999")])),_:1})])),_:1}),n(k,{class:"row"},{default:s((()=>[n(k,{class:"label"},{default:s((()=>[u("注册号：")])),_:1}),n(k,{class:"value"},{default:s((()=>[u("99999")])),_:1})])),_:1}),n(k,{class:"date"},{default:s((()=>[n(k,{class:"datetime"},{default:s((()=>[n(b,{modelValue:i(C).dateRange,"onUpdate:modelValue":p[0]||(p[0]=e=>i(C).dateRange=e),type:"daterange",onChange:D},null,8,["modelValue"])])),_:1})])),_:1})])),_:1}),i(M).length>0?(a(),t(k,{key:0,class:"list"},{default:s((()=>[(a(!0),o(c,null,d(i(M),((e,l)=>(a(),t(k,{class:"info"},{default:s((()=>[n(k,{class:"item_title"},{default:s((()=>[u("检查项目："+r(e.entrust),1)])),_:2},1024),n(k,{class:"item_info"},{default:s((()=>[n(k,null,{default:s((()=>[u("医嘱时间："),f("span",{class:"item_value"},r(e.entrust_date),1)])),_:2},1024),n(k,null,{default:s((()=>[u("申请科室："),f("span",{class:"item_value"},r(e.reservation_department),1)])),_:2},1024),n(k,null,{default:s((()=>[u("状态： "),0==e.list_status?(a(),o("span",{key:0,class:"item_value"},"待申请")):m("",!0),1==e.list_status?(a(),o("span",{key:1,class:"item_value"},"已预约")):m("",!0),2==e.list_status?(a(),o("span",{key:2,class:"item_value"},"已登记")):m("",!0),3==e.list_status?(a(),o("span",{key:3,class:"item_value"},"已完成")):m("",!0)])),_:2},1024),1==e.list_status?(a(),t(k,{key:0},{default:s((()=>[u("预约时段："),f("span",{class:"item_value"},r(e.reservation_date)+" "+r(e.period_begin_time.substring(0,5))+"~"+r(e.period_end_time.substring(0,5)),1)])),_:2},1024)):m("",!0),0==e.list_status?(a(),t(k,{key:1,class:"button_row"},{default:s((()=>[n(k,{class:"button",onClick:a=>I(1,e)},{default:s((()=>[u("预 约")])),_:2},1032,["onClick"])])),_:2},1024)):m("",!0),1==e.list_status?(a(),t(k,{key:2,class:"button_row"},{default:s((()=>[n(k,{class:"button red",onClick:a=>(e=>{g({cancelText:"取消",confirmText:"确定",title:"提示",content:"确定取消预约吗？",success:function(a){a.confirm&&w({MainListId:e.id}).then((e=>{console.log(e),e.status&&x()}))}})})(e)},{default:s((()=>[u("取 消")])),_:2},1032,["onClick"]),n(k,{class:"button blue",onClick:a=>I(2,e)},{default:s((()=>[u("改 约")])),_:2},1032,["onClick"])])),_:2},1024)):m("",!0)])),_:2},1024)])),_:2},1024)))),256))])),_:1})):(a(),t(k,{key:1,class:"nodata"},{default:s((()=>[u(" 暂无记录 ")])),_:1}))])),_:1})}}},[["__scopeId","data-v-8bb9b7a5"]]);export{C as default};
