File: /var/www/html/public/static/js/hookChineseMedical-893ab5bc.js
import{getNoteFormWeb as T,submitNoteFormWeb as L,deleteCompanyWeb as j}from"./po-6ea0d708.js";import{d as u,u as z}from"./vue-router-a383d220.js";import{o as M}from"./index-81e4a901.js";import{b7 as s}from"./message-2472a54a.js";import{r as i,A as o,w as O,o as B}from"./runtime-core.esm-bundler-6128546f.js";import"./index-efb67349.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 Z(a,d){u(),z(),u();const h=i(),c=i(!1),f=i(!1),y=i(!1),g=i(!1),b=i(""),l=i([]);i([{id:1,child:[{id:1,type:"text",desc:"姓名",value:"",colspan:2,rowspan:1},{id:2,type:"input",desc:"",value:"",colspan:2,rowspan:1},{id:2,type:"checkbox",desc:"",value:!1,colspan:0,rowspan:0}]}]);const A=o({}),_=o({tableIndex:0,note:""}),m=o({});o({});const p=o({}),r=o({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),w=o({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",type:"",role:"",clinic_id:""}),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")}],C=["勾选列","Company","HST#","Name","Postal","Phone","Email","Address","Provice","City","Action"];function v(){n()}function W(e){r.pageSize=e,n()}function x(e){r.currentPage=e,n()}async function n(){const{data:e}=await T(Object.assign(A,{note_id:a.chineseArr.note_id,form_type:a.chineseArr.form_type}));e.code==1&&(l.value=e.data.content)}const k=(e,t)=>{};function S(e){Object.keys(e).map(t=>{m[t]=e[t]})}async function E(e){const{data:t}=await j(Object.assign(p,{company_id:e.id}));t.code==1?(n(),s({type:"success",message:t.msg})):s({type:"error",message:t.msg})}const D=e=>{M.confirm("Are you sure you want to delete this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{E(e)}).catch(()=>{s({type:"info",message:"Canceled"})})};async function N(){c.value=!0;let e={detail:l.value};const{data:t}=await L(Object.assign(p,{note_id:a.chineseArr.note_id,form_type:a.chineseArr.form_type,data_row:e}));t.code==1?(c.value=!1,d("update:chineseMedicalDialog",!1),d("eventChinese"),s({type:"success",message:t.msg})):s({type:"error",message:t.msg})}return O(a.chineseArr,(e,t)=>{n()}),B(()=>{n()}),{searchDetail:w,btnSearchPart:v,loading:c,small:g,selectList:C,columns:P,pagination:r,handleSizeChange:W,handleCurrentChange:x,PartList:l,order_date:b,deliverDialog:f,selectClick:k,itemArr:_,addLocationDialog:y,locationArr:m,EditLocation:S,btnDellocation:D,singleTableRef:h,submitNoteForm:N}}export{Z as useEqu};