import{u as H,_ as Q}from"./index-5a47c360-1785478469326v=1.0.0.js";import{u as W}from"./useGetCollage-5696f774-1785478469326v=1.0.0.js";import{x as X,c as x,r as p,k as Z,al as d,y as r,H as m,I as o,Q as s,a8 as _,a9 as y,u as e,z as b,P as F,a4 as C,L as c,M as E,O as ee,A as le}from"./vendor-46662d77-1785478469326v=1.0.0.js";import"./eleVendor-bc05bc4d-1785478469326v=1.0.0.js";const ue={billType:[{required:!0,message:"\u8BF7\u9009\u62E9\u8D26\u5355\u7C7B\u578B",trigger:"change"}],name:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u5355\u540D\u79F0",trigger:"blur"},{max:1e3,message:"\u6700\u591A 1000 \u4E2A\u5B57\u7B26",trigger:"blur"}],schoolYearId:[{required:!0,message:"\u8BF7\u9009\u62E9\u5B66\u5E74",trigger:"change"}],semester:[{required:!0,message:"\u8BF7\u9009\u62E9\u8D26\u5355\u65F6\u95F4",trigger:"change"}],schoolUserTypes:[{required:!0,message:"\u8BF7\u9009\u62E9\u63A8\u9001\u7528\u6237\u7C7B\u578B",trigger:"change"}],billPushStatus:[{max:255,message:"\u6700\u591A 255 \u4E2A\u5B57\u7B26",trigger:"blur"}],pushStartTime:[],pushEndTime:[],failedCause:[{max:65535,message:"\u6700\u591A 65535 \u4E2A\u5B57\u7B26",trigger:"blur"}],updater:[{max:32,message:"\u6700\u591A 32 \u4E2A\u5B57\u7B26",trigger:"blur"}],updateTime:[]},te={key:0,class:"formItemBoxs"},oe={class:"pt20 mt30"},ae=X({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit","generate"],setup(U,{emit:I}){const B=H();let k=U;const v=I,t=x({get(){return Y(k.value)},set(a){v("update:value",a)}}),A=x({get(){return k.loading},set(a){v("update:loading",a)}}),T=p(),h=p({xs:24,sm:22,md:20,lg:14,xl:13}),P=p({xs:24,sm:24,md:12,lg:12,xl:12});p({xs:24,sm:22,md:18,lg:16,xl:8});const{collageList:se,getPageCollageList:w}=W(),L=p(B.getEnumListByKey("billType")),O=()=>{},N=p(B.getEnumListByKey("semesterDev")),D=()=>{};p([]);const R=x(()=>{const a=B.getEnumListByKey("schoolUserTypes");return t.value.billType==="graduate"?a.filter(l=>l.value!=="staff"):a}),q=()=>{},Y=a=>a,j=()=>{var l,i;let a=JSON.parse(JSON.stringify(t.value));return Array.isArray(a.schoolUserTypes)&&(a.schoolUserTypes=(l=a.schoolUserTypes)==null?void 0:l.join(",")),Array.isArray(a.collegeIds)&&(a.collegeIds=(i=a.collegeIds)==null?void 0:i.join(",")),a},V=(a,l="submit")=>{a.validate(async(i,g)=>{if(i){let n=j();v(l==="submit"?"submit":"generate",n)}else{const n=Object.keys(g)[0];a.scrollToField(n)}})};return Z(()=>{}),(a,l)=>{const i=d("el-option"),g=d("el-select"),n=d("el-form-item"),f=d("PaCol"),K=d("el-input"),M=d("PageSelect"),z=d("el-checkbox"),J=d("el-checkbox-group"),$=d("PaRow"),S=d("el-button"),G=d("el-form");return r(),m(G,{model:e(t),ref_key:"formRef",ref:T,rules:e(ue),"label-width":"160px"},{default:o(()=>[s($,null,{default:o(()=>[s(f,_(y(e(h))),{default:o(()=>[s(n,{label:"\u8D26\u5355\u7C7B\u578B",prop:"billType"},{default:o(()=>[s(g,{modelValue:e(t).billType,"onUpdate:modelValue":l[0]||(l[0]=u=>e(t).billType=u),filterable:"",onChange:O,placeholder:"\u8BF7\u9009\u62E9\u8D26\u5355\u7C7B\u578B",style:{width:"100%"}},{default:o(()=>[(r(!0),b(F,null,C(e(L),u=>(r(),m(i,{key:u.value,label:u.label,value:u.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16),s(f,_(y(e(h))),{default:o(()=>[s(n,{label:"\u8D26\u5355\u540D\u79F0",prop:"name"},{default:o(()=>[s(K,{modelValue:e(t).name,"onUpdate:modelValue":l[1]||(l[1]=u=>e(t).name=u),placeholder:"\u8BF7\u8F93\u5165\u8D26\u5355\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1},16),s(f,_(y(e(P))),{default:o(()=>[e(t).billType&&e(t).billType!=="graduate"?(r(),b("div",te,[s(n,{label:"\u8D26\u5355\u65F6\u95F4",prop:"schoolYearId"},{default:o(()=>[["semester","school_year"].includes(e(t).billType)?(r(),m(g,{key:0,modelValue:e(t).schoolYearId,"onUpdate:modelValue":l[2]||(l[2]=u=>e(t).schoolYearId=u),filterable:"",onChange:D,placeholder:"\u8BF7\u9009\u62E9\u5B66\u5E74",style:{width:"100%"}},{default:o(()=>[(r(!0),b(F,null,C(e(B).academicYearOptions,u=>(r(),m(i,{key:u.value,label:u.label,value:u.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):c("v-if",!0)]),_:1}),e(t).billType==="semester"?(r(),m(n,{key:0,label:"",class:"semesterFormItem","label-width":0,prop:"semester"},{default:o(()=>[l[8]||(l[8]=E(" \xA0- \xA0",-1)),s(g,{modelValue:e(t).semester,"onUpdate:modelValue":l[3]||(l[3]=u=>e(t).semester=u),filterable:"",onChange:D,placeholder:"\u8BF7\u9009\u62E9\u8D26\u5355\u65F6\u95F4",style:{width:"90%"}},{default:o(()=>[(r(!0),b(F,null,C(e(N),u=>(r(),m(i,{key:u.value,label:u.label,value:u.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1,__:[8]})):c("v-if",!0)])):c("v-if",!0)]),_:1},16),s(f,_(y(e(h))),{default:o(()=>[s(n,{label:"\u63A8\u9001\u5B66\u9662",prop:"collegeIds"},{default:o(()=>[c(` <el-select
						v-model="form.collegeIds"
						filterable
						@change="handleChangeCollegeIdsSelect"
						placeholder="\u5168\u90E8(\u4E0D\u9009\u62E9\u9ED8\u8BA4\u63A8\u9001\u5168\u6821\u5B66\u751F)"
						style="width: 100%"
						multiple
					>
						<el-option v-for="item in collageList" :key="item.value" :label="item.label" :value="item.value" />
					</el-select>  `),s(M,{ref:"pageSelectRef",value:e(t).collegeIds,"onUpdate:value":l[4]||(l[4]=u=>e(t).collegeIds=u),"remote-method":e(w),multiple:"",placeholder:"\u5168\u90E8(\u4E0D\u9009\u62E9\u9ED8\u8BA4\u63A8\u9001\u5168\u6821\u5B66\u751F)",clearable:""},null,8,["value","remote-method"])]),_:1})]),_:1},16),s(f,_(y(e(h))),{default:o(()=>[s(n,{label:"\u63A8\u9001\u7528\u6237\u7C7B\u578B",prop:"schoolUserTypes"},{default:o(()=>[s(J,{modelValue:e(t).schoolUserTypes,"onUpdate:modelValue":l[5]||(l[5]=u=>e(t).schoolUserTypes=u)},{default:o(()=>[(r(!0),b(F,null,C(e(R),u=>(r(),m(z,{onChange:q,key:u.value,label:u.value},{default:o(()=>[E(ee(u.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16)]),_:1}),s(n,null,{default:o(()=>[le("div",oe,[c(' <el-button @click="handleBack">\u8FD4\u56DE</el-button> '),s(S,{type:"primary",loading:e(A),onClick:l[6]||(l[6]=u=>V(e(T),"submit"))},{default:o(()=>l[9]||(l[9]=[E("\u6682\u5B58",-1)])),_:1,__:[9]},8,["loading"]),["wait_generate","generate_suspend"].includes(e(t).billPushStatus)||!e(t).billPushStatus?(r(),m(S,{key:0,type:"success",loading:e(A),onClick:l[7]||(l[7]=u=>V(e(T),"generate"))},{default:o(()=>l[10]||(l[10]=[E("\u751F\u6210\u8D26\u5355",-1)])),_:1,__:[10]},8,["loading"])):c("v-if",!0)])]),_:1})]),_:1},8,["model","rules"])}}});const me=Q(ae,[["__scopeId","data-v-27d857f6"]]);export{me as default};
