HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.2.20
System: Linux 825a8fd6cf8c 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User: apache (48)
PHP: 8.2.20
Disabled: NONE
Upload Files
File: /var/www/html/public/static/js/hookBooking-70d59f25.js
import{bookingOrderListWeb as Je,DeliverAction as Qe,bookingCheckIn as Ue,getHealthFormDataWeb as Xe,submitHealthFormModelWeb as Ze,getBookingMonthDaysWeb as et,bookingOrderWeb as tt,bookingSchduleWeb as it,bookingPaymentWeb as at,bookingCancelledWeb as nt,getTherapistListBookingWeb as ot,getBalanceTimesWeb as st}from"./po-e92ee608.js";import{d as ct,u as rt}from"./vue-router-a383d220.js";import{b7 as s}from"./message-2472a54a.js";import{o as j}from"./index-81e4a901.js";import{r as a,A as n,o as dt}from"./runtime-core.esm-bundler-6128546f.js";import"./index-cdc44ec6.js";import"./preload-helper-78dc9057.js";import"./vue-i18n.runtime.esm-bundler-6949bcab.js";import"./index-b7f916e1.js";import"./_commonjsHelpers-87174ba5.js";import"./utils-2ab4f76a.js";import"./focus-trap-53f1c6ab.js";import"./error-78e43d3e.js";function Ct(M){const{query:I,params:lt}=ct(),q=rt(),u=a(!1),_=a(!1),w=a(!1),v=a(!1),x=a(!1),A=a(!1),W=a(!1),m=a(!1),y=a(!1),O=a(!1),E=a(!0),b=a([]),K=a([]),B=a([]),D=a([]),L=a([]),z=a(!1),F=a(""),N=a([]),k=a([]),f=a([]),g=a([]),S=a([]),H=n({}),R=n({});n({}),n({});const i=n({loacation_id:"",loacation_name:"",Client_name:"",Client_id:"",date:"",time:"",service_name:"",Therapist_name:"",Therapist_id:"",comment:"",During:60,gender:-1,description:"",service_times:"",config_id:"",dateInfo:"",Terapist:""}),$=n({destination_comp:"",state:"",city:"",address:"",phone:"",contact:"",customer_id:""}),p=n({userId:"",bookingorder_id:""}),C=n({name:"",id:""}),T=n({name:"",id:""}),Y=a([{id:2,text:"New",value:"new",is_selected:1},{id:3,text:"Check In",value:"check_in",is_selected:1},{id:4,text:"Invoice",value:"invoice",is_selected:1},{id:5,text:"Email",value:"email",is_selected:1}]),V=a([{id:1,name:"Massage",value:"Massage",is_Selected:1},{id:2,name:"Acupuncture",value:"Acupuncture",is_Selected:0}]),G=a([{id:1,text:"Male",value:1,is_selected:0},{id:2,text:"Female",value:2,is_selected:0},{id:3,text:"Both",value:0,is_selected:0}]),J=n({}),Q=n({}),U=n({}),X=n({}),Z=n({}),ee=n({});n({});const te=n({}),ie=n({}),ae=n({}),ne=n({});n({}),n({});const d=n({qo_item_str:"",name:"",address:"",way:"",shipping:[],itemsDetail:[],trackingNo:"",courier:"",comment:""}),l=n({total:0,pageSize:10,currentPage:1,background:!0,pageSizes:[10,25,50,100]}),oe=a([{id:1,text:"Current",value:"current"},{id:2,text:"Today",value:"today"},{id:3,text:"Yesterday",value:"yesterday"},{id:4,text:"Tomorrow",value:"tomorrow"},{id:5,text:"All",value:"all"}]),se=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"Index",type:"index",width:70,hide:({checkList:e})=>!e.includes("Index")},{label:"Clinic",prop:"clinic_name",minWidth:100,hide:({checkList:e})=>!e.includes("Clinic")},{label:"Therapist",prop:"Therapists_name",minWidth:100,hide:({checkList:e})=>!e.includes("Therapist")},{label:"Name",slot:"Name",minWidth:100,hide:({checkList:e})=>!e.includes("Name")},{label:"Status",prop:"status",slot:"status",minWidth:100,hide:({checkList:e})=>!e.includes("Status")},{label:"time",prop:"create_time",minWidth:100,hide:({checkList:e})=>!e.includes("item")},{label:"Order#",prop:"booking_order_no",minWidth:100,hide:({checkList:e})=>!e.includes("Order#")},{label:"Service",prop:"description_type",minWidth:150,hide:({checkList:e})=>!e.includes("Service")},{label:"Session",prop:"session_show",minWidth:150,hide:({checkList:e})=>!e.includes("Session")},{label:"Room",prop:"room",minWidth:120,hide:({checkList:e})=>!e.includes("Room")},{label:"Date",prop:"begin_time",minWidth:120,slot:"SeviceDate",hide:({checkList:e})=>!e.includes("Date")},{label:"Note",slot:"Note",minWidth:120,hide:({checkList:e})=>!e.includes("Note")},{label:"Invoice",slot:"Invoice",minWidth:120,hide:({checkList:e})=>!e.includes("Invoice")},{label:"Action",fixed:"right",width:250,slot:"operation",hide:({checkList:e})=>!e.includes("Action")}],ce=["Index","Order#","Clinic","Therapist","Name","Status","time","Order#","Service","Session","Room","Date","Note","Invoice","Action"],o=n({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",searchDate:"all",room:"",bookingorder_id:"",clinic_id:"",therapists_id:"",type:"",role:"client"});function re(){c()}function de(e){l.pageSize=e,c()}function le(e){l.currentPage=e,c()}async function c(){u.value=!0;const{data:e}=await Je(Object.assign(H,{pageSize:l.pageSize,page:l.currentPage,searchKey:o.searchKey,searchDate:o.searchDate,clinic_id:o.clinic_id,therapists_id:o.therapists_id,bindCustomerId:"",role:o.role,customer_id:M.customer_id}));N.value=e.date,l.total=e.total,u.value=!1}function ue(){c()}function me(e){d.qo_item_str="";const t=[];e.forEach((r,h)=>{t.push(r.qo_item_id)}),d.qo_item_str=t.toString()}async function fe(){const{data:e}=await Qe(Object.assign(J,{items:d.itemsDetail,shipping_address_id:d.address,customer_id:$.customer_id,trackingNo:d.trackingNo,deliverType:d.way,courier:d.courier,comment:d.comment}));e.code==1?(c(),W.value=!1,s({type:"success",message:e.msg})):s({type:"error",message:e.msg})}function ge(e){let t="";return e&&e.assocInfo&&e.assocInfo.note.length>0&&(t=e.assocInfo.note[0].id),t}function pe(e){let t="";return e&&e.assocInfo&&e.assocInfo.invoice.length>0&&(t=e.assocInfo.invoice[0].invoice_number),t}async function he(){if(o.room==""){s({type:"error",message:"Please fill in the room"});return}const{data:e}=await Ue(Object.assign(Q,{bookingorder_id:o.bookingorder_id,room:o.room}));e.code==1?(c(),_.value=!1,s({type:"success",message:e.msg})):s({type:"error",message:e.msg})}function _e(e){o.bookingorder_id=e.id,_.value=!0}async function ve(e){const{data:t}=await at(Object.assign(U,{bookingorder_id:e.id}));t.code==1?(c(),s({type:"success",message:t.msg})):s({type:"error",message:t.msg})}const ye=e=>{j.confirm("Are you sure to payment?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{ve(e)}).catch(()=>{s({type:"info",message:"Canceled"})})};async function be(e){const{data:t}=await nt(Object.assign(X,{bookingorder_id:e.id}));t.code==1?(c(),s({type:"success",message:t.msg})):s({type:"error",message:t.msg})}const De=e=>{j.confirm("Are you sure to cancel booking order?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{be(e)}).catch(()=>{s({type:"info",message:"Canceled"})})};async function ke(e){p.userId=e.id;const{data:t}=await Xe(Object.assign(Z,{customer_id:e.id}));t.code==1&&(S.value=t.model.health_info,b.value=t.model.information,m.value=!0)}function Se(e,t){t.is_selected==1?t.is_selected=0:t.is_selected==0&&(t.is_selected=1)}async function Ce(e){const t={information:b.value,health_info:S.value};u.value=!0;const{data:r}=await Ze(Object.assign(ee,{customer_id:p.userId,data_row:t}));r.code==1&&(s({type:"success",message:r.msg}),m.value=!1,u.value=!1)}async function P(){const{data:e}=await ot(Object.assign(R,{date:i.date}));e.code==1?g.value=e.data:g.value=[]}async function Te(){const{data:e}=await st(Object.assign(te,{Therapist_id:i.Therapist_id,date:i.date,sex:i.gender,Description:i.service_name}));e.code==1?(f.value=e.data[0].can_selected_time,i.config_id=e.data[0].id):(f.value=[],f.value.config_id="")}function Ie(){y.value=!0,P(),Pe()}function we(e,t){g.value.forEach((r,h)=>{r.isselect=0}),e.isselect=1,i.Therapist_id=e.value}function xe(){O.value=!0}function Ae(){i.loacation_name=T.name,i.loacation_id=T.id}function We(){i.Client_id=C.id,i.Client_name=C.name}function Oe(){x.value=!0}function Be(){A.value=!0}function Ne(e){const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),h=String(e.getDate()).padStart(2,"0"),Ge=`${t}-${r}-${h}`;return!D.value.includes(Ge)}async function Pe(){const{data:e}=await et(Object.assign(ie,{Therapist_id:i.Therapist_id,sex:i.gender,Description:i.service_name}));e.code==1&&(D.value=e.data.year_month_arr,m.value=!1)}function je(){i.date==""&&s({type:"error",message:"Please select date"})}function Me(){Te(),P()}function qe(){i.gender==-1&&i.Therapist_id==""&&s({type:"error",message:"please select therapist or gender"})}async function Ee(){const{data:e}=await tt(Object.assign(ae,{clinics_id:"",therapist_list:i.Therapist_id,description:i.description,service_date:i.date,service_times:i.service_times,first_name:"",last_name:"",phone:"",email:"",config_id:i.config_id,add_session:"",during:i.During,sex:i.gender,customer_id:i.Client_id,company_id:i.Client_name,Description_type:i.service_name}));e.code==1?(c(),y.value=!1):s({type:"error",message:e.msg})}function Ke(){q.push({path:"/crm/order/health",query:{note:1}})}async function Le(){v.value=!0;const{data:e}=await it(Object.assign(ne,{date:"2024-03-07"}));e.code==1&&(B.value=e.data.dataDetail,i.Terapist=e.data.Terapist[0].first_name+e.data.Terapist[0].last_name,v.value=!0)}function ze(){I.searchKey&&(o.searchKey=I.searchKey),c()}function Fe(e){if(k.value.length==1)return;e.is_Selected==1?e.is_Selected=0:e.is_Selected=1;const t=[];k.value.forEach((r,h)=>{r.is_Selected==1&&t.push(r.name)}),i.service_name=t.toString()}function He(e){e==null&&(o.clinic_id="")}function Re(e){e==null&&(o.therapists_id="")}function $e(e){e==null&&(o.searchDate="")}function Ye(e){p.bookingorder_id=e.id,w.value=!0}function Ve(){c()}return dt(()=>{o.type=localStorage.getItem("type"),o.type==2&&(o.clinic_id=localStorage.getItem("clinicIdOverall"),o.role="clinic"),o.type==1&&(o.therapists_id="",o.role="therapists"),ze()}),{searchDetail:o,btnSearchPart:re,loading:u,small:z,selectList:ce,columns:se,pagination:l,handleSizeChange:de,handleCurrentChange:le,PartList:N,order_date:F,deliverDialog:W,selectClick:me,deliverDataArr:d,btnDeliverConfirm:fe,expressCompanyData:oe,onSearchDate:ue,getNote:ge,getInvoice:pe,onCheckIn:_e,addDuringDialog:_,addDuringConfirm:he,onPaymant:ye,onCancel:De,onHealthForm:ke,infoData:b,healthDialog:m,health_info:S,onHealth:Se,btnHealthConfirm:Ce,AddBooking:Ie,addForm:i,addBookingDialog:y,serviceData:V,TherapistData:g,isData:G,selectedTr:we,onSelectLocation:xe,locationDialog:O,locationData:T,eventIsNumlocation:Ae,ClientDialog:x,eventIsNum:We,ClientData:C,onSelClient:Oe,goPrivacy:Be,PrivacyDialog:A,disabledWeekends:Ne,timeData:f,yearmontharr:D,onServiceTimes:je,serverDate:Me,btnServerDate:qe,btnAddConfirm:Ee,goHealth:Ke,BookingInfo:Le,BookingInfoDialog:v,BookingInfoData:B,dropdownVisible:E,addServiceData:k,onServiceAdd:Fe,Therapists:L,clinicData:K,onClinicData:He,onTherapists:Re,onExpressCompanyData:$e,onDetail:Ye,bookingDetailDialog1:w,formArr:p,onbKDetail:Ve,stulesShow:Y}}export{Ct as useEqu};