import{_ as h}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{V as l,bk as B,d as S,r as w,c as y,o as x,l as c,w as F,j as P,ac as R}from"./index-9PRMimni.js";import{u as g}from"./useForm-CKmgcynv.js";import{u as k}from"./useModal-CO65vga3.js";const M=B(),{t:e}=l();function v(){return{detailSchemas:[{field:"code",component:"NInput",label:e("sms.smsTemplate.smsFileCode"),componentProps:{disabled:!0}},{field:M.getLocale==="en"?"nameEn":"nameCn",component:"NInput",label:e("sms.smsTemplate.smsFileName"),componentProps:{disabled:!0}},{field:"version",component:"NInput",label:e("sms.smsTemplate.smsFileVersion"),componentProps:{disabled:!0}},{field:"applicantList",component:"BasicSelect",label:e("sms.smsTemplate.applicant"),componentProps:{cacheKey:"sms_report_role",block:!0,multiple:!0,disabled:!0}},{field:"frequency",component:"BasicSelect",label:e("sms.smsTemplate.interval"),componentProps:{optionType:"number",cacheKey:"sms_frequency",block:!0,disabled:!0}},{field:"subFlow",component:"BasicSelect",label:e("sms.smsTemplate.approvalProcess"),componentProps:{cacheKey:"sms_file_flow",block:!0,disabled:!0}},{field:"busType",component:"BasicSelect",label:e("sms.smsTemplate.businessType"),componentProps:{cacheKey:"sms_busType",block:!0,optionType:"number",disabled:!0}}]}}const A=S({__name:"SMSDetailModal",setup(m,{expose:r}){const{t:s}=l(),{detailSchemas:i}=v(),[p,{setFieldsValue:u}]=g({gridProps:{cols:4},schemas:i,showAdvancedButton:!1}),[d,{openModal:f}]=k({title:s("sms.smsTemplate.details"),subBtuText:s("common.confirmText"),cancelText:s("common.cancelText"),width:1100}),o=w();function b(a){o.value=a;const n={...o.value,applicantList:o.value.applicantList.map(t=>t.code)};f(),R(()=>{u(n)})}return r({showModal:b}),(a,n)=>{const t=T,_=h;return x(),y(_,{ref:"modalRef",onRegister:c(d),class:"basicModal basicFormModal",showAction:!1},{default:F(()=>[P(t,{onRegister:c(p),showActionButtonGroup:!1,showSubmitButton:!1,showResetButton:!1,ref:"formRef"},null,8,["onRegister"])]),_:1},8,["onRegister"])}}});export{A as _};
