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/hookInvoice-93b58e62.js
import{InvoiceListWeb as rt,yuyueFDF as y,newInvoiceWeb as lt,invoicePdfWeb as ge,sendEmailWeb as ut,base64image as dt,invoiceDetailWeb as _t,getLicenceServiceWeb as mt,invoicePaymentWeb as ft,prePaidWeb as gt,AccountListWeb as pt,updateShowNumber as ht,getClinicsListByTherapistWeb as vt,setInvoicePaidWeb as bt,getNoInvoiceBookingsDateWeb as yt,InvoiceExportWeb as wt,NeedPaymentInvoiceListWeb as At,ServiceCombinaByServiceNameWeb as Ct,getInvoiceNumberWeb as It,deleteInvoiceWeb as Dt,getCheckMembersWeb as xt}from"./po-fd838395.js";import{f as Nt}from"./fabric-6bfda64d.js";import{d as pe,u as St}from"./vue-router-a383d220.js";import{b7 as r}from"./message-2472a54a.js";import{o as j}from"./index-81e4a901.js";import{r as o,A as c,o as Pt}from"./runtime-core.esm-bundler-6128546f.js";import"./index-f28053db.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 Kt(v){const{query:he,params:Et}=pe(),Z=St();pe();const O=o({}),M=o(""),B=o(!1),I=o(!1),D=o(!1),x=o(!1),ee=o(null),N=o(""),ie=o(""),L=o(""),q=o(""),te=o([]),p=o([]),R=o("");let S=null;const P=o(""),d=o(!1),ae=o(!1),V=o(!1),Y=o(!1),H=o(!1),K=o(!1),z=o(!1),U=o(!1),$=o(!1),ve=o(!1),be=o(""),E=o(1),G=o(""),ne=o([]),oe=o([]),ce=o([]),se=o([]),W=o([]),h=o([]),X=o([]),re=o([]),k=o([]),le=o(!1),ue=o(!1),ye=c({}),we=c({}),Ae=c({}),Ce=c({}),Ie=c({}),De=c({}),xe=c({}),Ne=c({}),Se=c({}),Pe=c({}),Ee=c({}),We=c({}),ke=c({}),Te=c({}),Fe=c({}),je=c({}),Oe=c({}),Me=c({}),Be=c({}),Le=c({}),w=c({signal_url:"",form_type:"",note_id:"",service:"",service_id:""}),T=c({Invoice_Charge_Number:"",Customer_Name:"",Invoice_Total_Charge:"",Has_Paid_Amount:"",Need_Charge_Amount:"",Total_Paid_Amount:"",customer_id:"",customer_name:"",invoice_id:""}),t=c({service_id:"",invoice_type:"normal",loacation_id:"",loacation_name:"",Client_name:"",Client_id:"",date:"",description_type:"",description_type1:"",Invoice_Number:"",hstValue:0,total:0,include_tax:"N",is_tax:"Y",is_tax1:!0,r_ac_name:"",r_ac_register:"",name1:"",rmt_register:"",signal_image:"",signal_desc:"",receive:"",invoice_due_date:"",customArr:"",fileName:"",email_content:"",file_path:"",is_web:1,name:"",licence_number:"",licence_name:"",licence_title:"",description:"",amount1:"",booking_order_no:"",bookingorder_id:"",Invoice_Charge_Number:"",Customer_Name:"",Invoice_Total_Charge:"",Has_Paid_Amount:"",Need_Charge_Amount:"",chapter_image:"",is_use_chapter:"",is_Match:-1,is_Match_id:"",today:"",files:[],files1:[],fileView:[]}),Q=c({name:"",id:""}),b=c({name:"",id:"",r_ac_name:"",r_ac_register:"",name1:"",rmt_register:""}),u=c({name:"",customer_id:"",pay_amount:"",pay_method:"",cheque_number:"",content:"",invoice_id:"",account_id:"",time:"",other:""}),qe=o([{value:"normal",text:"Normal"},{value:"outside",text:"Outside"},{value:"third_Pay",text:"Third Pay"},{value:"gift",text:"Gift"}]),Re=o([{value:"Y",text:"Y"},{value:"N",text:"N"}]),_=o([{id:1,price:0,spend_time:"",treatment_date:"",booking_order_no:"",booking_id:""}]),Ve=o([{id:1,text:"Paypal",value:"Paypal"},{id:2,text:"VISA",value:"VISA"},{id:3,text:"MasterCard",value:"MasterCard"},{id:4,text:"AMERICAN_EXPRESS",value:"AMERICAN_EXPRESS"},{id:5,text:"Cheque",value:"Cheque"},{id:6,text:"BankTransfer",value:"BankTransfer"},{id:7,text:"Cash",value:"Cash"},{id:8,text:"Other",value:"Other"}]),Ye=o([{value:"Massage",text:"Massage"},{value:"Acupuncture",text:"Acupuncture"}]);c({destination_comp:"",state:"",city:"",address:"",phone:"",contact:"",customer_id:""});const He=c({}),Ke=c({qo_item_str:"",name:"",address:"",way:"",shipping:[],itemsDetail:[],trackingNo:"",courier:"",comment:""}),A=c({total:0,pageSize:10,currentPage:1,background:!0,pageSizes:[10,25,50,100]}),ze=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:70,align:"left",hide:({checkList:e})=>!e.includes("序号列")},{label:"Invoice #",prop:"invoice_number",minWidth:120,align:"left",hide:({checkList:e})=>!e.includes("Invoice #")},{label:"Files",prop:"file",minWidth:50,slot:"files",hide:({checkList:e})=>!e.includes("Files")},{label:"Customer Name",slot:"Customer",minWidth:100,align:"left",hide:({checkList:e})=>!e.includes("Customer Name")},{label:"Invoice Date",prop:"invoice_date_standard",minWidth:92,hide:({checkList:e})=>!e.includes("Invoice Date")},{label:"Total ($)",prop:"total_amount",minWidth:85,align:"right",hide:({checkList:e})=>!e.includes("Total ($)")},{label:"Paid Amount $",prop:"pay_amount",minWidth:105,align:"right",hide:({checkList:e})=>!e.includes("Paid Amount $")},{label:"Service Name",prop:"description_type",minWidth:100,align:"left",hide:({checkList:e})=>!e.includes("Service Name")},{label:"Location",prop:"company_comp_name",minWidth:100,align:"left",hide:({checkList:e})=>!e.includes("Location")},{label:"Booking #",prop:"customer_product_code",minWidth:90,slot:"Booking",align:"left",hide:({checkList:e})=>!e.includes("Booking #")},{label:"PAID IN FULL",prop:"IsPaid",minWidth:100,slot:"IsPaid",hide:({checkList:e})=>!e.includes("PAID IN FULL")},{label:"Split Rate",prop:"split_rate",minWidth:80,align:"right",hide:({checkList:e})=>!e.includes("Split Rate")},{label:"Split Amount",prop:"split_amount",minWidth:100,align:"right",hide:({checkList:e})=>!e.includes("Split Amount")},{label:"Withdraw Amount",prop:"has_withdraw_amount",minWidth:100,align:"right",hide:({checkList:e})=>!e.includes("Withdraw Amount")},{label:"Origin",prop:"clinic_name",slot:"Origin",minWidth:100,align:"left",hide:({checkList:e})=>!e.includes("Origin")},{label:"Action",fixed:"right",width:200,slot:"operation",align:"left",hide:({checkList:e})=>!e.includes("Action")}],Ue=["勾选列","Invoice #","Files","Customer Name","Invoice Date","Total ($)","Paid Amount $","Split Rate","Split Amount","Withdraw Amount","Service Name","Location","Booking #","PAID IN FULL","Origin","Action"],s=c({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",date:"",amountBegin:"",amountEnd:"",show_number:!0,clinic_id:"",therapists_id:"",is_batch_invoice:"",invoice_id_list:[],sub_amount:"",sub_pay_amount:"",export:"N"});function $e(){m()}function Ge(e){A.pageSize=e,m()}function Xe(e){A.currentPage=e,m()}async function m(e){s.export="N",e=="Y"&&(s.export=e),P.value=localStorage.getItem("type");let i="";P.value==1&&(i="therapists"),d.value=!0;const{data:a}=await rt(Object.assign(ye,{searchKey:s.searchKey,amountBegin:s.amountBegin,amountEnd:s.amountEnd,invoiceDate:s.date,clinic_id:s.clinic_id,therapists_id:s.therapists_id,role:i,options:M,customer_id:v.customer_id,pageSize:A.pageSize,page:A.currentPage,export:s.export}));a.code==1?(d.value=!1,s.export=="N"?(ne.value=a.data,s.show_number=a.config.show_number,s.is_batch_invoice=a.is_batch_invoice,A.total=a.total,s.sub_amount=a.sub_amount,s.sub_pay_amount=a.sub_pay_amount):(r({type:"success",message:"Export Success"}),window.open(y+a.first_name.replace("var/www/html/public","")))):d.value=!1}function Qe(e){return e.assocInfo.booking.length>0?e.assocInfo.booking[0].booking_order_no:""}function Je(e){return e.assocInfo.note.length>0?e.assocInfo.note[0].id:""}function de(){_.value=[];let e={id:_.value.length+1,price:0,spend_time:"",treatment_date:t.today,booking_order_no:"",booking_id:""};t.date=t.today,_.value.push(e),me(1),v.customer_id&&(t.Client_name=v.customer_name,t.Client_id=v.customer_id),t.files=[],t.files1=[],H.value=!0}async function F(e,i){t.Invoice_Number="",d.value=!0;let a=e.service_id;i==1&&(a=e.id);const{data:n}=await It(Object.assign(we,{clinic_id:"",service_id:a,invoice_date:t.date}));n.code==1&&(i==1?p.value.forEach((l,g)=>{e.service_name==l.service_name&&(l.invoice_number=n.invoice_number)}):e.invoice_number=n.invoice_number),d.value=!1}function Ze(e,i){let a=e.service_detail.findIndex(n=>n.id===i.id);a!==-1&&e.service_detail.splice(a,1),e.service_detail.forEach((n,l)=>{n.id=l+1}),f(e)}function ei(e){let i={booking_id:"",booking_no:"",during_price_json:e.service_detail[0].during_price_json,id:e.service_detail.length+1,price:e.service_detail[e.service_detail.length-1].price,spend_time:e.service_detail[e.service_detail.length-1].spend_time,treatment_date:e.service_detail[0].treatment_date};e.service_detail.push(i),f(e)}function ii(e){let i=_.value.findIndex(a=>a.id===e.id);i!==-1&&_.value.splice(i,1),_.value.forEach((a,n)=>{a.id=n+1}),f()}const ti=e=>{j.confirm("Are you sure you want to delete this item ?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{ii(e)}).catch(()=>{r({type:"info",message:"Canceled"})})};function _e(e,i){e?t.is_tax="Y":t.is_tax="N",f(i)}function ai(e,i){f(i)}function f(e){let i=0;e.service_detail.forEach((a,n)=>{a.price!=""&&(i=parseFloat(i)+parseFloat(a.price))}),e.is_tax?e.include_tax=="N"?(e.hstValue=Math.round(parseFloat(i)*.13*100)/100,e.total=Math.round(parseFloat(i)*1.13*100)/100):e.include_tax=="Y"&&(e.hstValue=Math.round(parseFloat(i)/1.13*.13*100)/100,e.total=Math.round(parseFloat(i)*100)/100):(e.hstValue=0,e.total=Math.round(parseFloat(i)*100)/100)}function ni(e,i,a){a.spend_time=e,a.during_price_json.forEach((n,l)=>{n.value==e&&(a.price=n.price)}),f(i)}function oi(){var e=new Date,i=e.getFullYear(),a=("0"+(e.getMonth()+1)).slice(-2),n=("0"+e.getDate()).slice(-2);t.date=i+"-"+a+"-"+n,_.value[0].treatment_date=i+"-"+a+"-"+n,t.invoice_due_date=i+"-"+a+"-"+n,t.today=i+"-"+a+"-"+n,he.help==1&&de()}function ci(){le.value=!0}function si(){t.loacation_name=b.name,t.loacation_id=b.id,t.r_ac_name=b.r_ac_name,t.r_ac_register=b.r_ac_register,t.name1=b.name1,t.rmt_register=b.rmt_register}function ri(){t.Client_id=Q.id,t.Client_name=Q.name,J(t.description_type)}function li(){ue.value=!0}async function ui(){d.value=!0;let e="";t.invoice_type=="outside"?e=t.description_type1:e=t.description_type;const{data:i}=await lt(Object.assign(He,{customer_id:t.Client_id,company_id:t.loacation_id,invoice_type:t.invoice_type,invoice_date:t.date,invoice_due_date:t.invoice_due_date,is_tax:t.is_tax,description_type:e,signal_image:t.signal_image,items:_,include_tax:t.include_tax,receive_message:t.receive,note_id:"",signal_desc:t.signal_desc,origin:"new",files:t.files,combina_service_arr:p.value}));i.code==1?(m(),H.value=!1,r({type:"success",message:i.msg}),d.value=!1):(r({type:"error",message:i.msg}),d.value=!1)}async function di(e){const{data:i}=await Dt(Object.assign(Ae,{invoice_id:e.id}));i.code==1&&(m(),r({type:"success",message:i.msg}))}const _i=e=>{j.confirm("Are you sure you want to delete this item ?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{di(e)}).catch(()=>{r({type:"info",message:"Canceled"})})};async function mi(e){t.customArr=e;const{data:i}=await ge(Object.assign(Ce,{invoice_id:e.id}));i.code==1&&($.value=!0,t.fileName=i.file_path.replace("/var/www/html/public/pdf/",""),t.file_path=i.file_path,t.email_content=i.data.config.emailconfig.email_content)}async function fi(){const{data:e}=await ut(Object.assign(Ie,{invoice_id:t.customArr.id,file_path:t.file_path,emailContent:t.email_content,show_number:s.show_number}));e.code==1&&(r({type:"success",message:e.msg}),$.value=!1)}async function gi(e){const{data:i}=await ge(Object.assign(De,{invoice_id:e.id,show_number:s.show_number}));i.code==1?window.open(y+i.file_path.replace("var/www/html/public","")):r({type:"error",message:i.msg})}function pi(){w.signal_url="signal_url1",w.form_type="invoice",w.note_id="",w.service=t.description_type,w.service_id=t.service_id,V.value=!0}function hi(){S.clear(),N.value=""}const vi=()=>{bi(),N.value=S.toDataURL({format:"png"}),wi()};function bi(){S.renderAll()}function yi(){S=new Nt.fabric.Canvas(ee.value,{isDrawingMode:!0})}async function wi(e){const{data:i}=await dt(Object.assign(xe,{note_id:"",signal_url:"signal_url1",form_type:"invoice",base64code:N.value,yuyueFDF:y}));i.code==1&&(t.signal_image=i.file_path,V.value=!1)}function Ai(){let e="";me(2),t.signal_image=ie.value,t.signal_image&&(e=t.signal_image.replace(y+"/images/","").substring(0,6),e=="fabric"?t.is_web=2:t.is_web=1)}const Ci=e=>{t.signal_image=e};async function Ii(e){X.value=[],L.value="",q.value="",R.value="",t.chapter_image="",t.is_use_chapter="",G.value="",t.fileView=e.file;let i="";Y.value=!0,t.customArr=e;const{data:a}=await _t(Object.assign(Ne,{invoice_id:e.id}));a.code==1&&(X.value=a.data[0].detail,L.value=a.data[0].company_info,q.value=a.data[0].info,R.value=a.data[0].customer_info,t.chapter_image=a.data[0].config.chapter_image,t.is_use_chapter=a.data[0].config.is_use_chapter,a.data[0].info.signal_image&&(i=a.data[0].info.signal_image.replace(y+"/images/","").substring(0,6),i=="fabric"?t.is_web=2:t.is_web=1),G.value=a.data[0].licence,Y.value=!0)}async function me(e){const{data:i}=await mt(Object.assign(Se,{customer_id:t.Client_id,is_licence:!1}));i.code==1?(h.value=i.data,h.value.length>0&&e==1&&(t.description_type=h.value[0].value,J(t.description_type),t.service_id=h.value[0].id,k.value=h.value[0].during_price_json),re.value=h.value):r({type:"error",message:i.msg})}function Di(e){re.value.forEach((n,l)=>{n.service_name==e&&(t.licence_number=n.licence_number,t.licence_name=n.licence_name,t.name=n.name,t.description=n.description,t.licence_title=n.licence_title,k.value=n.during_price_json,t.signal_desc=n.sinal_desc_arr,t.signal_image=n.sinal_image_arr,t.service_id=n.id,F())});let i="",a="";k.value.forEach((n,l)=>{n.default&&(i=n.duration,a=n.price)}),_.value.forEach((n,l)=>{n.spend_time=i,n.price=a}),(i==""||a=="")&&_.value.forEach((n,l)=>{n.spend_time=0,n.price=0}),f()}function xi(e){let i={Invoice_Charge_Number:e.invoice_number,Customer_Name:e.customer_first_name?e.customer_first_name+e.customer_last_name:e.customer_show,Invoice_Total_Charge:e.total_amount,Has_Paid_Amount:e.pay_amount,Need_Charge_Amount:e.need_charge_amount,Total_Paid_Amount:"",customer_id:e.customer_id,customer_name:e.customer_first_name?e.customer_first_name+e.customer_last_name:e.customer_show,invoice_id:e.id};E.value=1,T.value=i,I.value=!0}async function Ni(){const{data:e}=await xt(Object.assign(Pe,{customer_id:u.customer_id}));if(e.code==1){W.value=e.data;let i=t.Need_Charge_Amount;W.value.forEach((a,n)=>{let l=Math.min(a.remain_amount,i);l>0&&(a.paid_amount=l,i=parseFloat((i-l).toFixed(2)))}),z.value=!0}else r({type:"error",message:e.msg})}async function Si(){const{data:e}=await ft(Object.assign(Ee,{invoice_id:u.invoice_id,pay_amount_details:W.value}));e.code==1?(m(),z.value=!1):r({type:"error",message:e.msg})}async function Pi(){if(d.value=!0,u.pay_method!="Cheque"&&(u.cheque_number=""),u.pay_method=="Cheque"&&u.cheque_number==""){r({type:"error",message:"Please enter cheque number"}),d.value=!1;return}let e="";if(u.pay_method=="Other"){if(u.other==""){r({type:"error",message:"Please enter pay method"}),d.value=!1;return}e=u.other}else e=u.pay_method;const{data:i}=await gt(Object.assign(We,{customer_id:u.customer_id,pay_amount:u.pay_amount,pay_method:e,cheque_number:u.cheque_number,content:u.content,collection_time:u.time,account_id:u.account_id}));i.code==1?(Ni(),r({type:"success",message:i.msg}),U.value=!1,d.value=!1):(r({type:"error",message:i.msg}),d.value=!1)}function Ei(){Wi(),ki(),U.value=!0}function Wi(){var e=new Date,i=e.getFullYear(),a=("0"+(e.getMonth()+1)).slice(-2),n=("0"+e.getDate()).slice(-2);u.time=i+"-"+a+"-"+n}async function ki(){const{data:e}=await pt(Object.assign(je,{clinic_id:"",role:"therapists",searchKey:""}));e.code==1&&(ce.value=e.data)}async function Ti(e){const{data:i}=await ht(Object.assign(ke,{show_number:s.show_number}));r({type:"success",message:i.msg})}function Fi(e){const i=new Date;return i.setHours(0,0,0,0),e.getTime()>i.getTime()}function ji(){m()}async function Oi(){d.value=!0;const{data:e}=await vt(Object.assign(Te,{searchKey:"",is_therapistInvoice:"Y"}));e.code==1&&(se.value=e.data),d.value=!1}function Mi(e){e==null&&(s.clinic_id="")}async function Bi(e,i){const{data:a}=await bt(Object.assign(Fe,{invoice_id:i.id,is_paid:e}));a.code==1&&m(),r({type:"success",message:a.msg})}function Li(){Z.push({path:"/crm/yuyue/licence",query:{invoceGuide:1}})}const qi=()=>{j.confirm("Invoicing requires services with licence",{confirmButtonText:"Go add",cancelButtonText:"cancel",type:"warning"}).then(()=>{Ri()}).catch(()=>{r({type:"info",message:"Canceled"})})};function Ri(){Z.push({path:"/crm/yuyue/licence",query:{invoceService:1}})}function Vi(){B.value=!B.value}function Yi(){O.value&&(M.value=O.value.value,m())}async function Hi(e,i){t.is_Match=-1,t.is_Match_id=e.id;const{data:a}=await yt(Object.assign(Oe,{customer_id:t.Client_id,date:i.treatment_date?i.treatment_date.substring(0,10):"",itemData:e.service_detail,service_name:e.service_name,clinic_id:"",therapist_id:"",company_id:t.loacation_id}));a.code==1?a.data.length>0?(oe.value=a.data,K.value=!0):r({type:"info",message:"There are no matching Booking available"}):r({type:"error",message:a.msg})}function Ki(){}function zi(e){let i=[];_.value.forEach((n,l)=>{i.push(new Date(n.treatment_date).getTime())});const a=Math.max(...i);_.value.forEach((n,l)=>{a==new Date(n.treatment_date).getTime()&&a>new Date(t.date).getTime()&&(t.date=n.treatment_date)})}async function Ui(){D.value=!0;const{data:e}=await wt(Object.assign(Me,{searchKey:s.searchKey,clinic_id:s.clinic_id,therapists_id:s.therapists_id,role:"therapists",options:M,customer_id:v.customer_id}));e.code==1?(D.value=!1,r({type:"success",message:e.msg}),window.open(y+e.file_path.replace("var/www/html/public",""))):D.value=!1}function $i(){m()}function Gi(){let e={Invoice_Charge_Number:"",Customer_Name:"",Invoice_Total_Charge:"",Has_Paid_Amount:"",Need_Charge_Amount:"",Total_Paid_Amount:"",invoice_id:"",customer_id:v.customer_id,customer_name:v.customer_name};E.value=2,T.value=e,I.value=!0}function Xi(e){s.invoice_id_list=[],e.forEach((i,a)=>{s.invoice_id_list.push(i.id)})}function Qi(e){let i={Invoice_Charge_Number:e.invoice_id_arr,Customer_Name:"",Invoice_Total_Charge:"",Has_Paid_Amount:"",Need_Charge_Amount:"",Total_Paid_Amount:e.need_amount_sum,invoice_id:"",customer_id:e.customer_id,customer_name:e.customer_name};E.value=6,T.value=i,I.value=!0}async function Ji(){t.Invoice_Number="",x.value=!0;const{data:e}=await At(Object.assign(Be,{invoice_id_list:s.invoice_id_list}));e.code==1?Qi(e.data):r({type:"error",message:e.msg}),x.value=!1}function Zi(e,i,a){e.code==1?(t.files.push(y+e.data.file_path.replace("var/www/html/public/","")),t.files1.push(e.data.file_name)):r({type:"error",message:e.data.msg})}function et(e){e.length&&(te.value=e,ae.value=!0)}function it(e){window.open(e)}async function J(e){let i="";h.value.forEach((n,l)=>{n.value==e&&(i=n.id,t.signal_desc=n.sinal_desc_arr,t.signal_image=n.sinal_image_arr)});const{data:a}=await Ct(Object.assign(Le,{role:"therapists",clinic_id:"",service_id:i,service_name:e,customer_id:t.Client_id}));a.code==1?(p.value=a.data,p.value.forEach((n,l)=>{n.service_detail.forEach((g,fe)=>{g.treatment_date=g.treatment_date.substring(0,10)}),_e(n.is_tax,n),F(n)})):r({type:"error",message:a.msg}),x.value=!1}function tt(e){let i=p.value.findIndex(a=>a.service_name===e.service_name);i!==-1&&p.value.splice(i,1)}const at=e=>{j.confirm("Are you sure you want to delete this item ?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{tt(e)}).catch(()=>{r({type:"info",message:"Canceled"})})};function nt(e,i){p.value.forEach((a,n)=>{a.service_detail.forEach((l,g)=>{l.booking_order_no=e.booking_order_no,l.booking_id=e.booking_id,l.spend_time=Number(e.duration),l.price=e.amount})}),K.value=!1}function ot(e,i){let a=1;h.value.forEach((n,l)=>{e==n.service_name&&(F(n,1),i.licence_name=n.licence_name,i.licence_description=n.description,i.licence_title=n.licence_title,i.licence_number=n.licence_number,n.during_price_json.length>0?n.during_price_json.forEach((g,fe)=>{g.default?(a=2,i.service_detail.forEach((C,st)=>{C.price=g.price,C.spend_time=g.duration}),f(i)):a==1&&(i.service_detail.forEach((C,st)=>{C.price=n.during_price_json[0].price,C.spend_time=n.during_price_json[0].duration}),f(i))}):(i.service_detail.forEach((g,fe)=>{g.price=0,g.spend_time=0}),f(i)))})}function ct(e){p.value.forEach((i,a)=>{F(i)})}return Pt(()=>{yi(),oi(),P.value=localStorage.getItem("type"),Oi()}),{searchDetail:s,btnSearchPart:$e,loading:d,small:ve,selectList:Ue,columns:ze,pagination:A,handleSizeChange:Ge,handleCurrentChange:Xe,PartList:ne,order_date:be,deliverDialog:H,selectClick:Xi,deliverDataArr:Ke,btnDeliverConfirm:ui,getBooking:Qe,getNote:Je,addForm:t,InvoiceType:qe,btnAdd:de,descriptionData:Ye,items:_,during_price_array:k,AddItem:ei,onDelete:ti,taxData:Re,onIs_tax:_e,IncludeTax:ai,duringPrice:ni,onSelectLocation:ci,locationDialog:le,ClientDialog:ue,eventIsNumlocation:si,eventIsNum:ri,onSelClient:li,ClientData:Q,locationData:b,btnDelInvoice:_i,sandEmailDialog:$,btnSendEmail:mi,onSend:fi,btnPrintPDF:gi,onPrice:f,openAutograph:pi,signatureCanvas:ee,signatureDataUrl:N,saveSignature:vi,clearSignature:hi,autographDialog:V,signalData:w,eventSignal:Ai,handleValueFromChild:Ci,signalUrl:ie,InvoiceDetailDialog:Y,btnDetail:Ii,detailInfo:X,company_info:L,info:q,type:P,customer_info:R,addServiceData:h,changeServic:Di,licenceDetail:G,CollectionDialog:z,btnCollection:xi,CollectionData:W,bookingPaymentConfirm:Si,addCollectionDialog:U,AddCollect:Ei,collectionArr:u,btncollectionConfirm:Pi,btnShowNumber:Ti,disabledBeforeToday:Fi,onSearch:ji,clinicData:se,onClinicData:Mi,btnIsPaid:Bi,btnGuide:Li,btnService:qi,payMethodData:Ve,AccountData:ce,isShowFilter:B,btnFilterQuery:Vi,optionsFilter:O,eventFilter:Yi,getNoInvoiceBookings:Hi,MatchData:oe,MatchDialog:K,selectedTr:nt,btnMatchConfirm:Ki,onSelectItemDate:zi,btnExport:Ui,loading1:D,btnAddCharge:Gi,ChargeDialog:I,ChargeArr:T,eventCharge:$i,str1:E,btnBatchPayment:Ji,loading2:x,uploadSlotFile1:Zi,btnFile:et,onFile:it,fileDialog:ae,fileArr:te,ServiceInvoice:p,changeServiceCombina:J,onDeleteService:at,changeServiceItem:ot,onDeleteI:Ze,loadPartList:m,invoiceDate:ct}}export{Kt as useEqu};