import{_ as B}from"./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";import"./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";import{B as T}from"./BasicForm-dL_oCSPM.js";import{u as k}from"./useForm-CKmgcynv.js";import{V as n,d as y,f as V,c as j,o as q,l as o,w as C,j as A,cZ as F}from"./index-9PRMimni.js";import{A as I}from"./template-rpthWlT9.js";import{u as O}from"./useModal-CO65vga3.js";const{t:a}=n();function P(){return{schemas:[{field:"comment",component:"NInput",giProps:{span:2},label:a("hsqe.planner.modal.reason"),componentProps:{type:"textarea",maxlength:300,showCount:!0},rules:[{required:!0,message:a("hsqe.planner.modal.reasonHint"),trigger:["input","blur"]}]}]}}const W=y({__name:"rejectModal",emits:["success"],setup(r,{expose:c,emit:m}){const i=m,l=F(),u=V(),{t:e}=n(),{schemas:p}=P(),[d,{openModal:f,closeModal:g,setSubLoading:s}]=O({title:e("common.addText"),subBtuText:e("common.okText"),cancelText:e("common.cancelText"),width:650}),[h,{submit:_,getFieldsValue:x}]=k({schemas:p,labelWidth:"auto",layout:"horizontal",gridProps:{cols:2,xGap:15},showActionButtonGroup:!1});async function b(){f()}async function R(){if(!await _())return s(!1),!1;const t=x();await I({busId:u.query.uuid,moduleCode:"seniorVisit",...t}),l.success(e("common.submitRejectText")),g(),s(!1),i("success")}return c({showModal:b}),(w,t)=>{const M=B;return q(),j(M,{ref:"modalRef",onRegister:o(d),onOnOk:R},{default:C(()=>[A(o(T),{onRegister:o(h),"label-placement":"top"},null,8,["onRegister"])]),_:1},8,["onRegister"])}}});export{W as _};
