File: /var/www/html/public/static/js/hookPay-legacy-023dbf39.js
System.register(["./po-legacy-ef6b94b2.js","./index-legacy-d098372c.js","./vue-router-legacy-a12307c3.js","./index-legacy-42c17c53.js","./message-legacy-10af7c73.js","./runtime-core.esm-bundler-legacy-c5df00b7.js","./utils-legacy-c0023c33.js","./preload-helper-legacy-f8638e03.js","./vue-i18n.runtime.esm-bundler-legacy-720876b1.js","./index-legacy-c9e20962.js","./_commonjsHelpers-legacy-5498c249.js","./focus-trap-legacy-631b7396.js","./error-legacy-e98f9e58.js"],(function(e,t){"use strict";var a,n,i,o,c,l,s,r,u,d,m,y;return{setters:[e=>{a=e.getPayHistoriesWeb,n=e.getPayDetailWeb,i=e.prePaidWeb,o=e.returnPayBalanceWeb,c=e.DeletePaidWeb},null,e=>{l=e.d,s=e.u},e=>{r=e.o},e=>{u=e.b7},e=>{d=e.r,m=e.A,y=e.o},null,null,null,null,null,null,null],execute:function(){e("useEqu",(function(){l(),s(),l();const e=d(),t=d(!1),p=d(!1),h=d(!1),g=d(!1),_=d(!1),f=d(!1),b=d(!1),v=d(""),P=d(""),A=d([]),k=d([]),C=m({}),j=d(!1),x=d([]),L=m({tableIndex:0,note:""}),W=m({name:"",id:"",sum:"",actiontype:"",pay_amount:"",time:"",pay_method:"",files:[],content:"",pay_id:""}),D=m({}),w=d([{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"}]),S=m({}),I=m({}),q=m({});m({});const E=m({}),O=m({name:"",customer_id:"",pay_amount:"",pay_method:"",cheque_number:"",content:"",service_name:"",duration:"",invoice_price:"",time:"",other:"",account_id:"",company_id:""}),M=m({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),R=m({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:""});async function B(){t.value=!0;const{data:e}=await a(Object.assign(C,{searchKey:R.searchKey,actiontype:"employee_company",pageSize:M.pageSize,page:M.currentPage}));A.value=e.data,M.total=e.total,t.value=!1}async function T(e){const{data:t}=await o(Object.assign(I,{used_id:e.id}));1==t.code?(z(P.value),u({type:"success",message:t.msg})):u({type:"error",message:t.msg})}async function z(e){P.value=e;const{data:t}=await n(Object.assign(q,{pay_id:P.value.id,actiontype:"employee_company"}));1==t.code?(P.value=t.data,f.value=!0):u({type:"error",message:t.msg})}async function F(e){const{data:t}=await c(Object.assign(E,{pay_id:e.id}));1==t.code?(B(),u({type:"success",message:t.msg})):u({type:"error",message:t.msg})}return y((()=>{B()})),{searchDetail:R,btnSearchPart:function(){B()},loading:t,small:b,selectList:["PayId","Files","Location Worked","CustomerId","CustomerName","Pay Amount","Used Amount","Remain Amount","Pay Method","Pay Data","Action"],columns:[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"PayId",prop:"pay_id",minWidth:50,hide:({checkList:e})=>!e.includes("PayId")},{label:"Files",prop:"file",minWidth:50,slot:"files",hide:({checkList:e})=>!e.includes("Files")},{label:"Location Worked",prop:"customer_id",minWidth:100,slot:"LocationWorked",hide:({checkList:e})=>!e.includes("Location Worked")},{label:"Pay Amount",prop:"pay_amount",minWidth:100,hide:({checkList:e})=>!e.includes("Pay Amount")},{label:"Used Amount",prop:"balanceInfo",minWidth:120,slot:"balanceInfo",hide:({checkList:e})=>!e.includes("Used Amount")},{label:"Remain Amount",prop:"remain_amount",minWidth:120,hide:({checkList:e})=>!e.includes("Remain Amount")},{label:"Pay Method",prop:"pay_method",minWidth:150,hide:({checkList:e})=>!e.includes("Pay Method")},{label:"Pay Data",prop:"create_time",minWidth:120,hide:({checkList:e})=>!e.includes("Pay Data")},{label:"Action",fixed:"right",width:200,slot:"operation",align:"left",hide:({checkList:e})=>!e.includes("Action")}],pagination:M,handleSizeChange:function(e){M.pageSize=e,B()},handleCurrentChange:function(e){M.currentPage=e,B()},PartList:A,order_date:v,deliverDialog:p,selectClick:(e,t)=>{},itemArr:L,addLocationDialog:g,locationArr:D,EditLocation:function(e){Object.keys(e).map((t=>{D[t]=e[t]}))},btnDellocation:e=>{r.confirm("Are you sure you want to return this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then((()=>{T(e)})).catch((()=>{u({type:"info",message:"Canceled"})}))},singleTableRef:e,infoDialog:f,btnInfo:z,infoArr:P,btnCollection:function(){W.pay_id="",W.content="",W.pay_amount="",W.time="",W.pay_method="",W.files=[],W.name="",W.id="",W.sum="",W.actiontype="employee_company",_.value=!0},CollectionDialog:h,collectionArr:O,payMethodData:w,locationData:k,btncollectionConfirm:async function(){if(t.value=!0,"Cheque"!=O.pay_method&&(O.cheque_number=""),"Cheque"==O.pay_method&&""==O.cheque_number)return u({type:"error",message:"Please enter cheque number"}),void(t.value=!1);let e="";if("Other"==O.pay_method){if(""==O.other)return u({type:"error",message:"Please enter pay method"}),void(t.value=!1);e=O.other}else e=O.pay_method;const{data:a}=await i(Object.assign(S,{company_id:O.company_id,pay_amount:O.pay_amount,pay_method:e,cheque_number:O.cheque_number,content:O.content,account_id:O.account_id,collection_time:O.time,actiontype:"employee_company"}));1==a.code?(B(),u({type:"success",message:a.msg}),h.value=!1):u({type:"error",message:a.msg}),t.value=!1},paymentArr:W,addCollectionDialog:_,eventPrePay:function(){B()},btnFile:function(e){e.length&&(x.value=e,j.value=!0)},onFile:function(e){window.open(e)},fileDialog:j,fileArr:x,btnDelete:e=>{r.confirm("Are you sure you want to delete this item",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then((()=>{F(e)})).catch((()=>{u({type:"info",message:"Canceled"})}))},btnEidt:function(e){W.pay_id=e.id,W.content=e.content,W.pay_amount=e.pay_amount,W.time=e.collection_time,W.pay_method=e.pay_method,W.files=e.file,W.name=e.company_name,W.id=e.customer_id,W.sum="",W.actiontype="employee_company",_.value=!0}}}))}}}));