import{C as k,D as U,F as w}from"./element-plus.ae09c4a0.js";import{P as q}from"./index.e64ff1d1.js";import{r as s}from"./index.80696382.js";import"./lodash.fc1b942f.js";import{d as c,s as D,r as x,b as P,a0 as b,o as R,c as H,W as a,O as t,u as l}from"./@vue.a7a54728.js";function J(n){return s.get({url:"/property.property_head/lists",params:n})}function I(n){return s.post({url:"/property.property_head/add",params:n})}function O(n){return s.post({url:"/property.property_head/edit",params:n})}function j(n){return s.get({url:"/property.property_head/detail",params:n})}const L={class:"edit-popup"},N=c({name:"propertyHeadEdit"}),K=c({...N,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(n,{expose:B,emit:V}){const F=V,_=D(),m=D(),i=x("add"),E=P(()=>i.value=="edit"?"\u7F16\u8F91\u7269\u4E1A\u8D1F\u8D23\u4EBA\u8868":"\u65B0\u589E\u7269\u4E1A\u8D1F\u8D23\u4EBA\u8868"),u=b({id:"",property_name:"",village_name:"",address:"",head_name:"",head_mobile:"",ratio:"",head_bank_card:"",remark:"",lon:"",lat:""}),A=b({property_name:[{required:!0,message:"\u8BF7\u8F93\u5165\u7269\u4E1A\u540D\u79F0",trigger:["blur"]}],village_name:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u533A\u540D\u79F0",trigger:["blur"]}],address:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u533A\u5730\u5740",trigger:["blur"]}],head_name:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u540D\u79F0",trigger:["blur"]}],head_mobile:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u624B\u673A\u53F7/\u7535\u8BDD",trigger:["blur"]}],head_bank_card:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u94F6\u884C\u5361\u53F7",trigger:["blur"]}]}),f=async d=>{for(const e in u)d[e]!=null&&d[e]!=null&&(u[e]=d[e])},g=async d=>{const e=await j({id:d.id});f(e)},y=async()=>{var e,o;await((e=_.value)==null?void 0:e.validate());const d={...u};i.value=="edit"?await O(d):await I(d),(o=m.value)==null||o.close(),F("success")},C=(d="add")=>{var e;i.value=d,(e=m.value)==null||e.open()},h=()=>{F("close")};return B({open:C,setFormData:f,getDetail:g}),(d,e)=>{const o=k,p=U,v=w;return R(),H("div",L,[a(q,{ref_key:"popupRef",ref:m,title:l(E),async:!0,width:"550px",onConfirm:y,onClose:h},{default:t(()=>[a(v,{ref_key:"formRef",ref:_,model:l(u),"label-width":"90px",rules:l(A)},{default:t(()=>[a(p,{label:"\u7269\u4E1A\u540D\u79F0",prop:"property_name"},{default:t(()=>[a(o,{modelValue:l(u).property_name,"onUpdate:modelValue":e[0]||(e[0]=r=>l(u).property_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7269\u4E1A\u540D\u79F0"},null,8,["modelValue"])]),_:1}),a(p,{label:"\u5C0F\u533A\u540D\u79F0",prop:"village_name"},{default:t(()=>[a(o,{modelValue:l(u).village_name,"onUpdate:modelValue":e[1]||(e[1]=r=>l(u).village_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5C0F\u533A\u540D\u79F0"},null,8,["modelValue"])]),_:1}),a(p,{label:"\u5C0F\u533A\u5730\u5740",prop:"address"},{default:t(()=>[a(o,{modelValue:l(u).address,"onUpdate:modelValue":e[2]||(e[2]=r=>l(u).address=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5C0F\u533A\u5730\u5740"},null,8,["modelValue"])]),_:1}),a(p,{label:"\u59D3\u540D",prop:"head_name"},{default:t(()=>[a(o,{modelValue:l(u).head_name,"onUpdate:modelValue":e[3]||(e[3]=r=>l(u).head_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u59D3\u540D"},null,8,["modelValue"])]),_:1}),a(p,{label:"\u624B\u673A\u53F7",prop:"head_mobile"},{default:t(()=>[a(o,{modelValue:l(u).head_mobile,"onUpdate:modelValue":e[4]||(e[4]=r=>l(u).head_mobile=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u624B\u673A\u53F7/\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),a(p,{label:"\u63D0\u6210\u6BD4\u4F8B(%)",prop:"ratio"},{default:t(()=>[a(o,{modelValue:l(u).ratio,"onUpdate:modelValue":e[5]||(e[5]=r=>l(u).ratio=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u63D0\u6210\u6BD4\u4F8B"},null,8,["modelValue"])]),_:1}),a(p,{label:"\u94F6\u884C\u5361\u53F7",prop:"head_bank_card"},{default:t(()=>[a(o,{modelValue:l(u).head_bank_card,"onUpdate:modelValue":e[6]||(e[6]=r=>l(u).head_bank_card=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8D1F\u8D23\u4EBA\u94F6\u884C\u5361\u53F7"},null,8,["modelValue"])]),_:1}),a(p,{label:"\u7ECF\u5EA6",prop:"lon"},{default:t(()=>[a(o,{modelValue:l(u).lon,"onUpdate:modelValue":e[7]||(e[7]=r=>l(u).lon=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7ECF\u5EA6"},null,8,["modelValue"])]),_:1}),a(p,{label:"\u7EAC\u5EA6",prop:"lat"},{default:t(()=>[a(o,{modelValue:l(u).lat,"onUpdate:modelValue":e[8]||(e[8]=r=>l(u).lat=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7EAC\u5EA6"},null,8,["modelValue"])]),_:1}),a(p,{label:"\u5907\u6CE8",prop:"remark"},{default:t(()=>[a(o,{modelValue:l(u).remark,"onUpdate:modelValue":e[9]||(e[9]=r=>l(u).remark=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title"])])}}});export{K as _,J as a};
