import{g as e}from"./common-0c693521-1780912037814v=1.0.0.js";import{d as a,s as l,r as t,W as u,a as n,b as o,h as d,e as c,w as s,F as p,i,f as m,c as r,H as v,n as y,g as _}from"./index-d052b22f-1780912037814v=1.0.0.js";const f={class:"flex",style:{"min-width":"400px"}},b=a({__name:"CitySelect",props:{province:{default:""},city:{default:""},county:{default:""},street:{}},emits:["update:province","update:city","update:county","update:street"],setup(a,{emit:y}){const _=a,b=y,x=l({get:()=>_.province,set(e){b("update:province",e)}}),V=l({get:()=>_.city,set(e){b("update:city",e)}}),g=l({get:()=>_.county,set(e){b("update:county",e)}}),h=t([]),U=t([]),w=t([]);(async()=>{let a=await e({});200==a.code&&(x.value=a.data[0].company_area_id,h.value=[a.data[0]],U.value=a.data[0].next,V.value&&U.value.map((e=>{e.company_area_id==V.value&&(w.value=e.next)})))})(),u((()=>[x.value,V.value,g.value]),(async(e,a)=>{e[1]&&U.value.map((a=>{a.company_area_id==e[1]&&(w.value=a.next)}))}),{immediate:!0});const j=()=>{g.value=""};return(e,a)=>{const l=n("el-option"),t=n("el-select");return o(),d("div",f,[c(t,{modelValue:m(x),"onUpdate:modelValue":a[0]||(a[0]=e=>v(x)?x.value=e:null),disabled:"",placeholder:"请选择所在省"},{default:s((()=>[(o(!0),d(p,null,i(m(h),((e,a)=>(o(),r(l,{key:a,label:e.name,value:e.company_area_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"]),c(t,{modelValue:m(V),"onUpdate:modelValue":a[1]||(a[1]=e=>v(V)?V.value=e:null),class:"ml10",placeholder:"请选择州市",onChange:j},{default:s((()=>[(o(!0),d(p,null,i(m(U),((e,a)=>(o(),r(l,{key:a,label:e.name,value:e.company_area_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"]),c(t,{modelValue:m(g),"onUpdate:modelValue":a[2]||(a[2]=e=>v(g)?g.value=e:null),class:"ml10",placeholder:"请选择区县"},{default:s((()=>[(o(!0),d(p,null,i(m(w),((e,a)=>(o(),r(l,{key:a,label:e.name,value:e.company_area_id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])}}}),x=a({__name:"AddressInfo",props:{info:{type:Object,default:()=>{}}},emits:["update:info"],setup(e,{emit:a}){const u=t({xs:24,sm:24,md:12,lg:12,xl:12}),p=e,i=a,r=l({get:()=>p.info,set:e=>{i("update:info",e)}});return(e,a)=>{const l=n("el-form-item"),t=n("FormCol"),p=n("FormRow");return o(),d("div",null,[c(p,null,{default:s((()=>[c(t,y(_(m(u))),{default:s((()=>[c(l,{label:"省市区县：",prop:"county"},{default:s((()=>[c(b,{province:m(r).province,"onUpdate:province":a[0]||(a[0]=e=>m(r).province=e),city:m(r).city,"onUpdate:city":a[1]||(a[1]=e=>m(r).city=e),county:m(r).county,"onUpdate:county":a[2]||(a[2]=e=>m(r).county=e)},null,8,["province","city","county"])])),_:1})])),_:1},16)])),_:1})])}}});export{x as _};
