File: /var/www/html/public/static/js/hookBalanceHistory-legacy-a096a4eb.js
System.register(["./po-legacy-d10a66a5.js","./vue-router-legacy-a12307c3.js","./message-legacy-10af7c73.js","./index-legacy-42c17c53.js","./runtime-core.esm-bundler-legacy-c5df00b7.js","./index-legacy-06c5db9c.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,t){"use strict";var n,i,a,c,l,r,o,s,u,d,p;return{setters:[e=>{n=e.invoiceBalanceHistoryWeb,i=e.yuyueFDF,a=e.deleteCompanyWeb,c=e.returnPayBalanceWeb},e=>{l=e.d,r=e.u},e=>{o=e.b7},e=>{s=e.o},e=>{u=e.r,d=e.A,p=e.o},null,null,null,null,null,null,null,null],execute:function(){e("useEqu",(function(){l(),r(),l();const e=u(),t=u(!1),y=u(!1),g=u(!1),m=u(!1),h=u(""),b=u([]),_=d({}),f=d({tableIndex:0,note:""}),x=d({}),j=d({}),v=d({}),P=d({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),k=d({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",type:"",role:"",clinic_id:"",invoice_number:"",pay_number:"",client:"",begin_date:"",end_date:"",export:"",therapists_id:""});async function w(e){k.export="N","Y"==e&&(k.export=e),k.type=localStorage.getItem("type"),2==k.type&&(k.role="clinic"),1==k.type&&(k.role="therapists"),k.clinic_id=localStorage.getItem("clinicIdOverall"),t.value=!0;const{data:a}=await n(Object.assign(_,{clinic_id:k.clinic_id,role:k.role,invoice_number:k.invoice_number,pay_number:k.pay_number,client:k.client,begin_date:k.begin_date,end_date:k.end_date,export:k.export,pageSize:P.pageSize,page:P.currentPage,therapists_id:k.therapists_id}));0==a.code&&("N"==k.export?(b.value=a.data,P.total=Number(a.total)):(o({type:"success",message:"Export Success"}),window.open(i+a.first_name.replace("var/www/html/public","")))),t.value=!1}async function I(e){const{data:t}=await a(Object.assign(v,{company_id:e.id}));1==t.code?(w(),o({type:"success",message:t.msg})):o({type:"error",message:t.msg})}async function L(e){const{data:t}=await c(Object.assign(j,{used_id:e.id}));1==t.code?(w(),o({type:"success",message:t.msg})):o({type:"error",message:t.msg})}return p((()=>{w()})),{searchDetail:k,btnSearchPart:function(){w()},loading:t,small:m,selectList:["Idx","Client","Invoice Number","Pay ID","Pay Amount","Pay Date","Action"],columns:[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"Idx",type:"index",width:55,hide:({checkList:e})=>!e.includes("Idx")},{label:"Client",prop:"company_name",minWidth:100,slot:"Client",hide:({checkList:e})=>!e.includes("Client")},{label:"Invoice Number",prop:"invoice_number",minWidth:100,hide:({checkList:e})=>!e.includes("Invoice Number")},{label:"Pay ID",prop:"pay_id",minWidth:100,hide:({checkList:e})=>!e.includes("Pay ID")},{label:"Pay Amount",prop:"pay_amount",minWidth:100,hide:({checkList:e})=>!e.includes("Pay Amount")},{label:"Pay Date",prop:"createtime",minWidth:150,hide:({checkList:e})=>!e.includes("Pay Date")},{label:"Action",fixed:"right",width:120,slot:"operation",hide:({checkList:e})=>!e.includes("Action")}],pagination:P,handleSizeChange:function(e){P.pageSize=e,w()},handleCurrentChange:function(e){P.currentPage=e,w()},PartList:b,order_date:h,deliverDialog:y,selectClick:(e,t)=>{},itemArr:f,addLocationDialog:g,locationArr:x,EditLocation:function(e){Object.keys(e).map((t=>{x[t]=e[t]}))},btnDellocation:e=>{s.confirm("Are you sure you want to delete this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then((()=>{I(e)})).catch((()=>{o({type:"info",message:"Canceled"})}))},singleTableRef:e,getDate:function(e){e?(k.begin_date=e[0],k.end_date=e[1]):(k.begin_date="",k.end_date="")},loadPartList:w,btnSearchPartAll:function(){k.invoice_number="",k.pay_number="",k.client="",k.begin_date="",k.end_date="",k.export="N",P.currentPage=1,k.therapists_id="",h.value=[],w()},btnReturn:e=>{s.confirm("Are you sure you want to return it ?",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then((()=>{L(e)})).catch((()=>{o({type:"info",message:"Canceled"})}))}}}))}}}));