import g from"./BaseForm-5dae83e3-1782729249161v=1.0.0.js";import{d as b,e as E}from"./eventApplyMgmtApi-6b4840c2-1782729249161v=1.0.0.js";import{u as v}from"./useFormEdit-fb8b8504-1782729249161v=1.0.0.js";import{a as B}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{E as i}from"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";import{y as c,r as n,al as _,z as y,I as F,J as C,R as S,u as r,k as m}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";import"./eleValidate-2ce2196e-1782729249161v=1.0.0.js";import"./usePrint-d863a9cc-1782729249161v=1.0.0.js";import"./keepAlive-20a782c5-1782729249161v=1.0.0.js";const A=c({name:"agreementManageAdd"}),Z=c({...A,setup(R){const{closeCurrent:l}=v(),s=n({applicableType:"\u8D5B\u4E8B\u62A5\u540D",name:"",content:"",mobileSignatureStatus:0,status:1,agreementId:""}),t=n(!1),p=()=>{l()};n("");const f=B(),d=async u=>{t.value=!0;try{let e=b,o="\u65B0\u589E\u6210\u529F",a=await e(u);a.code==0?(u.isSubmit&&((await E({id:a.data})).code==0?o="\u65B0\u589E\u5E76\u63D0\u4EA4\u6210\u529F":o="\u65B0\u589E\u6210\u529F\u4F46\u672A\u63D0\u4EA4"),i({type:"success",message:`${o}!`}),l()):i.warning(a.msg)}catch{}finally{t.value=!1}};return(u,e)=>{const o=_("HZPageLayout");return y(),F(o,{title:r(f).meta.title,isBack:!0},{default:C(()=>[S(g,{value:r(s),"onUpdate:value":e[0]||(e[0]=a=>m(s)?s.value=a:null),loading:r(t),"onUpdate:loading":e[1]||(e[1]=a=>m(t)?t.value=a:null),onCancel:p,onSubmit:d},null,8,["value","loading"])]),_:1},8,["title"])}}});export{Z as default};
