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/hookPrePay-122c1f6b.js
import{AccountListWeb as ce,prePaidWeb as le,payMethodWeb as se,yuyueFDF as m,deleteCompanyWeb as re}from"./po-d8d0fdf7.js";import{getEmployeeCompanyInfoWeb as de}from"./employee_company-4c806def.js";import{d as x,u as me}from"./vue-router-a383d220.js";import{o as ue}from"./index-81e4a901.js";import{b7 as s}from"./message-2472a54a.js";import{r as n,A as c,w as ye,o as pe}from"./runtime-core.esm-bundler-6128546f.js";import"./index-53dae824.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 qe(a,_){const{query:g,params:fe}=x(),W=me();x();const q=n(),r=n(!1),M=n(!1),A=n(!1),b=n(!1),O=n(!1),k=n(!1),I=n(""),v=n([]),C=n([]),T=n([]),j=c({}),L=c({}),R=c({}),N=c({}),P=n([]),B=n(),t=c({company_id:"",name:"",customer_id:"",pay_amount:"",pay_method:"",cheque_number:"",content:"",service_name:"",duration:"",invoice_price:"",time:"",other:"",account_id:"",files:[],files1:[],pay_id:""}),l=c({tableIndex:0,note:"",str:"",actiontype:""}),y=c({name:"",id:"",clinic_id:""}),w=c({});c({});const V=c({}),f=c({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),o=c({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",type:"",role:"",clinic_id:""}),z=n([{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"}]),F=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"Company",prop:"company_name",minWidth:100,hide:({checkList:e})=>!e.includes("Company")},{label:"HST#",prop:"hst",minWidth:100,hide:({checkList:e})=>!e.includes("HST#")},{label:"Name",prop:"first_name",minWidth:100,hide:({checkList:e})=>!e.includes("Name")},{label:"Postal",prop:"postal",minWidth:100,hide:({checkList:e})=>!e.includes("Postal")},{label:"Phone",prop:"phone",minWidth:150,slot:"slotAction",hide:({checkList:e})=>!e.includes("Phone")},{label:"Email",prop:"email",minWidth:120,hide:({checkList:e})=>!e.includes("Email")},{label:"Address",prop:"address",minWidth:120,hide:({checkList:e})=>!e.includes("Address")},{label:"Provice",prop:"state",minWidth:120,hide:({checkList:e})=>!e.includes("Provice")},{label:"City",prop:"city",minWidth:120,hide:({checkList:e})=>!e.includes("City")},{label:"Action",fixed:"right",width:120,slot:"operation",hide:({checkList:e})=>!e.includes("Action")}],H=["勾选列","Company","HST#","Name","Postal","Phone","Email","Address","Provice","City","Action"];function K(){p()}function X(e){f.pageSize=e,p()}function G(e){f.currentPage=e,p()}async function p(){o.type=localStorage.getItem("type"),o.type==2&&(o.role="clinic"),o.type==1&&(o.role="therapists"),o.clinic_id=localStorage.getItem("clinicIdOverall"),r.value=!0;const{data:e}=await ce(Object.assign(j,{clinic_id:o.clinic_id,role:o.role,searchKey:o.searchKey}));e.code==1&&(v.value=e.data),r.value=!1}const Y=(e,i)=>{};function J(e){Object.keys(e).map(i=>{w[i]=e[i]})}async function Q(e){const{data:i}=await re(Object.assign(V,{company_id:e.id}));i.code==1?(p(),s({type:"success",message:i.msg})):s({type:"error",message:i.msg})}const U=e=>{ue.confirm("Are you sure you want to delete this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{Q(e)}).catch(()=>{s({type:"info",message:"Canceled"})})};function Z(){y.clinic_id=o.clinic_id,A.value=!0}function $(){t.customer_id=y.id,t.name=y.name}async function ee(){r.value=!0;let e="";if(l.actiontype){if(t.pay_method!="Cheque"&&(t.cheque_number=""),t.pay_method=="Cheque"&&t.cheque_number==""){s({type:"error",message:"Please enter cheque number"}),r.value=!1;return}if(t.pay_method=="Other"){if(t.other==""){s({type:"error",message:"Please enter pay method"}),r.value=!1;return}e=t.other}else e=t.pay_method}else e=t.pay_method;let i="",d="";l.actiontype?(i="",a.str==3?d=t.company_id:d=t.customer_id):(d="",i=t.customer_id);const{data:u}=await le(Object.assign(R,{customer_id:i,pay_amount:t.pay_amount,pay_method:e,cheque_number:t.cheque_number,content:t.content,collection_time:t.time,account_id:t.account_id,files:t.files,company_id:d,actiontype:l.actiontype,pay_id:t.pay_id}));u.code==1?(l.str==""?s({type:"success",message:u.msg}):(_("update:addCollectionDialog",!1),_("eventPrePay")),Object.keys(t).map(E=>{E!="time"&&(t[E]=""),t.files=[],t.files1=[]}),r.value=!1):(r.value=!1,s({type:"error",message:u.msg}))}function te(){W.push({path:"/crm/yuyue/PayHistories",query:{}})}async function S(){const{data:e}=await se(Object.assign(L,{searchKey:"",clinic_id:o.clinic_id,role:o.role}));e.code==1&&(C.value=e.data)}function D(){var e=new Date,i=e.getFullYear(),d=("0"+(e.getMonth()+1)).slice(-2),u=("0"+e.getDate()).slice(-2);t.time=i+"-"+d+"-"+u}async function ae(){const{data:e}=await de(Object.assign(N,{page:"",resault:"",Search_key:""}));e.code==1?P.value=e.data:s({type:"error",message:e.msg})}function ie(){S()}function ne(){b.value=!0}function h(){D(),a.str&&(l.str=a.str,t.name=a.paymentArr.name,t.customer_id=a.paymentArr.id,D(),t.pay_id="",t.content="",t.files=[],t.files1=[],t.pay_method="",t.pay_amount="",a.paymentArr.pay_id&&(t.time=a.paymentArr.time,t.pay_id=a.paymentArr.pay_id,t.content=a.paymentArr.content,t.files=a.paymentArr.files,t.pay_method=a.paymentArr.pay_method,t.pay_amount=a.paymentArr.pay_amount,a.paymentArr.files&&a.paymentArr.files.forEach((e,i)=>{e.includes(m+"//images/")?t.files1.push(e.replace(m+"//images/","")):e.includes(m+"/images/")?t.files1.push(e.replace(m+"/images/","")):t.files1.push(e.replace(m+"//images/",""))}),a.paymentArr.actiontype&&(t.company_id=a.paymentArr.id)),a.str==3&&ae()),a.paymentArr.actiontype&&(l.actiontype=a.paymentArr.actiontype)}function oe(e,i,d){e.code==1?(t.files.push(m+e.data.file_path.replace("var/www/html/public","")),t.files1.push(e.data.file_name)):s({type:"error",message:e.data.msg})}return ye(a.paymentArr,(e,i)=>{h()}),pe(()=>{h(),S()}),{searchDetail:o,btnSearchPart:K,loading:r,small:k,selectList:H,columns:F,pagination:f,handleSizeChange:X,handleCurrentChange:G,PartList:v,order_date:I,deliverDialog:M,selectClick:Y,itemArr:l,addLocationDialog:O,locationArr:w,EditLocation:J,btnDellocation:U,singleTableRef:q,collectionArr:t,onSelClient:Z,ClientDialog:A,ClientData:y,eventIsNum:$,payMethodData:z,AccountData:T,btncollectionConfirm:ee,btnGoView:te,uploadSlotFile1:oe,payMethodData2:C,eventPay:ie,payConfigDialog:b,btnEdit:ne,itemArr:l,locationData:P,upload:B}}export{qe as useEqu};