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/hookNeedInvoice-b59140fb.js
import{schBookingInvoiceListWeb as Y,schBookingInvoiceSubmitWeb as $,schBookingUseSubmitWeb as K}from"./po-4f5ed739.js";import{d as b,u as q}from"./vue-router-a383d220.js";import{o as U}from"./index-81e4a901.js";import{b7 as s}from"./message-2472a54a.js";import{r as i,A as o,o as F}from"./runtime-core.esm-bundler-6128546f.js";import"./index-74d93170.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 se(){b(),q(),b();const y=i(),l=i(!1),r=i(!1),p=i(!1),v=i(!1),S=i(!1),x=i(""),g=i([]),_=i([]),d=i([]),k=o({}),A=o({tableIndex:0,note:""}),D=i([{value:"Y",text:"Y"},{value:"N",text:"N"}]),f=o({}),W=o({}),w=o({}),u=o({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),t=o({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",type:"",role:"",clinic_id:"",date_begin:"",date_end:"",loacation_id:"",loacation_name:"",is_tax:!0,include_tax:"Y"}),m=o({name:"",id:""}),B=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"CusName",prop:"customer_name",minWidth:100,hide:({checkList:e})=>!e.includes("CusName")},{label:"Booking#",prop:"booking_order_no",minWidth:100,hide:({checkList:e})=>!e.includes("Booking#")},{label:"Service Date",prop:"service_date",minWidth:100,hide:({checkList:e})=>!e.includes("Service Date")},{label:"Service Time",prop:"postal",minWidth:100,slot:"ServiceTime",hide:({checkList:e})=>!e.includes("Service Time")},{label:"Service Name",prop:"description_type",minWidth:150,hide:({checkList:e})=>!e.includes("Service Name")},{label:"Session (min)",prop:"session",minWidth:120,hide:({checkList:e})=>!e.includes("Session (min)")},{label:"Amount ($)",prop:"amount",minWidth:120,hide:({checkList:e})=>!e.includes("Amount ($)")},{label:"Action",fixed:"right",minWidth:100,slot:"operation",hide:({checkList:e})=>!e.includes("Action")}],C=["勾选列","CusName","Booking#","Service Date","Service Time","Service Name","Session (min)","Amount ($)","Action"];function N(){a()}function I(e){u.pageSize=e,a()}function L(e){u.currentPage=e,a()}async function a(){t.type=localStorage.getItem("type"),t.type==2&&(t.role="clinic"),t.type==1&&(t.role="therapists"),t.clinic_id=localStorage.getItem("clinicIdOverall"),l.value=!0;const{data:e}=await Y(Object.assign(k,{clinic_id:t.clinic_id,role:t.role,cusname:t.searchKey,date_begin:t.date_begin,date_end:t.date_end}));e.code==1&&(g.value=e.data),l.value=!1}const P=(e,n)=>{d.value=e};function T(e){Object.keys(e).map(n=>{f[n]=e[n]})}async function O(e){const{data:n}=await K(Object.assign(w,{booking_id:e.id,use_type:e.use_type,customer_id:e.customer_id}));n.code==1?(a(),s({type:"success",message:n.msg})):s({type:"error",message:n.msg})}const R=e=>{U.confirm("Are you sure to use the deduction voucher",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{O(e)}).catch(()=>{s({type:"info",message:"Canceled"})})};function j(e){e==null?(t.date_begin="",t.date_end=""):(t.date_begin=e[0],t.date_end=e[1])}async function z(e){let n="",h="";if(e=="summary"){if(t.is_tax=!0,t.include_tax="Y",d.value.length==0){s({type:"error",message:"Please select Customer"});return}}else h=t.is_tax,n=t.include_tax;const{data:c}=await $(Object.assign(W,{dataRow:d.value,is_tax:h,include_tax:n,submit_action:e}));c.code==1?e=="summary"?(r.value=!0,_.value=c.data):(a(),r.value=!1,s({type:"success",message:c.msg})):s({type:"error",message:c.msg})}function E(){p.value=!0}function M(){t.loacation_name=m.name,t.loacation_id=m.id}return F(()=>{a()}),{searchDetail:t,btnSearchPart:N,loading:l,small:S,selectList:C,columns:B,pagination:u,handleSizeChange:I,handleCurrentChange:L,PartList:g,order_date:x,deliverDialog:r,selectClick:P,itemArr:A,addLocationDialog:v,locationArr:f,EditLocation:T,btnDellocation:R,singleTableRef:y,getDate:j,btnMakeInvoice:z,onSelectLocation:E,locationDialog:p,eventIsNumlocation:M,locationData:m,taxData:D,invoiceArr:_}}export{se as useEqu};