import{_ as k}from"./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";import"./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";import{u as v}from"./useModal-CO65vga3.js";import{B as R}from"./BasicForm-dL_oCSPM.js";import{u as N}from"./useForm-CKmgcynv.js";import{d as V,r as B,u as w,c as x,o as M,l as o,w as r,i as U,j as p,k as y}from"./index-9PRMimni.js";const S={class:"mt-6"},q=V({__name:"Modal",setup(I,{expose:c}){const u=B(null),l=w(),i=[{field:"name",component:"NInput",label:"姓名",labelMessage:"这是一个提示",giProps:{span:1},componentProps:{placeholder:"请输入姓名",onInput:e=>{console.log(e)}},rules:[{required:!0,message:"请输入姓名",trigger:["blur"]}]},{field:"mobile",component:"NInputNumber",label:"手机",componentProps:{placeholder:"请输入手机号码",showButton:!1,onInput:e=>{console.log(e)}}},{field:"type",component:"NSelect",label:"类型",giProps:{},componentProps:{placeholder:"请选择类型",options:[{label:"舒适性",value:1},{label:"经济性",value:2}],onUpdateValue:e=>{console.log(e)}}},{field:"makeDate",component:"NDatePicker",label:"预约时间",giProps:{},defaultValue:118313526e4,componentProps:{type:"date",onUpdateValue:e=>{console.log(e)}}},{field:"makeTime",component:"NTimePicker",label:"停留时间",giProps:{},componentProps:{clearable:!0,onUpdateValue:e=>{console.log(e)}}},{field:"makeProject",component:"NCheckbox",label:"预约项目",giProps:{},componentProps:{placeholder:"请选择预约项目",options:[{label:"种牙",value:1},{label:"补牙",value:2},{label:"根管",value:3}],onUpdateValue:e=>{console.log(e)}}},{field:"makeSource",component:"NRadioGroup",label:"来源",giProps:{},componentProps:{options:[{label:"网上",value:1},{label:"门店",value:2}],onUpdateValue:e=>{console.log(e)}}},{field:"status",label:"状态",giProps:{},slot:"statusSlot"}],[m,{openModal:d,closeModal:a,setSubLoading:s}]=v({title:"新增预约",width:600,subBtuText:"提交预约"}),[f,{submit:g,getFieldsValue:b}]=N({gridProps:{cols:1},collapsedRows:3,labelWidth:120,layout:"horizontal",submitButtonText:"提交预约",showActionButtonGroup:!1,schemas:i});async function _(){await g()?(console.log("formValues",b()),a(),l.success("提交成功")):(l.error("验证失败，请填写完整信息"),s(!1))}return c({openModal:d,closeModal:a,setSubLoading:s}),(e,T)=>{const P=y;return M(),x(o(k),{onRegister:o(m),ref_key:"modalRef",ref:u,onOnOk:_},{default:r(()=>[U("div",S,[p(o(R),{onRegister:o(f)},{statusSlot:r(({model:t,field:n})=>[p(P,{value:t[n],"onUpdate:value":h=>t[n]=h},null,8,["value","onUpdate:value"])]),_:1},8,["onRegister"])])]),_:1},8,["onRegister"])}}});export{q as _};
