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