File: /var/www/html/public/static/js/hookWithdrawList-legacy-0a4a8638.js
System.register(["./po-legacy-706db15a.js","./vue-router-legacy-a12307c3.js","./index-legacy-42c17c53.js","./message-legacy-10af7c73.js","./runtime-core.esm-bundler-legacy-c5df00b7.js","./index-legacy-ad509c6f.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 a,i,c,n,l,s,d,o,r,u,p,m,_,h,y,g,v;return{setters:[e=>{a=e.NoteWithdrawListWeb,i=e.getClinicsListByTherapistWeb,c=e.schNoteWithdrawListWeb,n=e.NoteWithdrawApplyWeb,l=e.getClinicsDetailWeb,s=e.NoteWithdrawDetailWeb,d=e.NoteWithdrawCheckWeb,o=e.NoteWithdrawPaymentWeb,r=e.NoteWithdrawDetailEditWeb,u=e.deleteNoteWithdrawWeb},e=>{p=e.d,m=e.u},e=>{_=e.o},e=>{h=e.b7},e=>{y=e.r,g=e.A,v=e.o},null,null,null,null,null,null,null,null],execute:function(){e("useEqu",(function(){p(),m(),p();const e=y(),t=y(!1),b=y(!1),w=y(!1),f=y(!1),k=y(!1),A=y(!1),W=y(""),D=y(""),j=y([]);y([]);const x=y([]),N=y([]),C=y([]),L=y([]),S=g({}),P=g({tableIndex:0,note:""}),T=g({}),O=g({}),I=g({}),z=g({}),E=g({}),K=g({}),B=g({}),F=g({}),R=g({}),q=g({}),H=g({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),G=g({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",clinic_id:"",split_total:0,role:"",clinic_id1:"",therapists_id:"",is_detail:"",payment_amount:"",payment_comment:"",check_result:"",check_comment:"",withdraw_id:"",edit_amount:0,begin_date:"",last_date:"",last_searvice_date:"",status:""}),J=y([{id:1,text:"Approvel",value:"approvel",is_selected:0},{id:2,text:"disApprovel",value:"disapprovel",is_selected:0}]),M=y([{id:1,text:"Pending",value:"pending",is_selected:0},{id:2,text:"Approvel",value:"approvel",is_selected:0},{id:3,text:"Disapprovel",value:"disapprovel",is_selected:0},{id:4,text:"Edit",value:"edit",is_selected:0},{id:5,text:"Payment",value:"payment",is_selected:0},{id:6,text:"Close",value:"close",is_selected:0},{id:7,text:"All",value:"all",is_selected:0}]);async function Q(){t.value=!0;const{data:e}=await a(Object.assign(S,{role:G.role,clinic_id:G.clinic_id1,therapists_id:G.therapists_id,status:G.status,searchKey:G.searchKey,pageSize:H.pageSize,page:H.currentPage}));j.value=e.data,H.total=e.total,t.value=!1}async function U(){const{data:e}=await c(Object.assign(z,{clinic_id:G.clinic_id,last_date:G.last_date,page:1,pagesize:1e3}));1==e.code&&(x.value=e.data,G.begin_date=e.data_limit.begin_date,G.last_date=e.data_limit.last_date,G.last_searvice_date=e.data_limit.last_searvice_date,V())}function V(){G.split_total=0,x.value.forEach(((e,t)=>{1==e.is_selected&&(G.split_total=(Number(G.split_total)+Number(e.split_amount)).toFixed(4))}))}async function X(e){const{data:t}=await u(Object.assign(I,{withdraw_id:e.id}));1==t.code?(Q(),h({type:"success",message:t.msg})):h({type:"error",message:t.msg})}function Y(){G.edit_amount=0,L.value.forEach(((e,t)=>{1==e.is_selected&&(G.edit_amount=(Number(G.edit_amount)+Number(e.received_amount)).toFixed(4))}))}return v((()=>{G.type=localStorage.getItem("type"),2==G.type&&(G.clinic_id1=localStorage.getItem("clinicIdOverall"),G.role="clinic",G.therapists_id="",async function(){const{data:e}=await l(Object.assign(K,{searchKey:"",clinic_id:G.clinic_id1}));1==e.code&&(C.value=e.data.therapists_user)}()),1==G.type&&(G.clinic_id1="",G.role="therapists",async function(){t.value=!0;const{data:e}=await i(Object.assign(O,{searchKey:""}));1==e.code&&(N.value=e.data),t.value=!1}()),Q()})),{searchDetail:G,btnSearchPart:function(){Q()},loading:t,small:A,selectList:["Idx","Apply Number","Apply Date ","Clinic Name","Therapist Name","Apply Amount","Pay Amount","Date Period","Status","Action"],columns:[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"Idx",type:"index",width:70,hide:({checkList:e})=>!e.includes("Idx")},{label:"Apply Number",prop:"apply_number",minWidth:100,hide:({checkList:e})=>!e.includes("Apply Number")},{label:"Apply Date",prop:"approvel_data",minWidth:100,hide:({checkList:e})=>!e.includes("Apply Date")},{label:"Clinic Name",prop:"clinic_name",minWidth:100,hide:({checkList:e})=>!e.includes("Clinic Name")},{label:"Therapist Name",prop:"Therapist_name",minWidth:100,hide:({checkList:e})=>!e.includes("Therapist Name")},{label:"Apply Amount",prop:"received_amount",minWidth:150,slot:"slotAction",hide:({checkList:e})=>!e.includes("Apply Amount")},{label:"Pay Amount",prop:"payment_amount",minWidth:120,hide:({checkList:e})=>!e.includes("Pay Amount")},{label:"Date Period",prop:"date_period",minWidth:120,hide:({checkList:e})=>!e.includes("Date Period")},{label:"Status",prop:"status",minWidth:120,hide:({checkList:e})=>!e.includes("Status")},{label:"Action",fixed:"right",width:300,slot:"operation",hide:({checkList:e})=>!e.includes("Action")}],pagination:H,handleSizeChange:function(e){H.pageSize=e,Q()},handleCurrentChange:function(e){H.currentPage=e,Q()},PartList:j,order_date:W,deliverDialog:b,selectClick:(e,t)=>{},itemArr:P,addLocationDialog:f,locationArr:T,EditLocation:function(e){Object.keys(e).map((t=>{T[t]=e[t]}))},singleTableRef:e,onWithDrawApplyDialog:w,onWithDrawApply:function(){G.clinic_id="",x.value=[],U(),w.value=!0},WithDrawData:x,onClinicData:function(e){null==e&&(G.clinic_id=""),U()},clinicData:N,SchNoteWithdConfirm:async function(){t.value=!0;const{data:e}=await n(Object.assign(E,{clinic_id:G.clinic_id,data_row:x.value}));1==e.code&&(Q(),w.value=!1),t.value=!1},selectClick3:function(e){V()},onClinicData1:function(e){null==e&&(G.clinic_id1="")},btnSearch:function(){Q()},Therapists:C,onTherapists:function(e){null==e&&(G.therapists_id="")},btnSplit_amount:V,btnDelete:e=>{_.confirm("Are you sure to delete it ? ",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then((()=>{X(e)})).catch((()=>{h({type:"info",message:"Canceled"})}))},detailDialog:k,btnDetail:async function(e,t){G.check_comment="",G.check_result="",G.payment_amount="",G.payment_comment="",G.is_detail=t,G.withdraw_id=e.id;const{data:a}=await s(Object.assign(B,{withdraw_id:e.id}));1==a.code&&(D.value=a.data.info,L.value=a.data.details,G.edit_amount=a.data.info.received_amount,k.value=!0)},detailInfo:D,detailList:L,isData:J,selectedTr:function(e){G.check_result==e.value?G.check_result="":G.check_result=e.value},checkConfirm:async function(){t.value=!0;const{data:e}=await d(Object.assign(F,{check_result:G.check_result,check_comment:G.check_comment,withdraw_id:G.withdraw_id}));1==e.code?(k.value=!1,Q()):h({type:"error",message:e.msg}),t.value=!1},paymentConfirm:async function(){t.value=!0;const{data:e}=await o(Object.assign(R,{payment_amount:G.payment_amount,payment_comment:G.payment_comment,withdraw_id:G.withdraw_id}));1==e.code?(k.value=!1,Q()):h({type:"error",message:e.msg}),t.value=!1},selectClick5:function(e){Y()},btnReceivedAmount:Y,btnEditConfirm:async function(){t.value=!0;const{data:e}=await r(Object.assign(q,{data_row:L.value,withdraw_id:G.withdraw_id}));1==e.code?(k.value=!1,Q()):h({type:"error",message:e.msg}),t.value=!1},disabledBeforeToday:function(e){const t=new Date(G.begin_date).getTime();return e.getTime()<t},loadSchNoteWithdraw:U,statusData:M}}))}}}));