File: /var/www/html/public/static/js/hookClientNoteList-d8890b34.js
import{getEmployeeCompanyInfoWeb as K}from"./employee_company-3cb79bcd.js";import{EmployeeClientNoteWeb as G,yuyueFDF as H,deleteCompanyWeb as J}from"./po-76b72710.js";import{d as y,u as Q}from"./vue-router-a383d220.js";import{o as U}from"./index-81e4a901.js";import{b7 as d}from"./message-2472a54a.js";import{r as i,A as a,o as V}from"./runtime-core.esm-bundler-6128546f.js";import"./index-37b926b2.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 de(){y(),Q(),y();const v=i(),c=i(!1),S=i(!1),f=i(!1),w=i(!1),A=i(!1),C=i(""),g=i([]),l=i([]),E=a({}),P=a({tableIndex:0,note:""}),h=a({}),x=i(1e3),u=a({total:0,pageSize:x.value,pageSizes:[10,15,20,50,100],currentPage:1,background:!0}),p=a({company_id:0,date:"",begin_date:"",end_date:""});a({});const D=a({}),_=i([]),o=a({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),r=a({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",type:"",role:"",clinic_id:"",customer_name:"",service_date:"",service_name:""}),T=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"Idx",type:"index",width:70,hide:({checkList:e})=>!e.includes("Idx")},{label:"Customer Name",prop:"customer_name",minWidth:100,align:"left",hide:({checkList:e})=>!e.includes("Customer Name")},{label:"Service Date",prop:"service_date",minWidth:100,hide:({checkList:e})=>!e.includes("Service Date")},{label:"Service Name",prop:"service_name",minWidth:100,align:"left",hide:({checkList:e})=>!e.includes("Service Name")},{label:"Begin Time",prop:"begin_time",minWidth:100,hide:({checkList:e})=>!e.includes("Begin Time")},{label:"End Time",prop:"end_time",minWidth:150,hide:({checkList:e})=>!e.includes("End Time")},{label:"AM/PM",prop:"am_pm",minWidth:120,hide:({checkList:e})=>!e.includes("AM/PM")},{label:"Files",prop:"file",minWidth:50,slot:"files",hide:({checkList:e})=>!e.includes("Files")},{label:"Action",fixed:"right",width:120,slot:"operation",hide:({checkList:e})=>!e.includes("Action")}],W=["Idx","Customer Name","Service Date","Service Name","Begin Time","End Time","AM/PM","Files","Action"];function z(){n()}function M(e){o.pageSize=e,n()}function k(e){o.currentPage=e,n()}async function n(){c.value=!0;const{data:e}=await G(Object.assign(E,{company_id:p.company_id,customer_name:r.customer_name,service_name:r.service_name,service_date:r.service_date,pageSize:o.pageSize,page:o.currentPage}));e.code==1&&(g.value=e.data,o.total=e.total),c.value=!1}const F=(e,t)=>{};function L(e){Object.keys(e).map(t=>{h[t]=e[t]})}async function N(e){const{data:t}=await J(Object.assign(D,{company_id:e.id}));t.code==1?(n(),d({type:"success",message:t.msg})):d({type:"error",message:t.msg})}const B=e=>{U.confirm("Are you sure you want to delete this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{N(e)}).catch(()=>{d({type:"info",message:"Canceled"})})};async function I(e={}){var s,m;c.value=!0;const{data:t}=await K(Object.assign({},{page:u.currentPage,resault:u.pageSize}));(s=t==null?void 0:t.data)==null||s.forEach((b,X)=>{_.value.push({label:b.company_name,value:b.id})}),((m=t==null?void 0:t.data)==null?void 0:m.length)>0&&(p.company_id=parseInt(t==null?void 0:t.data[0].id)),setTimeout(()=>{c.value=!1,n()},500)}function j(e){n()}function O(e,t,s){e.code==1?n():d({type:"error",message:e.data.msg})}function R(e){l.value=[],e.length&&(e.forEach((t,s)=>{let m={file:t};l.value.push(m)}),l.value.forEach((t,s)=>{t.file=H+t.file.replace("var/www/html/public/","")}),f.value=!0)}function q(e){window.open(e)}return V(()=>{n(),I()}),{searchDetail:r,btnSearchPart:z,loading:c,small:A,selectList:W,columns:T,pagination:u,handleSizeChange:M,handleCurrentChange:k,PartList:g,order_date:C,deliverDialog:S,selectClick:F,itemArr:P,addLocationDialog:w,locationArr:h,EditLocation:L,btnDellocation:B,singleTableRef:v,comp_list:_,search_form:p,wshChange:j,uploadSlotFile1:O,btnFile:R,fileArr:l,onFile:q,fileDialog:f,pagination1:o}}export{de as useEqu};