File: /var/www/html/public/static/js/hookCustomerSubmit-37976923.js
import{getEvaluationHref as O,yuyueFDF as M,SubmitEvaluationHref as N,deleteCompanyWeb as q}from"./po-338e700f.js";import{d as h,u as I}from"./vue-router-a383d220.js";import{o as K}from"./index-81e4a901.js";import{b7 as n}from"./message-2472a54a.js";import{r as a,A as i,o as G}from"./runtime-core.esm-bundler-6128546f.js";import"./index-d44f8e28.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(){const{query:c,params:J}=h();I(),h();const f=a(),d=a(!1),g=a(!1),_=a(!1),y=a(!1),b=a(""),u=a([]),l=a([]),v=a(["#99A9BF","#F7BA2A","#FF9900"]),A=i({}),P=i({tableIndex:0,note:""}),p=i({}),w=i({}),C=i({}),m=i({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),o=i({order_key:"",material_key:"",truck_key:"",truck_id:"",comment:"",show:"",searchKey:"",service_date:"",service_name:"",is_do:1,canuse_deducation:"",confirm_comment:""}),S=[{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")}],k=["勾选列","Company","HST#","Name","Postal","Phone","Email","Address","Provice","City","Action"];function E(){s()}function W(e){m.pageSize=e,s()}function F(e){m.currentPage=e,s()}async function s(){d.value=!0;let e="";c.s&&(e=c.s);const{data:t}=await O(Object.assign(A,{evaluation_key:e}));t.code==1&&(l.value=t.data,o.service_name=t.data.service_name,o.service_date=t.data.service_date,o.canuse_deducation=t.data.canuse_deducation_list.length>0?t.data.canuse_deducation_list[0].deducation_show:"",o.confirm_comment=t.data.confirm_comment),d.value=!1}const x=(e,t)=>{};function D(e){Object.keys(e).map(t=>{p[t]=e[t]})}async function T(e){const{data:t}=await q(Object.assign(C,{company_id:e.id}));t.code==1?(s(),n({type:"success",message:t.msg})):n({type:"error",message:t.msg})}const B=e=>{K.confirm("Are you sure you want to delete this location",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{T(e)}).catch(()=>{n({type:"info",message:"Canceled"})})};function H(e){}function L(e,t,r){u.value=r}function R(e){}async function j(){let e="";c.s&&(e=c.s),u.value.forEach((r,Q)=>{let z={file_name:r.name,file_path:M+r.response.data.file_path.replace("/var/www/html/public","")};l.value.image.push(z)});const{data:t}=await N(Object.assign(w,{evaluation_key:e,date_row:l.value}));t.code==1?(o.is_do=2,t.is_use==1?n({type:"success",message:t.use_msg}):n({type:"success",message:t.msg})):n({type:"error",message:t.msg})}return G(()=>{s()}),{searchDetail:o,btnSearchPart:E,loading:d,small:y,selectList:k,columns:S,pagination:m,handleSizeChange:W,handleCurrentChange:F,PartList:l,order_date:b,deliverDialog:g,selectClick:x,itemArr:P,addLocationDialog:_,locationArr:p,EditLocation:D,btnDellocation:B,singleTableRef:f,colors:v,changeRate:H,uploadSlotFile1:L,handleChangePic:R,onSubmitRate:j}}export{ce as useEqu};