import y from"./BaseForm-5dae83e3-1782729249161v=1.0.0.js";import{i as E,e as F,j as S,k as _}from"./eventApplyMgmtApi-6b4840c2-1782729249161v=1.0.0.js";import{u as L}from"./useFormEdit-fb8b8504-1782729249161v=1.0.0.js";import{a as w}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{E as r}from"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";import{y as c,r as i,m as B,al as C,z as P,I as k,J as A,R as M,u as l,k as d}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 R=c({name:"agreementManageEdit"}),V=c({...R,setup(D){const{closeCurrent:m}=L(),f=i(null),u=i({applicableType:"",name:"",content:"",mobileSignatureStatus:"",status:"",agreementId:""}),o=i(!1),n=w(),p=()=>{m()},g=async a=>{o.value=!0;try{let e=E,t="\u66F4\u65B0\u6210\u529F",s=await e(a);s.code==0?(a.isSubmit&&((await F({id:s.data})).code==0?t="\u66F4\u65B0\u5E76\u63D0\u4EA4\u6210\u529F":t="\u66F4\u65B0\u6210\u529F\u4F46\u672A\u63D0\u4EA4"),r({type:"success",message:`${t}!`})):r.warning(s.msg),o.value=!1,m()}catch{o.value=!1}},v=async a=>{let e=await S(a);if(e.code!=0){r.warning(e.msg);return}e.data.eventTime=[e.data.eventStartTime,e.data.eventEndTime],e.data.auditLastSubmitList=await b(e.data.eventProposerId),u.value=e.data},b=async a=>{const e=await _(a);let t=[];return e.code==0&&e.data.length>0&&(t=e.data.slice(1)),t};return B(()=>{n.query.id&&(f.value=n.query.id,v(n.query.id))}),(a,e)=>{const t=C("HZPageLayout");return P(),k(t,{title:l(n).meta.title,isBack:!0},{default:A(()=>[M(y,{value:l(u),"onUpdate:value":e[0]||(e[0]=s=>d(u)?u.value=s:null),loading:l(o),"onUpdate:loading":e[1]||(e[1]=s=>d(o)?o.value=s:null),onCancel:p,onSubmit:g},null,8,["value","loading"])]),_:1},8,["title"])}}});export{V as default};
