import{C as w,D as R,G as x,H as O,F as I}from"./element-plus.ae09c4a0.js";import{P}from"./index.e64ff1d1.js";import{a as U,b as q,c as T}from"./property_order.a6a29d0b.js";import"./lodash.fc1b942f.js";import{d as E,s as b,r as G,b as N,a0 as F,o as j,c as H,W as o,O as a,u as l,T as i}from"./@vue.a7a54728.js";const S={class:"edit-popup"},W=E({name:"propertyOrderEdit"}),X=E({...W,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(z,{expose:h,emit:B}){const _=B,f=b(),n=b(),m=G("add"),D=N(()=>m.value=="edit"?"\u7F16\u8F91\u7269\u4E1A\u4E0B\u5355\u8868":"\u65B0\u589E\u7269\u4E1A\u4E0B\u5355\u8868"),u=F({id:"",property_head_id:"",householder_name:"",householder_mobile:"",remark:"",order_status:""}),y=F({property_head_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u7269\u4E1A\u8D1F\u8D23\u4EBAID",trigger:["blur"]}],householder_name:[{required:!0,message:"\u8BF7\u8F93\u5165\u6237\u4E3B\u540D\u79F0",trigger:["blur"]}],householder_mobile:[{required:!0,message:"\u8BF7\u8F93\u5165\u6237\u4E3B\u624B\u673A\u53F7",trigger:["blur"]}]}),c=async r=>{for(const e in u)r[e]!=null&&r[e]!=null&&(u[e]=r[e])},V=async r=>{const e=await U({id:r.id});c(e)},A=async()=>{var e,d;await((e=f.value)==null?void 0:e.validate());const r={...u};m.value=="edit"?await q(r):await T(r),(d=n.value)==null||d.close(),_("success")},g=(r="add")=>{var e;m.value=r,(e=n.value)==null||e.open()},v=()=>{_("close")};return h({open:g,setFormData:c,getDetail:V}),(r,e)=>{const d=w,s=R,p=x,k=O,C=I;return j(),H("div",S,[o(P,{ref_key:"popupRef",ref:n,title:l(D),async:!0,width:"550px",onConfirm:A,onClose:v},{default:a(()=>[o(C,{ref_key:"formRef",ref:f,model:l(u),"label-width":"90px",rules:l(y)},{default:a(()=>[o(s,{label:"\u7269\u4E1A\u8D1F\u8D23\u4EBAID",prop:"property_head_id"},{default:a(()=>[o(d,{modelValue:l(u).property_head_id,"onUpdate:modelValue":e[0]||(e[0]=t=>l(u).property_head_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7269\u4E1A\u8D1F\u8D23\u4EBAID",disabled:!!l(u).id},null,8,["modelValue","disabled"])]),_:1}),o(s,{label:"\u6237\u4E3B\u540D\u79F0",prop:"householder_name"},{default:a(()=>[o(d,{modelValue:l(u).householder_name,"onUpdate:modelValue":e[1]||(e[1]=t=>l(u).householder_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6237\u4E3B\u540D\u79F0",disabled:!!l(u).id},null,8,["modelValue","disabled"])]),_:1}),o(s,{label:"\u6237\u4E3B\u624B\u673A\u53F7",prop:"householder_mobile"},{default:a(()=>[o(d,{modelValue:l(u).householder_mobile,"onUpdate:modelValue":e[2]||(e[2]=t=>l(u).householder_mobile=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6237\u4E3B\u624B\u673A\u53F7",disabled:!!l(u).id},null,8,["modelValue","disabled"])]),_:1}),o(s,{label:"\u5907\u6CE8",prop:"remark"},{default:a(()=>[o(d,{modelValue:l(u).remark,"onUpdate:modelValue":e[3]||(e[3]=t=>l(u).remark=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1}),o(s,{label:"\u72B6\u6001",prop:"order_status"},{default:a(()=>[o(k,{modelValue:l(u).order_status,"onUpdate:modelValue":e[4]||(e[4]=t=>l(u).order_status=t),disabled:l(u).order_status!="0"},{default:a(()=>[o(p,{label:0},{default:a(()=>[i("\u672A\u63A5\u5355")]),_:1}),o(p,{label:1},{default:a(()=>[i("\u5DF2\u63A5\u5355")]),_:1}),o(p,{label:2},{default:a(()=>[i("\u53D6\u6D88\u5355")]),_:1}),o(p,{label:3},{default:a(()=>[i("\u5DF2\u5B8C\u7ED3")]),_:1})]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title"])])}}});export{X as _};
