import{D as L,U as q,L as N,C as W,F as A}from"./element-plus.55d71530.js";import{P as I}from"./index.8e3b20a1.js";import{r as B}from"./index.75e08341.js";import{d as U,_ as w,s as k,w as M,o as m,L as v,M as r,a as O,V as l,u as n,S as _,T as p,c as g,U as y,aa as S,R as P}from"./@vue.96c135a1.js";function K(e){return B.get({url:"/finance.master_worker_case_out_log/lists",params:e})}function T(e){return B.post({url:"/finance.master_worker_case_out_log/edit",params:e})}const j={class:"pr-8"},Q=U({__name:"review_worker_case_out",props:{show:{type:Boolean,required:!0},dictData:{type:Object,default:()=>({})},data:w({id:"",change_amount:""}),value:{type:[Number,String],required:!0}},emits:["update:show","confirm"],setup(e,{emit:C}){const d=k(),c=e,f=C,o=w({review_status:"",remark:""}),i=k(),E={review_status:[{required:!0,message:"\u8BF7\u9009\u62E9\u72B6\u6001"}]},V=async()=>{var a,t;await((a=d.value)==null?void 0:a.validate());const s={review_status:o.review_status,remark:o.remark,id:c.data.id,sn:c.data.sn};await T(s),(t=i.value)==null||t.close(),f("success")},b=()=>{var s;f("update:show",!1),(s=d.value)==null||s.resetFields()};return M(()=>c.show,s=>{var a,t;s?(a=i.value)==null||a.open():(t=i.value)==null||t.close()}),(s,a)=>{const t=L,h=q,R=N,x=W,D=A;return m(),v(I,{ref_key:"popupRef",ref:i,title:"\u5BA1\u6279",width:"500px",onConfirm:V,async:!0,onClose:b},{default:r(()=>[O("div",j,[l(D,{ref_key:"formRef",ref:d,model:n(o),"label-width":"120px",rules:E},{default:r(()=>[l(t,{label:"\u91D1\u989D"},{default:r(()=>[_("\xA5 "+p(e.data.change_amount),1)]),_:1}),l(t,{label:"\u5DE5\u7A0B\u5E08"},{default:r(()=>[_(p(e.data.masterWorker?e.data.masterWorker.nickname+" / "+e.data.masterWorker.worker_number:""),1)]),_:1}),l(t,{label:"\u5BA1\u6279\u72B6\u6001",required:"",prop:"review_status"},{default:r(()=>[l(R,{modelValue:n(o).review_status,"onUpdate:modelValue":a[0]||(a[0]=u=>n(o).review_status=u)},{default:r(()=>[(m(!0),g(y,null,S(e.dictData.audit_state,(u,F)=>(m(),g(y,{key:F},[parseInt(u.value)!==0?(m(),v(h,{key:0,label:parseInt(u.value)},{default:r(()=>[_(p(u.name),1)]),_:2},1032,["label"])):P("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1}),l(t,{label:"\u5907\u6CE8",prop:"remark"},{default:r(()=>[l(x,{modelValue:n(o).remark,"onUpdate:modelValue":a[1]||(a[1]=u=>n(o).remark=u),type:"textarea",rows:4},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),_:1},512)}}});export{Q as _,K as a};
