import{C as w,D as L,F as P}from"./element-plus.9cae3cb1.js";import{P as S}from"./index.3b15f80f.js";import{r as i}from"./index.60ed7c6d.js";import"./lodash.d6737109.js";import"./dayjs.37feae28.js";import{d as B,s as f,r as h,b as x,_ as y,o as R,c as U,V as r,M as s,u as o}from"./@vue.96c135a1.js";function K(t){return i.get({url:"/property.property_surplus_log/lists",params:t})}function q(t){return i.post({url:"/property.property_surplus_log/add",params:t})}function I(t){return i.post({url:"/property.property_surplus_log/edit",params:t})}function j(t){return i.get({url:"/property.property_surplus_log/detail",params:t})}function Q(t){return i.post({url:"/property.property_surplus_log/entry",params:t})}function W(t){return i.post({url:"/property.property_surplus_log/cancel",params:t})}const M={class:"edit-popup"},N=B({name:"propertySurplusLogEdit"}),X=B({...N,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(t,{expose:D,emit:b}){const _=b,F=f(),n=f(),m=h("add"),g=x(()=>m.value=="edit"?"\u7F16\u8F91\u4EE3\u7406\u6536\u76CA\u8FDB\u51FA\u8BB0\u5F55\u8868":"\u65B0\u589E\u4EE3\u7406\u6536\u76CA\u8FDB\u51FA\u8BB0\u5F55\u8868"),e=y({id:"",in_out:"",property_commission_id:"",amount:"",status:"",remark:"",property_head_id:""}),E=y({in_out:[{required:!0,message:"\u8BF7\u8F93\u5165\u8FDB\u51FA\u7C7B\u578B\uFF1A1=\u8FDB,2=\u51FA",trigger:["blur"]}],status:[{required:!0,message:"\u8BF7\u8F93\u5165\u72B6\u6001\uFF1A0=\u7533\u8BF7\u4E2D,1=\u5DF2\u5165\u8D26,2=\u5DF2\u53D6\u6D88(\u53D6\u6D88\u65F6\u91D1\u989D\u6062\u590D)",trigger:["blur"]}],property_head_id:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7406\u8D1F\u8D23\u4EBAid",trigger:["blur"]}]}),c=async l=>{for(const u in e)l[u]!=null&&l[u]!=null&&(e[u]=l[u])},V=async l=>{const u=await j({id:l.id});c(u)},A=async()=>{var u,p;await((u=F.value)==null?void 0:u.validate());const l={...e};m.value=="edit"?await I(l):await q(l),(p=n.value)==null||p.close(),_("success")},C=(l="add")=>{var u;m.value=l,(u=n.value)==null||u.open()},v=()=>{_("close")};return D({open:C,setFormData:c,getDetail:V}),(l,u)=>{const p=w,d=L,k=P;return R(),U("div",M,[r(S,{ref_key:"popupRef",ref:n,title:o(g),async:!0,width:"550px",onConfirm:A,onClose:v},{default:s(()=>[r(k,{ref_key:"formRef",ref:F,model:o(e),"label-width":"90px",rules:o(E)},{default:s(()=>[r(d,{label:"\u8FDB\u51FA\u7C7B\u578B",prop:"in_out"},{default:s(()=>[r(p,{modelValue:o(e).in_out,"onUpdate:modelValue":u[0]||(u[0]=a=>o(e).in_out=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8FDB\u51FA\u7C7B\u578B",disabled:!!o(e).id},null,8,["modelValue","disabled"])]),_:1}),r(d,{label:"\u5206\u6210\u8868ID",prop:"property_commission_id"},{default:s(()=>[r(p,{modelValue:o(e).property_commission_id,"onUpdate:modelValue":u[1]||(u[1]=a=>o(e).property_commission_id=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u6210\u8868ID",disabled:!!o(e).id},null,8,["modelValue","disabled"])]),_:1}),r(d,{label:"\u8FDB\u51FA\u91D1\u989D",prop:"amount"},{default:s(()=>[r(p,{modelValue:o(e).amount,"onUpdate:modelValue":u[2]||(u[2]=a=>o(e).amount=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8FDB\u51FA\u91D1\u989D",disabled:!!o(e).id},null,8,["modelValue","disabled"])]),_:1}),r(d,{label:"\u4EE3\u7406\u8D1F\u8D23\u4EBAid",prop:"property_head_id"},{default:s(()=>[r(p,{modelValue:o(e).property_head_id,"onUpdate:modelValue":u[3]||(u[3]=a=>o(e).property_head_id=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4EE3\u7406\u8D1F\u8D23\u4EBAid",disabled:!!o(e).id},null,8,["modelValue","disabled"])]),_:1}),r(d,{label:"\u5907\u6CE8",prop:"remark"},{default:s(()=>[r(p,{modelValue:o(e).remark,"onUpdate:modelValue":u[4]||(u[4]=a=>o(e).remark=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1}),r(d,{label:"\u72B6\u6001",prop:"status"},{default:s(()=>[r(p,{modelValue:o(e).status,"onUpdate:modelValue":u[5]||(u[5]=a=>o(e).status=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u72B6\u6001"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title"])])}}});export{X as _,W as a,Q as b,K as c};
