File: /var/www/html/public/static/js/hookIdentity-ab67df6a.js
import{getCompanyListWeb as L,updateRoleWeb as R,deleteCompanyWeb as T}from"./po-7d33d434.js";import{d as m,u as D}from"./vue-router-a383d220.js";import{o as j}from"./index-81e4a901.js";import{b7 as l}from"./message-2472a54a.js";import{A as o,r as i,o as z}from"./runtime-core.esm-bundler-6128546f.js";import"./index-9a513338.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 X(){o({count:0}),m(),D(),m();const p=i(),n=i(!1),u=i(!1),h=i(!1),f=i(!1),g=i(""),c=i([]),b=o({}),y=o({tableIndex:0,note:""}),r=o({});o({});const S=o({}),C=o({}),s=o({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),d=o({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:""}),P=[{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")}],A=["勾选列","Company","HST#","Name","Postal","Phone","Email","Address","Provice","City","Action"];function W(){a()}function I(e){s.pageSize=e,a()}function w(e){s.currentPage=e,a()}async function a(){n.value=!0;const{data:e}=await L(Object.assign(b,{searchKey:d.searchKey}));c.value=e.data,n.value=!1}const _=(e,t)=>{};function k(e){Object.keys(e).map(t=>{r[t]=e[t]})}async function v(e){const{data:t}=await T(Object.assign(S,{company_id:e.id}));t.code==1?(a(),l({type:"success",message:t.msg})):l({type:"error",message:t.msg})}const x=e=>{j.confirm("Are you sure you want to delete this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{v(e)}).catch(()=>{l({type:"info",message:"Canceled"})})};async function E(e){const{data:t}=await R(Object.assign(C,{role:e,openId:""}));t.code==603||t.code==604?e==1?(localStorage.setItem("attestation","attestation"),localStorage.setItem("is_therapist",1),localStorage.setItem("is_therapist1",1)):e==0||(e==2?localStorage.setItem("CertificationClinics","CertificationClinics"):e==3&&localStorage.setItem("School","School")):(localStorage.setItem("type",e),localStorage.setItem("userInfo",t.data))}return z(()=>{localStorage.setItem("type",1),a()}),{searchDetail:d,btnSearchPart:W,loading:n,small:f,selectList:A,columns:P,pagination:s,handleSizeChange:I,handleCurrentChange:w,PartList:c,order_date:g,deliverDialog:u,selectClick:_,itemArr:y,addLocationDialog:h,locationArr:r,EditLocation:k,btnDellocation:x,singleTableRef:p,btnRegRole:E}}export{X as useEqu};