import{S as p,d as v,r as x,a as E,c as u,f as V,g as j,l as r,m as l,j as y,E as F}from"./index.2c7321ca.js";import{_ as C}from"./_plugin-vue_export-helper.cdc0426e.js";function B(e,f,s){return p({url:`/api/front/fapiao/apply/writer/list?page=${f}&limit=${s}`,method:"post",data:e})}function S(e){return p({url:"/api/front/fapiao/apply/writer/summary",method:"post",data:e})}function w(e){return p({url:"/api/front/fapiao/apply/reject",method:"post",data:e})}function $(e){return p({url:"/api/front/fapiao/writer/excel",method:"post",data:e,responseType:"blob"})}const h=v({__name:"RefuseDialog",emits:["refreshList","cancel"],setup(e,{expose:f,emit:s}){const _=x(),o=E({dialogVisible:!0,form:{id:"",rejectReason:""},rules:{rejectReason:[{required:!0,message:"\u8BF7\u8F93\u5165\u62D2\u7EDD\u5F00\u7968\u539F\u56E0",trigger:"blur"}]}}),b=a=>{console.log(a),o.form.id=a.id},m=()=>{s("cancel")},R=async a=>{!a||await a.validate((t,g)=>{t&&w(o.form).then(c=>{let{code:d,message:n,data:D}=c;if(d!==200){F.error(n);return}m(),F.success("\u64CD\u4F5C\u6210\u529F"),s("refreshList")})})};return f({openDialog:b}),(a,t)=>{const g=u("el-input"),c=u("el-form-item"),d=u("el-form"),n=u("el-button"),D=u("el-dialog");return V(),j("div",null,[r(D,{modelValue:o.dialogVisible,"onUpdate:modelValue":t[2]||(t[2]=i=>o.dialogVisible=i),width:"480px",title:"\u62D2\u7EDD\u5F00\u7968",onClose:m},{footer:l(()=>[r(n,{type:"primary",size:"default",onClick:t[1]||(t[1]=i=>R(_.value))},{default:l(()=>[y("\u63D0\u4EA4")]),_:1}),r(n,{size:"default",onClick:m},{default:l(()=>[y("\u53D6\u6D88")]),_:1})]),default:l(()=>[r(d,{class:"demo-ruleForm",ref_key:"ruleFormRef",ref:_,model:o.form,rules:o.rules,"status-icon":""},{default:l(()=>[r(c,{label:"\u62D2\u7EDD\u539F\u56E0",prop:"rejectReason"},{default:l(()=>[r(g,{modelValue:o.form.rejectReason,"onUpdate:modelValue":t[0]||(t[0]=i=>o.form.rejectReason=i),autosize:{minRows:4,maxRows:6},type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u62D2\u7EDD\u5F00\u7968\u539F\u56E0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}});const k=C(h,[["__scopeId","data-v-70b6a975"]]),L=Object.freeze(Object.defineProperty({__proto__:null,default:k},Symbol.toStringTag,{value:"Module"}));export{k as R,S as a,L as b,$ as f,B as g};
