import{b as T}from"./eleValidate-aae13e4d-1782572373740v=1.0.0.js";import{b as $}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{y as G,c as E,r as m,m as H,al as n,z as d,I as f,J as l,B as N,R as a,a8 as g,a9 as b,u as t,A as B,Q as F,a4 as y,O as p,P as C}from"./vendor-866bb149-1782572373740v=1.0.0.js";const K={materialContent:[],qrUrl:[],receivedNum:[{required:!0,message:"\u8BF7\u8F93\u5165\u5DF2\u9886\u53D6\u4EBA\u6570",trigger:"blur"},{pattern:T,message:"\u8F93\u5165\u7684\u6B63\u6570\u683C\u5F0F\u6709\u8BEF",trigger:"blur"}],num:[{required:!0,message:"\u8BF7\u8F93\u5165\u7269\u8D44\u603B\u6570",trigger:"blur"},{pattern:T,message:"\u8F93\u5165\u7684\u6B63\u6570\u683C\u5F0F\u6709\u8BEF",trigger:"blur"}],teamReceiveType:[],unitReceiveType:[],creator:[{max:32,message:"\u6700\u591A 32 \u4E2A\u5B57\u7B26",trigger:"blur"}],creatorName:[],updater:[{max:32,message:"\u6700\u591A 32 \u4E2A\u5B57\u7B26",trigger:"blur"}],createTime:[],updateTime:[],eventId:[{required:!0,message:"\u8BF7\u9009\u62E9\u8D5B\u4E8Bid",trigger:"change"}]},W={class:"pt20 mt30"},ee=G({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(A,{emit:O}){$();let x=A;const i=O,o=E({get(){return J(x.value)},set(r){i("update:value",r)}}),P=E({get(){return x.loading},set(r){i("update:loading",r)}}),D=m();m({xs:24,sm:22,md:20,lg:14,xl:13});const c=m({xs:24,sm:24,md:12,lg:12,xl:12});m({xs:24,sm:22,md:18,lg:16,xl:8});const w=m([]),U=m([]),q=m([]),S=()=>{},J=r=>r,j=()=>JSON.parse(JSON.stringify(o.value)),z=r=>{r.validate(async(u,v)=>{if(u){let s=j();i("submit",s)}else{const s=Object.keys(v)[0];r.scrollToField(s)}})},I=()=>{i("cancel")};return H(()=>{}),(r,u)=>{const v=n("el-input"),s=n("el-form-item"),_=n("PaCol"),k=n("el-radio"),R=n("el-radio-group"),L=n("el-checkbox"),h=n("el-checkbox-group"),M=n("PaRow"),V=n("el-button"),Q=n("el-form");return d(),f(Q,{model:t(o),ref_key:"formRef",ref:D,rules:t(K),"label-width":"160px"},{default:l(()=>[u[7]||(u[7]=N("div",{class:"divider mb30"},"\u57FA\u7840\u4FE1\u606F",-1)),a(M,null,{default:l(()=>[a(_,g(b(t(c))),{default:l(()=>[a(s,{label:"\u7269\u8D44\u5185\u5BB9",prop:"materialContent"},{default:l(()=>[a(v,{type:"textarea",modelValue:t(o).materialContent,"onUpdate:modelValue":u[0]||(u[0]=e=>t(o).materialContent=e),placeholder:"\u8BF7\u8F93\u5165\u7269\u8D44\u5185\u5BB9"},null,8,["modelValue"])]),_:1})]),_:1},16),a(_,g(b(t(c))),{default:l(()=>[a(s,{label:"\u56E2\u961F\u62A5\u540D\u7269\u8D44\u9886\u53D6\u65B9\u5F0F",prop:"teamReceiveType"},{default:l(()=>[a(R,{modelValue:t(o).teamReceiveType,"onUpdate:modelValue":u[1]||(u[1]=e=>t(o).teamReceiveType=e)},{default:l(()=>[(d(!0),B(F,null,y(t(w),e=>(d(),f(k,{key:e.value,label:e.label,value:e.value},{default:l(()=>[p(C(e.label),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16),a(_,g(b(t(c))),{default:l(()=>[a(s,{label:"\u5355\u4F4D\u9886\u961F\u62A5\u540D\u7269\u8D44\u9886\u53D6",prop:"unitReceiveType"},{default:l(()=>[a(R,{modelValue:t(o).unitReceiveType,"onUpdate:modelValue":u[2]||(u[2]=e=>t(o).unitReceiveType=e)},{default:l(()=>[(d(!0),B(F,null,y(t(U),e=>(d(),f(k,{key:e.value,label:e.label,value:e.value},{default:l(()=>[p(C(e.label),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16),a(_,g(b(t(c))),{default:l(()=>[a(s,{label:"\u7EC4\u522B\u5C0F\u9879",prop:"creatorName"},{default:l(()=>[a(h,{modelValue:t(o).creatorName,"onUpdate:modelValue":u[3]||(u[3]=e=>t(o).creatorName=e)},{default:l(()=>[(d(!0),B(F,null,y(t(q),e=>(d(),f(L,{onChange:S,key:e.value,label:e.value},{default:l(()=>[p(C(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16)]),_:1}),a(s,null,{default:l(()=>[N("div",W,[a(V,{onClick:I},{default:l(()=>u[5]||(u[5]=[p("\u8FD4\u56DE",-1)])),_:1,__:[5]}),a(V,{type:"primary",loading:t(P),onClick:u[4]||(u[4]=e=>z(t(D)))},{default:l(()=>u[6]||(u[6]=[p("\u4FDD\u5B58",-1)])),_:1,__:[6]},8,["loading"])])]),_:1})]),_:1,__:[7]},8,["model","rules"])}}});export{ee as _};
