Modal.bc192d.js 1.9 KB

1
  1. import{aT as c,ac as g,_ as A,d as V,bs as N,w as f,r as p,o as B,G as F,C as u,j as l,l as r,b1 as h,bS as M,h as D,M as R,aq as k}from"./index.js";import{u as S}from"./useTask.8a645393.js";const{VITE_PROXY_DOMAIN_REAL:P,VITE_PROXY_USER_REAL:T}=g(),i=T+"/admin/",U=e=>c.request("post",`${i}companyCgd/list`,{data:e}),L=e=>c.request("post",`${i}companyCgd/update`,{data:e}),q=e=>c.request("post",`${i}companyCgd/create`,{data:e}),w={class:"w-full flex justify-end"},x=V({__name:"Modal",props:{visible:{type:Boolean,required:!0}},emits:["refresh"],setup(e,{emit:_}){const a=N(e,"visible"),v={companyNo:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8",trigger:"blur"}]},m=S({success(){a.value=!1,t.value.companyNo="",_("refresh")}}),d=f(null),t=f({companyNo:""});async function y(){var n;try{await((n=d.value)==null?void 0:n.validate()),m.run(q(t.value))}catch{}}return(n,o)=>{const E=p("ElFormItem"),C=p("ElButton"),b=p("ElDialog");return B(),F(b,{modelValue:r(a),"onUpdate:modelValue":o[1]||(o[1]=s=>k(a)?a.value=s:null),center:"",title:"\u6DFB\u52A0\u4E1A\u52A1\u516C\u53F8",onClose:o[2]||(o[2]=s=>t.value.companyNo="")},{default:u(()=>[l(r(h),{model:t.value,rules:v,ref_key:"formRef",ref:d},{default:u(()=>[l(E,{label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyNo"},{default:u(()=>[l(r(M),{modelValue:t.value.companyNo,"onUpdate:modelValue":o[0]||(o[0]=s=>t.value.companyNo=s),placeholder:"\u4E1A\u52A1\u516C\u53F8"},null,8,["modelValue"])]),_:1}),D("div",w,[l(C,{type:"primary",loading:r(m).loading,onClick:y},{default:u(()=>[R("\u4FDD\u5B58")]),_:1},8,["loading"])])]),_:1},8,["model"])]),_:1},8,["modelValue"])}}});var j=A(x,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/serviceParam/purchaseSetting/Modal.vue"]]),X=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"}));export{j as M,U as a,X as b,L as h};