import{C as v,D as A,F as U}from"./element-plus.55d71530.js";import{P as h}from"./index.9939838f.js";import{r as i}from"./index.b7f6427b.js";import"./lodash.d6737109.js";import"./dayjs.37feae28.js";import{d as y,s as D,r as x,b as P,_ as E,o as R,c as q,V as r,M as p,u as o}from"./@vue.96c135a1.js";function K(d){return i.get({url:"/property.property_commission/lists",params:d})}function j(d){return i.post({url:"/property.property_commission/add",params:d})}function L(d){return i.post({url:"/property.property_commission/edit",params:d})}function M(d){return i.get({url:"/property.property_commission/detail",params:d})}const N={class:"edit-popup"},O=y({name:"propertyCommissionEdit"}),Q=y({...O,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(d,{expose:F,emit:B}){const _=B,c=D(),n=D(),m=x("add"),V=P(()=>m.value=="edit"?"\u7F16\u8F91\u4EE3\u7406\u5206\u6210\u8868":"\u65B0\u589E\u4EE3\u7406\u5206\u6210\u8868"),u=E({id:"",property_head_id:"",property_user_id:"",property_order_id:"",work_id:"",order_amount:"",ratio:"",commission_amount:""}),b=E({property_head_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7406\u8D1F\u8D23\u4EBAID",trigger:["blur"]}],property_user_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u6237\u4E3BID",trigger:["blur"]}],property_order_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7406\u4E0B\u5355ID",trigger:["blur"]}],work_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u5DE5\u5355ID",trigger:["blur"]}]}),f=async l=>{for(const e in u)l[e]!=null&&l[e]!=null&&(u[e]=l[e])},g=async l=>{const e=await M({id:l.id});f(e)},I=async()=>{var e,a;await((e=c.value)==null?void 0:e.validate());const l={...u};m.value=="edit"?await L(l):await j(l),(a=n.value)==null||a.close(),_("success")},w=(l="add")=>{var e;m.value=l,(e=n.value)==null||e.open()},C=()=>{_("close")};return F({open:w,setFormData:f,getDetail:g}),(l,e)=>{const a=v,s=A,k=U;return R(),q("div",N,[r(h,{ref_key:"popupRef",ref:n,title:o(V),async:!0,width:"550px",onConfirm:I,onClose:C},{default:p(()=>[r(k,{ref_key:"formRef",ref:c,model:o(u),"label-width":"90px",rules:o(b)},{default:p(()=>[r(s,{label:"\u4EE3\u7406\u8D1F\u8D23\u4EBAID",prop:"property_head_id"},{default:p(()=>[r(a,{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"},null,8,["modelValue"])]),_:1}),r(s,{label:"\u6237\u4E3BID",prop:"property_user_id"},{default:p(()=>[r(a,{modelValue:o(u).property_user_id,"onUpdate:modelValue":e[1]||(e[1]=t=>o(u).property_user_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6237\u4E3BID"},null,8,["modelValue"])]),_:1}),r(s,{label:"\u4EE3\u7406\u4E0B\u5355ID",prop:"property_order_id"},{default:p(()=>[r(a,{modelValue:o(u).property_order_id,"onUpdate:modelValue":e[2]||(e[2]=t=>o(u).property_order_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EE3\u7406\u4E0B\u5355ID"},null,8,["modelValue"])]),_:1}),r(s,{label:"\u5DE5\u5355ID",prop:"work_id"},{default:p(()=>[r(a,{modelValue:o(u).work_id,"onUpdate:modelValue":e[3]||(e[3]=t=>o(u).work_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5DE5\u5355ID"},null,8,["modelValue"])]),_:1}),r(s,{label:"\u8BA2\u5355\u53EF\u5206\u6210\u603B\u91D1\u989D",prop:"order_amount"},{default:p(()=>[r(a,{modelValue:o(u).order_amount,"onUpdate:modelValue":e[4]||(e[4]=t=>o(u).order_amount=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53EF\u5206\u6210\u603B\u91D1\u989D"},null,8,["modelValue"])]),_:1}),r(s,{label:"\u63D0\u6210\u6BD4\u4F8B",prop:"ratio"},{default:p(()=>[r(a,{modelValue:o(u).ratio,"onUpdate:modelValue":e[5]||(e[5]=t=>o(u).ratio=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u63D0\u6210\u6BD4\u4F8B"},null,8,["modelValue"])]),_:1}),r(s,{label:"\u63D0\u6210\u6536\u76CA\u91D1\u989D",prop:"commission_amount"},{default:p(()=>[r(a,{modelValue:o(u).commission_amount,"onUpdate:modelValue":e[6]||(e[6]=t=>o(u).commission_amount=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u63D0\u6210\u6536\u76CA\u91D1\u989D"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title"])])}}});export{Q as _,K as a};
