import{B as E}from"./api.B6TjG0We.js";import{E as d}from"./index.Df8UJ10K.js";import{a as c,i as n,aj as r,J as V,o as _,u as m,y as p,K as a,S as u,P as f}from"./vue.D1BjjNmv.js";const x=c({name:"RefuseNotification"}),I=c({...x,setup(B){const o=n("showRejectDialog"),t=n("rejectReason"),v=n("currentFormId"),s=n("crudExpose"),g=n("closeDialog"),w=async()=>{if(!t.value.trim()){d.warning("请填写拒绝原因");return}await E(v.value,"reject",t.value),d.success("已拒绝申请"),o.value=!1,g(),s==null||s.doRefresh()};return(C,e)=>{const R=r("ElInput"),i=r("ElButton"),j=r("ElDialog");return _(),V(j,{modelValue:m(o),"onUpdate:modelValue":e[2]||(e[2]=l=>p(o)?o.value=l:null),title:"拒绝原因",width:"400px",onClose:e[3]||(e[3]=l=>o.value=!1)},{footer:a(()=>[u(i,{onClick:e[1]||(e[1]=l=>o.value=!1)},{default:a(()=>e[4]||(e[4]=[f("取消")])),_:1}),u(i,{type:"danger",onClick:w},{default:a(()=>e[5]||(e[5]=[f("确认拒绝")])),_:1})]),default:a(()=>[u(R,{type:"textarea",rows:"3",placeholder:"请输入拒绝原因",modelValue:m(t),"onUpdate:modelValue":e[0]||(e[0]=l=>p(t)?t.value=l:null)},null,8,["modelValue"])]),_:1},8,["modelValue"])}}});export{I as _};
