import{_ as O}from"./index.vue_vue_type_style_index_0_lang.9e5f7fb0.js";import{a0 as W,a1 as X,M as Y,N as ee,L as te,a2 as le,a3 as oe,S as ne,T as ue,B as ae,w as ie}from"./element-plus.2acb577d.js";import{d as $,s as se,r as T,Z as y,o as r,c as f,U as n,L as o,R as s,S as _,u as t,T as S,a9 as N,K as p,a as E,M as re,V as de,Q as m,n as ce}from"./@vue.821a47ec.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_lang.61cb6e34.js";import{P as pe}from"./index.f292cd50.js";import{a as me,d as fe}from"./index.81df6f20.js";import{e as R}from"./@element-plus.dabbc398.js";import{a as ke}from"./oa_financial.d5633b25.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.6bfd3540.js";import"./vue-router.4c04f9b6.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";const Be={class:"detail-popup"},Ee={class:"flex",style:{position:"relative"}},be={class:"w-280[px]",style:{position:"absolute",left:"250px"}},ge={key:0},he=$({name:"customdetail"}),ye=$({...he,emits:["close"],setup(Ae,{expose:I,emit:U}){const L=U,A=se(),b=T(!1),v=T(null),c=me().userInfo,e=y({id:0,extends:{}}),P=async u=>{for(const l in u)u[l]!=null&&u[l]!=null&&(e[l]=u[l]);console.log(e)},i=y({id:e.id,check:"",content:"",check_node:1,check_admin_ids:"",check_admin_names:""}),M=async()=>{b.value=!0,await ce(),v.value.open()},G=u=>{i.check_admin_names=u.name,i.check_admin_ids=u.id,b.value=!1},K=()=>{var u;(u=A.value)==null||u.open()},Q=(u,l)=>{if(u==0)return l.user_id_info[0].name;if(u==1)return"\u90E8\u95E8\u8D1F\u8D23\u4EBA";if(u==2)return"\u6216\u7B7E";if(u==3)return"\u4F1A\u7B7E";if(u==4)return l.user_id_info[0].name},w=()=>e.steps.findIndex(l=>l.sort==e.check_step_sort),Z=()=>{L("close")},k=async()=>{e.flow_info.check_type!=2&&delete i.check_node,i.id=e.id,await ke({...i}),Z()},j=y([4,3,2]),F=()=>j.includes(e.check_status)?!1:e.admin_id==c.id?!0:(e==null?void 0:e.check_admin_ids.length)>1?e.steps[w()].check_list.map(u=>u.check_user_id).includes(c.id)?!1:e==null?void 0:e.check_admin_ids.split(",").map(Number).includes(c.id):(e==null?void 0:e.check_admin_ids)==c.id;return I({open:K,setFormData:P}),(u,l)=>{const d=W,g=X,h=Y,q=ee,x=te,C=le,z=oe,D=ne,H=ue,V=ae,B=ie,J=O;return r(),f("div",Be,[n(pe,{ref_key:"popupRef",ref:A,showFootBtn:!1,title:"\u5BA1\u6279\u8BE6\u60C5",async:!0,width:"60vw"},{default:o(()=>[n(x,null,{header:o(()=>l[7]||(l[7]=[s("\u5BA1\u6279\u5185\u5BB9")])),default:o(()=>[n(g,{column:3,border:""},{default:o(()=>[n(d,{label:"\u62A5\u9500\u51ED\u8BC1\u7F16\u53F7","label-align":"left",align:"left"},{default:o(()=>[s(_(t(e).code),1)]),_:1}),n(d,{label:"\u539F\u59CB\u5355\u636E\u65E5\u671F","label-align":"left",align:"left"},{default:o(()=>[s(_(t(e).expense_time),1)]),_:1}),n(d,{label:"\u5165\u8D26\u6708\u4EFD","label-align":"left",align:"left"},{default:o(()=>[s(_(t(e).income_month),1)]),_:1}),n(d,{label:"\u9644\u4EF6","label-align":"left",align:"left"},{default:o(()=>[n(_e,{annex:t(e).annex||[]},null,8,["annex"])]),_:1})]),_:1}),n(q,{data:t(e).detail},{default:o(()=>[n(h,{label:"\u62A5\u9500\u91D1\u989D","show-overflow-tooltip":"",prop:"amount"}),n(h,{label:"\u62A5\u9500\u9879\u76EE","show-overflow-tooltip":"",prop:"cate_name"}),n(h,{label:"\u5907\u6CE8\u4FE1\u606F","show-overflow-tooltip":"",prop:"remark"})]),_:1},8,["data"])]),_:1}),n(x,null,{header:o(()=>l[8]||(l[8]=[s("\u5BA1\u6279\u6D41\u7A0B")])),default:o(()=>[n(g,{column:3,border:""},{default:o(()=>[n(d,{label:"\u5BA1\u6279\u72B6\u6001","label-align":"left",align:"left"},{default:o(()=>[s(_(t(e).check_status_text),1)]),_:1}),n(d,{label:"\u5F53\u524D\u5BA1\u6838\u4EBA","label-align":"left",align:"left"},{default:o(()=>[s(_(t(e).check_admin_users||"\u5BA1\u6279\u7ED3\u675F"),1)]),_:1}),n(d,{label:"\u6284\u9001\u4EBA","label-align":"left",align:"left"},{default:o(()=>[s(_(t(e).copy_users),1)]),_:1})]),_:1}),n(g,{column:1,border:""},{default:o(()=>[n(d,{label:"\u5BA1\u6279\u6D41\u7A0B","label-align":"left",align:"left"},{default:o(()=>[n(z,{class:"mb-4",style:{"max-width":"50vw"},space:200,active:w()+1,simple:""},{default:o(()=>[n(C,{icon:t(R),title:t(e).record[t(e).record.length-1].check_user_name+"\u521B\u5EFA"},null,8,["icon","title"]),(r(!0),f(S,null,N(t(e).steps,a=>(r(),p(C,{icon:t(R),title:Q(a.flow_type,a)},null,8,["icon","title"]))),256))]),_:1},8,["active"])]),_:1}),n(d,{label:"\u5BA1\u6279\u8BB0\u5F55","label-align":"left",align:"left"},{default:o(()=>[(r(!0),f(S,null,N(t(e).record,a=>(r(),f("p",null,[E("span",null,_(a.check_user_name+a.status_text),1),s("\u4E86\u7533\u8BF7 "+_(a.check_time)+" ",1),E("span",null," \u64CD\u4F5C\u610F\u89C1\uFF1A "+_(a.content),1)]))),256))]),_:1}),t(e).flow_info.check_type==2&&t(e).check_status!=3&&t(e).check_status!=2&&t(e).admin_id!=t(c).id?(r(),p(d,{key:0,label:"\u5BA1\u6279\u8282\u70B9","label-align":"left",align:"left"},{default:o(()=>[E("div",Ee,[n(H,{modelValue:t(i).check_node,"onUpdate:modelValue":l[0]||(l[0]=a=>t(i).check_node=a)},{default:o(()=>[n(D,{label:1},{default:o(()=>l[9]||(l[9]=[s("\u5BA1\u6279\u7ED3\u675F")])),_:1}),n(D,{label:2},{default:o(()=>l[10]||(l[10]=[s("\u4E0B\u4E00\u5BA1\u6279\u4EBA")])),_:1})]),_:1},8,["modelValue"]),E("div",be,[re(n(V,{modelValue:t(i).check_admin_names,"onUpdate:modelValue":l[1]||(l[1]=a=>t(i).check_admin_names=a),placeholder:"\u70B9\u51FB\u9009\u62E9\u4E0B\u4E00\u5BA1\u6279\u4EBA",clearable:"",readonly:"",onClick:M},null,8,["modelValue"]),[[de,t(i).check_node==2]])])])]),_:1})):m("",!0),F()?(r(),p(d,{key:1,label:"\u5BA1\u6279\u610F\u89C1","label-align":"left",align:"left"},{default:o(()=>[n(V,{type:"textarea",modelValue:t(i).content,"onUpdate:modelValue":l[2]||(l[2]=a=>t(i).content=a)},null,8,["modelValue"])]),_:1})):m("",!0),F()?(r(),p(d,{key:2,label:"\u64CD\u4F5C","label-align":"left",align:"left"},{default:o(()=>[t(e).admin_id!=t(c).id?(r(),p(B,{key:0,type:"primary",onClick:l[3]||(l[3]=a=>(t(i).check=1,k()))},{default:o(()=>l[11]||(l[11]=[s(" \u901A\u8FC7 ")])),_:1})):m("",!0),t(e).admin_id!=t(c).id&&t(e).flow_info.check_type!=3?(r(),p(B,{key:1,onClick:l[4]||(l[4]=a=>(t(i).check=2,k()))},{default:o(()=>l[12]||(l[12]=[s(" \u62D2\u7EDD ")])),_:1})):m("",!0),t(e).admin_id!=t(c).id&&t(e).flow_info.check_type==3?(r(),p(B,{key:2,onClick:l[5]||(l[5]=a=>(t(i).check=2,k()))},{default:o(()=>l[13]||(l[13]=[s(" \u56DE\u9000 ")])),_:1})):m("",!0),t(e).admin_id==t(c).id?(r(),p(B,{key:3,type:"info",onClick:l[6]||(l[6]=a=>(t(i).check=3,k()))},{default:o(()=>l[14]||(l[14]=[s(" \u64A4\u56DE ")])),_:1})):m("",!0)]),_:1})):m("",!0)]),_:1})]),_:1}),t(b)?(r(),f("div",ge,[n(J,{ref_key:"personnel",ref:v,onConfirm:G,type:"1"},null,512)])):m("",!0)]),_:1},512)])}}});const ut=fe(ye,[["__scopeId","data-v-7e1c853d"]]);export{ut as default};