File: /var/www/html/public/static/js/hookClinic-1e9a544e.js
import{getClinicsListByTherapistWeb as Q,getClinicsTherapistDetailWeb as U,bookingPublicListWeb as V,ClinicServiceListWeb as X,addEditClinicsTherapistWeb as Z,deleteCompanyWeb as $}from"./po-dbdb2684.js";import{d as y,u as ee}from"./vue-router-a383d220.js";import{o as ie}from"./index-81e4a901.js";import{b7 as o}from"./message-2472a54a.js";import{r as t,A as s,o as te}from"./runtime-core.esm-bundler-6128546f.js";import"./index-f0216e7e.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 fe(){y(),ee(),y();const v=t(),c=t(!1),w=t(!1),l=t(!1),A=t(!1),C=t(!1),W=t(""),_=t([]),u=t([]),T=t([{id:1,text:"Male",value:1,is_selected:0},{id:2,text:"Female",value:2,is_selected:0}]),S=t([{id:1,value:"day",text:"Day",is_Selected:0},{id:2,value:"week",text:"Week",is_Selected:0},{id:3,value:"month",text:"Month",is_Selected:0},{id:4,value:"year",text:"Year",is_Selected:0}]),p=t([{id:1,text:"Mobile SMS",value:"message",is_selected:0},{id:2,text:"Email",value:"email",is_selected:0}]),h=t([]),r=t([]),b=t([]),n=s({clinic_id:"",is_mune:3,service_name:"",description:"",service_id:"",is_role:"",therapists_id:"",copy_date:"",userId:""}),a=s({email:"",FirstName:"",LastName:"",gender:"",phone:"",phone_code:"001",booking_notice_type:"message",userId:"",Therapists_id:"",is_role:"",is_manager:"",limit_times:"",time_frequen:"",split_rate:""}),k=s({}),x=s({tableIndex:0,note:""}),f=s({}),D=s({}),L=s({}),P=s({}),E=s({}),N=s({}),m=s({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),g=s({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:""}),B=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"Clinic Name",prop:"clinic_name",minWidth:100,hide:({checkList:e})=>!e.includes("Clinic Name")},{label:"Create name",prop:"hst",minWidth:100,slot:"Createname",hide:({checkList:e})=>!e.includes("Create name")},{label:"Address",prop:"address",minWidth:100,hide:({checkList:e})=>!e.includes("Address")},{label:"Clinic Web",prop:"clinic_web",minWidth:100,hide:({checkList:e})=>!e.includes("Clinic Web")},{label:"Phone",prop:"phone_number",minWidth:100,slot:"Phone",hide:({checkList:e})=>!e.includes("Phone")},{label:"Email",prop:"email",minWidth:100,hide:({checkList:e})=>!e.includes("Email")},{label:"Business Time",minWidth:100,slot:"BusinessTime",hide:({checkList:e})=>!e.includes("Business Time")},{label:"Service name",prop:"service_name",minWidth:100,hide:({checkList:e})=>!e.includes("Service name")},{label:"Invitation code",prop:"invitation_code",minWidth:150,slot:"slotAction",hide:({checkList:e})=>!e.includes("Invitation code")},{label:"Action",fixed:"right",width:260,slot:"operation",hide:({checkList:e})=>!e.includes("Action")}],j=["Clinic Name","Create name","Address","Clinic Web","Phone","Email","Business Time","Service name","Invitation code","Action"];function M(){d()}function O(e){m.pageSize=e,d()}function I(e){m.currentPage=e,d()}async function d(){c.value=!0;const{data:e}=await Q(Object.assign(k,{searchKey:g.searchKey}));_.value=e.data,n.therapists_id=e.therapists.id,c.value=!1}const q=(e,i)=>{};function z(e){Object.keys(e).map(i=>{f[i]=e[i]})}async function F(e){const{data:i}=await $(Object.assign(E,{company_id:e.id}));i.code==1?(d(),o({type:"success",message:i.msg})):o({type:"error",message:i.msg})}const K=e=>{ie.confirm("Are you sure you want to delete this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{F(e)}).catch(()=>{o({type:"info",message:"Canceled"})})};function R(e){n.clinic_id=e.id,Y(),H(),l.value=!0}async function Y(){const{data:e}=await U(Object.assign(L,{clinic_id:n.clinic_id,therapist_id:n.therapists_id}));e.code==1?(r.value=e.data_new.addTherapistArr,a.FirstName=e.data_new.basic_info.FirstName,a.LastName=e.data_new.basic_info.LastName,a.phone_code=e.data_new.basic_info.phone_code,a.phone=e.data_new.basic_info.phone,a.gender=Number(e.data_new.basic_info.gender),a.split_rate=Number(e.data_new.basic_info.split_rate),a.email=e.data_new.basic_info.email,a.booking_notice_type=e.data_new.basic_info.booking_notice_type,a.limit_times=e.data_new.basic_info.limit_times,a.time_frequen=e.data_new.basic_info.time_frequen,p.value.forEach((i,ae)=>{i.is_selected=0,e.data_new.basic_info.booking_notice_type&&a.booking_notice_type.includes(i.value)&&(i.is_selected=1)}),G()):o({type:"error",message:e.msg})}async function G(){c.value=!0;const{data:e}=await V(Object.assign(D,{clinics_id:n.clinic_id,Therapist_id:n.therapists_id}));u.value=e.data,c.value=!1}async function H(){const{data:e}=await X(Object.assign(P,{clinic_id:n.clinic_id,therapists_id:n.therapists_id,searchKey:"",add_model:""}));e.code==1?(h.value=e.data,b.value=e.add_model.addTherapistArr):o({type:"error",message:e.msg})}async function J(e){const{data:i}=await Z(Object.assign(N,{clinic_id:n.clinic_id,basic_info:a,addTherapistArr:r.value,therapists_id:n.therapists_id}));i.code==1?(l.value=!1,o({type:"success",message:i.msg})):o({type:"error",message:i.msg})}return te(()=>{d()}),{searchDetail:g,btnSearchPart:M,loading:c,small:C,selectList:j,columns:B,pagination:m,handleSizeChange:O,handleCurrentChange:I,PartList:_,order_date:W,deliverDialog:w,selectClick:q,itemArr:x,addLocationDialog:A,locationArr:f,EditLocation:z,btnDellocation:K,singleTableRef:v,listDialog:l,btnDetailDialog:R,formArr:a,PublicData:u,ClinicSevers:h,addTherapistArr:b,getAddTherapistArr:r,addServiceData:p,LimitTimes:S,isData:T,addEditClinicsTherapist:J}}export{fe as useEqu};