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/hookReconciliation-28ef94c7.js
import{getScheduleInvoiceWeb as Z,getCheckMembersWeb as $,invoiceBalanceWeb as ee,prePaidWeb as te,deleteCompanyWeb as ne}from"./po-1a9cc2b0.js";import{d as w,u as ae}from"./vue-router-a383d220.js";import{b7 as i}from"./message-2472a54a.js";import{o as oe}from"./index-81e4a901.js";import{r as n,A as t,o as ie}from"./runtime-core.esm-bundler-6128546f.js";import"./index-2632a64c.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 Ce(){w(),ae(),w();const I=n(),l=n(!1),P=n(!1),b=n(!1),T=n(!1),g=n(!1),W=n(!1),D=n(""),d=n([]),k=n([]),u=n([]),x=t({}),M=t({tableIndex:0,note:""}),c=t({Client_name:"",Client_id:""}),p=t({name:"",id:"",clinic_id:""}),o=t({name:"",customer_id:"",pay_amount:"",pay_method:"",cheque_number:"",content:"",invoice_id:"",total_amount1:"",total_amount2:""}),v=t({}),S=t({}),B=t({}),N=t({}),O=t({}),h=t({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),A=t({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",searchKey1:""}),j=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"序号列",type:"index",width:70,hide:({checkList:e})=>!e.includes("序号列")},{label:"Invoice No",prop:"invoice_number",minWidth:100,hide:({checkList:e})=>!e.includes("Invoice No")},{label:"Total Charge",prop:"total_amount",minWidth:100,hide:({checkList:e})=>!e.includes("Total Charge")},{label:"Paid Amount",prop:"pay_amount",minWidth:100,hide:({checkList:e})=>!e.includes("Paid Amount")},{label:"Need Charge",prop:"need_charge_amount",minWidth:100,hide:({checkList:e})=>!e.includes("Need Charge")},{label:"Invoice Time",prop:"invoice_date",minWidth:150,hide:({checkList:e})=>!e.includes("Invoice Time")},{label:"Charge Amount",prop:"email",minWidth:150,slot:"operation",hide:({checkList:e})=>!e.includes("Charge Amount")}],E=["Invoice No","Total Charge","Paid Amount","Need Charge","Invoice Time","Charge Amount"];function F(){s()}function L(e){h.pageSize=e,s()}function q(e){h.currentPage=e,s()}async function s(){if(c.Client_name==""){i({type:"error",message:"Please select a Client"});return}l.value=!0;const{data:e}=await Z(Object.assign(x,{customer_id:c.Client_id,searchKey:A.searchKey1}));d.value=e.data,o.total_amount1=e.total_amount,l.value=!1}const z=(e,a)=>{};function K(e){Object.keys(e).map(a=>{v[a]=e[a]})}async function R(e){const{data:a}=await ne(Object.assign(B,{company_id:e.id}));a.code==1?(s(),i({type:"success",message:a.msg})):i({type:"error",message:a.msg})}const G=e=>{oe.confirm("Are you sure you want to delete this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{R(e)}).catch(()=>{i({type:"info",message:"Canceled"})})};function H(){p.clinic_id=localStorage.getItem("clinicIdOverall"),b.value=!0}function J(){c.Client_id=p.id,c.Client_name=p.name,s(),_()}async function _(){const{data:e}=await $(Object.assign(N,{customer_id:c.Client_id}));e.code==1?(u.value=e.data,o.total_amount2=e.total_amount):i({type:"error",message:e.msg})}async function Q(){l.value=!0;const{data:e}=await ee(Object.assign(S,{customer_id:c.Client_id,invoice_details:d.value,pay_detail:u.value}));e.code==1?(i({type:"success",message:e.msg}),s(),_()):i({type:"error",message:e.msg}),l.value=!1}function U(){g.value=!0}async function V(){const{data:e}=await te(Object.assign(O,{customer_id:c.Client_id,pay_amount:o.pay_amount,pay_method:o.pay_method,cheque_number:o.cheque_number,content:o.content}));e.code==1?(_(),i({type:"success",message:e.msg}),g.value=!1):i({type:"error",message:e.msg})}function X(){const e=o.total_amount1,a=o.total_amount2;let f=Math.min(e,a),y=Math.min(e,a);d.value.forEach((r,Y)=>{const m=r.need_charge_amount,C=Math.min(m,f);C>0&&(r.paid_amount=C,f=parseFloat((f-C).toFixed(2)))}),u.value.forEach((r,Y)=>{const m=Math.min(r.remain_amount,y);m>0&&(r.paid_amount=m,y=parseFloat((y-m).toFixed(2)))})}return ie(()=>{}),{searchDetail:A,btnSearchPart:F,loading:l,small:W,selectList:E,columns:j,pagination:h,handleSizeChange:L,handleCurrentChange:q,PartList:d,order_date:D,deliverDialog:P,selectClick:z,itemArr:M,addLocationDialog:T,locationArr:v,EditLocation:K,btnDellocation:G,singleTableRef:I,addForm:c,ClientDialog:b,eventIsNum:J,ClientData:p,onSelClient:H,loadPartList:s,invoiceBalanceData:k,AddCollect:U,addCollectionDialog:g,collectionArr:o,CollectionData:u,btncollectionConfirm:V,invoiceBalanceConfirm:Q,AutoBalance:X}}export{Ce as useEqu};