import{k as j,C as z,a1 as U,a2 as q,b as G,G as L,H as $,B as H,D as J}from"./element-plus.10e48c93.js";import{P as K}from"./index.cfb3fa32.js";import{r as B,d as Q}from"./index.5a613cc5.js";import{d as g,r as h,s as w,e as W,$ as f,o as k,c as y,U as e,L as a,u as l,a as v,S as b,R as i,O as X}from"./@vue.51d7f2d8.js";function re(d){return B.get({url:"/approve.approve/lists3",params:d})}function Y(d){return B.post({url:"/approve.approve/shareholderMoneyTaskAudit",params:d})}const Z={class:"edit-popup"},ee={key:0},ae=g({name:"flowEdit"}),te=g({...ae,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(d,{expose:A,emit:C}){h(!1);const E=w(),m=w(),n=h("add"),D=W(()=>n.value=="edit"?"\u5BA1\u6838":"\u8BE6\u60C5"),R=s=>{window.open(s,"_blank")},o=f({id:"",check_status:1,remark:"",company_a_name:"",company_b_name:""}),r=f({amount:"",annex:"",file_type:""}),F=f({check_status:[{required:!0,validator:(s,t,u)=>{t!=2&&t!=3?u("\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001"):u()},trigger:["blur"]}]}),V=async s=>{o.id=s.id;for(let t in r)r[t]=JSON.parse(s.extend)[t];o.company_a_name=s.company_a_name,o.company_b_name=s.company_b_name,n.value=="details"&&(o.check_status=s.check_status,o.remark=s.remark)},M=async()=>{var s,t;if(await((s=E.value)==null?void 0:s.validate()),o.check_status==3&&o.remark=="")return j.error("\u9A73\u56DE\u5FC5\u987B\u586B\u5199\u5907\u6CE8");await Y({id:o.id,check_status:o.check_status,remark:o.remark}),(t=m.value)==null||t.close(),C("success")},S=(s="add")=>{var t;n.value=s,(t=m.value)==null||t.open()},O=()=>{C("close")};return A({open:S,setFormData:V}),(s,t)=>{const u=z,_=U,c=q,T=G,x=L,I=$,N=H,P=J;return k(),y("div",Z,[e(K,{ref_key:"popupRef",ref:m,title:l(D),async:!0,width:"800px",onConfirm:M,onClose:O,button:l(n)=="edit",clickModalClose:l(n)=="details"},{default:a(()=>[e(P,{ref_key:"formRef",ref:E,model:l(o),rules:l(F),"label-width":"120px"},{default:a(()=>[e(c,null,{default:a(()=>[e(_,{span:24},{default:a(()=>[e(u,{label:"\u53C2\u80A1\u516C\u53F8:"},{default:a(()=>[v("div",null,b(l(o).company_b_name),1)]),_:1})]),_:1})]),_:1}),i(),e(c,null,{default:a(()=>[e(_,{span:24},{default:a(()=>[e(u,{label:"\u88AB\u53C2\u80A1\u516C\u53F8:"},{default:a(()=>[v("div",null,b(l(o).company_a_name),1)]),_:1})]),_:1})]),_:1}),i(),e(c,null,{default:a(()=>[e(_,{span:24},{default:a(()=>[e(u,{label:"\u91D1\u989D:"},{default:a(()=>[v("div",null,b(l(r).amount),1)]),_:1})]),_:1})]),_:1}),e(c,null,{default:a(()=>[e(_,{span:24},{default:a(()=>[e(u,{label:"\u5B8C\u6210\u51ED\u8BC1:"},{default:a(()=>[l(r).file_type=="image"?(k(),y("div",ee,[e(T,{style:{width:"100px",height:"100px"},src:l(r).annex,"zoom-rate":1.2,"max-scale":7,"min-scale":.2,"preview-src-list":[l(r).annex],fit:"cover"},null,8,["src","preview-src-list"])])):(k(),y("div",{key:1,style:{cursor:"pointer",color:"blue"},onClick:t[0]||(t[0]=p=>R(l(r).annex))}," \u67E5\u770B\u51ED\u8BC1"))]),_:1})]),_:1})]),_:1}),e(_,{span:12},{default:a(()=>[e(u,{label:"\u5BA1\u6838",prop:"check_status",clearable:"",style:{width:"100%"}},{default:a(()=>[e(I,{class:X({disabled:l(n)=="details"}),modelValue:l(o).check_status,"onUpdate:modelValue":t[1]||(t[1]=p=>l(o).check_status=p)},{default:a(()=>[e(x,{label:2},{default:a(()=>[i("\u901A\u8FC7")]),_:1}),e(x,{label:3},{default:a(()=>[i("\u9A73\u56DE")]),_:1})]),_:1},8,["class","modelValue"])]),_:1})]),_:1}),e(c,null,{default:a(()=>[e(_,null,{default:a(()=>[e(u,{label:"\u5907\u6CE8",prop:"remark"},{default:a(()=>[e(N,{readonly:l(n)=="details",modelValue:l(o).remark,"onUpdate:modelValue":t[2]||(t[2]=p=>l(o).remark=p),clearable:"",type:"textarea"},null,8,["readonly","modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title","button","clickModalClose"])])}}});const le=Q(te,[["__scopeId","data-v-191f44d5"]]),_e=Object.freeze(Object.defineProperty({__proto__:null,default:le},Symbol.toStringTag,{value:"Module"}));export{le as a,re as b,_e as c};