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-legacy-5e288d94.js
System.register(["./po-legacy-b0431e4e.js","./vue-router-legacy-a12307c3.js","./index-legacy-42c17c53.js","./message-legacy-10af7c73.js","./runtime-core.esm-bundler-legacy-c5df00b7.js","./index-legacy-f612e930.js","./preload-helper-legacy-f8638e03.js","./vue-i18n.runtime.esm-bundler-legacy-720876b1.js","./index-legacy-c9e20962.js","./_commonjsHelpers-legacy-5498c249.js","./utils-legacy-c0023c33.js","./focus-trap-legacy-631b7396.js","./error-legacy-e98f9e58.js"],(function(e,i){"use strict";var t,a,n,c,o,l,s,r,u,d;return{setters:[e=>{t=e.schBookingInvoiceListWeb,a=e.schBookingInvoiceSubmitWeb,n=e.schBookingUseSubmitWeb},e=>{c=e.d,o=e.u},e=>{l=e.o},e=>{s=e.b7},e=>{r=e.r,u=e.A,d=e.o},null,null,null,null,null,null,null,null],execute:function(){e("useEqu",(function(){c(),o(),c();const e=r(),i=r(!1),m=r(!1),g=r(!1),h=r(!1),p=r(!1),y=r(""),_=r([]),b=r([]),v=r([]),k=u({}),S=u({tableIndex:0,note:""}),f=r([{value:"Y",text:"Y"},{value:"N",text:"N"}]),x=u({}),j=u({}),L=u({}),A=u({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),D=u({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"}),W=u({name:"",id:""});async function C(){D.type=localStorage.getItem("type"),2==D.type&&(D.role="clinic"),1==D.type&&(D.role="therapists"),D.clinic_id=localStorage.getItem("clinicIdOverall"),i.value=!0;const{data:e}=await t(Object.assign(k,{clinic_id:D.clinic_id,role:D.role,cusname:D.searchKey,date_begin:D.date_begin,date_end:D.date_end,pageSize:A.pageSize,page:A.currentPage}));1==e.code&&(_.value=e.data,A.total=e.total),i.value=!1}async function N(e){const{data:i}=await n(Object.assign(L,{booking_id:e.id,use_type:e.use_type,customer_id:e.customer_id}));1==i.code?(C(),s({type:"success",message:i.msg})):s({type:"error",message:i.msg})}return d((()=>{C()})),{searchDetail:D,btnSearchPart:function(){C()},loading:i,small:p,selectList:["勾选列","CusName","Booking#","Service Date","Service Time","Service Name","Session (min)","Amount ($)","Action"],columns:[{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")}],pagination:A,handleSizeChange:function(e){A.pageSize=e,C()},handleCurrentChange:function(e){A.currentPage=e,C()},PartList:_,order_date:y,deliverDialog:m,selectClick:(e,i)=>{v.value=e},itemArr:S,addLocationDialog:h,locationArr:x,EditLocation:function(e){Object.keys(e).map((i=>{x[i]=e[i]}))},btnDellocation:e=>{l.confirm("Are you sure to use the deduction voucher",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then((()=>{N(e)})).catch((()=>{s({type:"info",message:"Canceled"})}))},singleTableRef:e,getDate:function(e){null==e?(D.date_begin="",D.date_end=""):(D.date_begin=e[0],D.date_end=e[1])},btnMakeInvoice:async function(e){let i="",t="";if("summary"==e){if(D.is_tax=!0,D.include_tax="Y",0==v.value.length)return void s({type:"error",message:"Please select Customer"})}else t=D.is_tax,i=D.include_tax;const{data:n}=await a(Object.assign(j,{dataRow:v.value,is_tax:t,include_tax:i,submit_action:e}));1==n.code?"summary"==e?(m.value=!0,b.value=n.data):(C(),m.value=!1,s({type:"success",message:n.msg})):s({type:"error",message:n.msg})},onSelectLocation:function(){g.value=!0},locationDialog:g,eventIsNumlocation:function(){D.loacation_name=W.name,D.loacation_id=W.id},locationData:W,taxData:f,invoiceArr:b}}))}}}));