import{d as j,r as c,b as A,p as F,c as r,e as B,k as N,i as u,g as O,h as e,u as a,f as R,j as T,F as h,m as b,_ as I}from"./index.0308b213.js";const L={class:"dialog-footer"},S=b("\u53D6\u6D88"),$=b("\u786E\u5B9A"),z=j({props:{badData:Object},emits:["submit"],setup(g,{expose:D,emit:E}){const V=g,s=c(!1),i=c(),v=[{value:"\u5B58\u5F53",label:"\u5B58\u5F53"},{value:"\u7EED\u5F53",label:"\u7EED\u5F53"},{value:"\u8D4E\u5F53",label:"\u8D4E\u5F53"},{value:"\u9500\u552E",label:"\u9500\u552E"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}],t=A({name:"",card_id:"",money:0,mobile:"",reference_type:"",reference_no:"",description:""}),y={name:[{required:!0,message:"\u8BF7\u8F93\u5165\u59D3\u540D",trigger:"blur"}],card_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7\u7801",trigger:"blur"}],money:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D89\u53CA\u91D1\u989D",trigger:"blur"}],mobile:[{required:!0,message:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",trigger:"blur"}],reference_type:[{required:!0,message:"\u8BF7\u9009\u62E9\u5F15\u7528\u7C7B\u578B",trigger:"change"}],reference_no:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F15\u7528\u7F16\u53F7",trigger:"blur"}],description:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BE6\u7EC6\u8BF4\u660E",trigger:"blur"}]},C=async()=>{!i.value||await i.value.validate((n,l)=>{console.log(i.value,n,l),n&&(E("submit",t),s.value=!1)})};return F(()=>V.badData,n=>{n&&Object.assign(t,n)},{deep:!0,immediate:!0}),F(()=>s.value,n=>{n||(t.value={name:"",card_id:"",money:0,mobile:"",reference_type:"",reference_no:"",description:""})}),D({visible:s}),(n,l)=>{const p=r("el-input"),d=r("el-form-item"),m=r("el-col"),_=r("el-row"),k=r("el-input-number"),w=r("el-option"),x=r("el-select"),U=r("el-form"),f=r("el-button"),q=r("el-dialog");return B(),N(q,{modelValue:s.value,"onUpdate:modelValue":l[8]||(l[8]=o=>s.value=o),title:"\u65B0\u589E\u4E0D\u826F\u8BB0\u5F55",width:"800px","close-on-click-modal":!1},{footer:u(()=>[O("span",L,[e(f,{onClick:l[7]||(l[7]=o=>s.value=!1)},{default:u(()=>[S]),_:1}),e(f,{type:"primary",onClick:C},{default:u(()=>[$]),_:1})])]),default:u(()=>[e(U,{model:a(t),rules:y,ref_key:"formRef",ref:i,"label-width":"100px"},{default:u(()=>[e(_,{gutter:20},{default:u(()=>[e(m,{span:12},{default:u(()=>[e(d,{label:"\u59D3\u540D",prop:"name"},{default:u(()=>[e(p,{modelValue:a(t).name,"onUpdate:modelValue":l[0]||(l[0]=o=>a(t).name=o),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"},null,8,["modelValue"])]),_:1})]),_:1}),e(m,{span:12},{default:u(()=>[e(d,{label:"\u8BC1\u4EF6\u53F7\u7801",prop:"card_id"},{default:u(()=>[e(p,{modelValue:a(t).card_id,"onUpdate:modelValue":l[1]||(l[1]=o=>a(t).card_id=o),placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7\u7801"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(_,{gutter:20},{default:u(()=>[e(m,{span:12},{default:u(()=>[e(d,{label:"\u6D89\u53CA\u91D1\u989D",prop:"money"},{default:u(()=>[e(k,{modelValue:a(t).money,"onUpdate:modelValue":l[2]||(l[2]=o=>a(t).money=o),precision:2,step:100,min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),e(m,{span:12},{default:u(()=>[e(d,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"mobile"},{default:u(()=>[e(p,{modelValue:a(t).mobile,"onUpdate:modelValue":l[3]||(l[3]=o=>a(t).mobile=o),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(_,{gutter:20},{default:u(()=>[e(m,{span:12},{default:u(()=>[e(d,{label:"\u5F15\u7528\u7C7B\u578B",prop:"reference_type"},{default:u(()=>[e(x,{modelValue:a(t).reference_type,"onUpdate:modelValue":l[4]||(l[4]=o=>a(t).reference_type=o),placeholder:"\u8BF7\u9009\u62E9\u5F15\u7528\u7C7B\u578B",style:{width:"100%"}},{default:u(()=>[(B(),R(h,null,T(v,o=>e(w,{key:o.value,label:o.label,value:o.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(m,{span:12},{default:u(()=>[e(d,{label:"\u5F15\u7528\u7F16\u53F7",prop:"reference_no"},{default:u(()=>[e(p,{modelValue:a(t).reference_no,"onUpdate:modelValue":l[5]||(l[5]=o=>a(t).reference_no=o),placeholder:"\u8BF7\u8F93\u5165\u5F15\u7528\u7F16\u53F7"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(d,{label:"\u8BE6\u7EC6\u8BF4\u660E",prop:"description"},{default:u(()=>[e(p,{modelValue:a(t).description,"onUpdate:modelValue":l[6]||(l[6]=o=>a(t).description=o),type:"textarea",rows:4,placeholder:"\u8BF7\u8F93\u5165\u8BE6\u7EC6\u8BF4\u660E"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}});const H=I(z,[["__scopeId","data-v-0f7bf8f3"]]);export{H as default};
