2025-03-20 10:25:32 +08:00

2 lines
8.1 KiB
JavaScript

import{_ as H}from"./index.vue_vue_type_style_index_0_lang.9e5f7fb0.js";import{a0 as J,a1 as O,L as W,a2 as X,a3 as Y,S as ee,T as le,B as te,w as ue}from"./element-plus.2acb577d.js";import{d as R,s as ne,r as V,Z as A,o as d,c as m,U as u,L as t,R as n,S as s,u as p,T as S,a9 as T,K as _,a as b,M as ae,V as ie,Q as f,n as oe}from"./@vue.821a47ec.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.61cb6e34.js";import{P as re}from"./index.f292cd50.js";import{a as de,d as ce}from"./index.81df6f20.js";import{e as I}from"./@element-plus.dabbc398.js";import{k as _e}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 fe={class:"detail-popup"},pe={class:"flex",style:{position:"relative"}},me={class:"w-280[px]",style:{position:"absolute",left:"250px"}},ke={key:0},Be=R({name:"customdetail"}),be=R({...Be,emits:["close"],setup(ge,{expose:$,emit:N}){const U=N,v=ne(),g=V(!1),h=V(null),c=de().userInfo,e=A({id:0,extends:{}}),L=async i=>{for(const l in i)i[l]!=null&&i[l]!=null&&(e[l]=i[l]);console.log("formData",e)},o=A({id:e.id,check:"",content:"",check_node:1,check_admin_ids:"",check_admin_names:""}),P=async()=>{g.value=!0,await oe(),h.value.open()},j=i=>{o.check_admin_names=i.name,o.check_admin_ids=i.id,g.value=!1},G=()=>{var i;(i=v.value)==null||i.open()},K=(i,l)=>{if(i==0)return l.user_id_info[0].name;if(i==1)return"\u90E8\u95E8\u8D1F\u8D23\u4EBA";if(i==2)return"\u6216\u7B7E";if(i==3)return"\u4F1A\u7B7E";if(i==4)return l.user_id_info[0].name},F=()=>e.steps.findIndex(l=>l.sort==e.check_step_sort),M=()=>{U("close")},k=async()=>{if(o.check==2&&!o.content)return feedback.msgError("\u8BF7\u586B\u5199\u5BA1\u6279\u610F\u89C1");if(e.check_admin_ids&&e.record[e.record.length-1].check_user_id==o.check_admin_ids)return feedback.msgError("\u4E0B\u4E00\u7EA7\u5BA1\u6279\u4EBA\u4E0D\u80FD\u662F\u53D1\u8D77\u5BA1\u6279\u4EBA");e.flow_info.check_type!=2&&delete o.check_node,o.id=e.id,await _e({...o}),M()},Q=A([4,3,2]),y=()=>Q.includes(e.check_status)?!1:e.admin_id==c.id?!0:(e==null?void 0:e.check_admin_ids.length)>1?e.steps[F()].check_list.map(i=>i.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 $({open:G,setFormData:L}),(i,l)=>{const a=J,E=O,C=W,D=X,Z=Y,x=ee,q=le,w=te,B=ue,z=H;return d(),m("div",fe,[u(re,{ref_key:"popupRef",ref:v,showFootBtn:!1,title:"\u5BA1\u6279\u8BE6\u60C5",async:!0,width:"60vw"},{default:t(()=>[u(C,null,{header:t(()=>l[7]||(l[7]=[n("\u5BA1\u6279\u5185\u5BB9")])),default:t(()=>[u(E,{column:3,border:""},{default:t(()=>[u(a,{label:"\u53D1\u7968\u91D1\u989D","label-align":"left",align:"left"},{default:t(()=>[n(s(e.amount),1)]),_:1}),u(a,{label:"\u62AC\u5934\u7C7B\u578B","label-align":"left",align:"left"},{default:t(()=>[n(s(e.type_text),1)]),_:1}),u(a,{label:"\u53D1\u7968\u4E3B\u4F53","label-align":"left",align:"left"},{default:t(()=>[n(s(e.invoice_subject),1)]),_:1}),u(a,{label:"\u53D1\u7968\u7C7B\u578B","label-align":"left",align:"left"},{default:t(()=>[n(s(e.invoice_type_text),1)]),_:1}),u(a,{label:"\u5F00\u7968\u62AC\u5934","label-align":"left",align:"left"},{default:t(()=>[n(s(e.invoice_title),1)]),_:1}),u(a,{label:"\u7535\u8BDD\u53F7\u7801","label-align":"left",align:"left"},{default:t(()=>[n(s(e.invoice_phone),1)]),_:1}),u(a,{label:"\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7","label-align":"left",align:"left"},{default:t(()=>[n(s(e.invoice_tax),1)]),_:1}),u(a,{label:"\u5F00\u6237\u94F6\u884C","label-align":"left",align:"left"},{default:t(()=>[n(s(e.invoice_bank),1)]),_:1}),u(a,{label:"\u94F6\u884C\u8D26\u53F7","label-align":"left",align:"left"},{default:t(()=>[n(s(e.invoice_account),1)]),_:1}),u(a,{label:"\u94F6\u884C\u8425\u4E1A\u7F51\u70B9","label-align":"left",align:"left"},{default:t(()=>[n(s(e.invoice_banking),1)]),_:1}),u(a,{label:"\u5730\u5740","label-align":"left",align:"left"},{default:t(()=>[n(s(e.invoice_address),1)]),_:1}),u(a,{label:"\u5907\u6CE8","label-align":"left",align:"left"},{default:t(()=>[n(s(e.remark),1)]),_:1}),u(a,{label:"\u9644\u4EF6","label-align":"left",align:"left"},{default:t(()=>[u(se,{annex:e.annex||[]},null,8,["annex"])]),_:1})]),_:1})]),_:1}),u(C,null,{header:t(()=>l[8]||(l[8]=[n("\u5BA1\u6279\u6D41\u7A0B")])),default:t(()=>[u(E,{column:3,border:""},{default:t(()=>[u(a,{label:"\u5BA1\u6279\u72B6\u6001","label-align":"left",align:"left"},{default:t(()=>[n(s(e.check_status_text),1)]),_:1}),u(a,{label:"\u5F53\u524D\u5BA1\u6838\u4EBA","label-align":"left",align:"left"},{default:t(()=>[n(s(e.check_admin_users||"\u5BA1\u6279\u7ED3\u675F"),1)]),_:1}),u(a,{label:"\u6284\u9001\u4EBA","label-align":"left",align:"left"},{default:t(()=>[n(s(e.copy_users),1)]),_:1})]),_:1}),u(E,{column:1,border:""},{default:t(()=>[u(a,{label:"\u5BA1\u6279\u6D41\u7A0B","label-align":"left",align:"left"},{default:t(()=>[u(Z,{class:"mb-4",style:{"max-width":"50vw"},space:200,active:F()+1,simple:""},{default:t(()=>[u(D,{icon:p(I),title:e.record[e.record.length-1].check_user_name+"\u521B\u5EFA"},null,8,["icon","title"]),(d(!0),m(S,null,T(e.steps,r=>(d(),_(D,{icon:p(I),title:K(r.flow_type,r)},null,8,["icon","title"]))),256))]),_:1},8,["active"])]),_:1}),u(a,{label:"\u5BA1\u6279\u8BB0\u5F55","label-align":"left",align:"left"},{default:t(()=>[(d(!0),m(S,null,T(e.record,r=>(d(),m("p",null,[b("span",null,s(r.check_user_name+r.status_text),1),n("\u4E86\u7533\u8BF7 "+s(r.check_time)+" ",1),b("span",null," \u64CD\u4F5C\u610F\u89C1\uFF1A "+s(r.content),1)]))),256))]),_:1}),e.flow_info.check_type==2&&e.check_status!=3&&e.check_status!=2&&e.admin_id!=p(c).id?(d(),_(a,{key:0,label:"\u5BA1\u6279\u8282\u70B9","label-align":"left",align:"left"},{default:t(()=>[b("div",pe,[u(q,{modelValue:o.check_node,"onUpdate:modelValue":l[0]||(l[0]=r=>o.check_node=r)},{default:t(()=>[u(x,{label:1},{default:t(()=>l[9]||(l[9]=[n("\u5BA1\u6279\u7ED3\u675F")])),_:1}),u(x,{label:2},{default:t(()=>l[10]||(l[10]=[n("\u4E0B\u4E00\u5BA1\u6279\u4EBA")])),_:1})]),_:1},8,["modelValue"]),b("div",me,[ae(u(w,{modelValue:o.check_admin_names,"onUpdate:modelValue":l[1]||(l[1]=r=>o.check_admin_names=r),placeholder:"\u70B9\u51FB\u9009\u62E9\u4E0B\u4E00\u5BA1\u6279\u4EBA",clearable:"",readonly:"",onClick:P},null,8,["modelValue"]),[[ie,o.check_node==2]])])])]),_:1})):f("",!0),y()?(d(),_(a,{key:1,label:"\u5BA1\u6279\u610F\u89C1","label-align":"left",align:"left"},{default:t(()=>[u(w,{type:"textarea",modelValue:o.content,"onUpdate:modelValue":l[2]||(l[2]=r=>o.content=r)},null,8,["modelValue"])]),_:1})):f("",!0),y()?(d(),_(a,{key:2,label:"\u64CD\u4F5C","label-align":"left",align:"left"},{default:t(()=>[e.admin_id!=p(c).id?(d(),_(B,{key:0,type:"primary",onClick:l[3]||(l[3]=r=>(o.check=1,k()))},{default:t(()=>l[11]||(l[11]=[n(" \u901A\u8FC7 ")])),_:1})):f("",!0),e.admin_id!=p(c).id&&e.flow_info.check_type!=3?(d(),_(B,{key:1,onClick:l[4]||(l[4]=r=>(o.check=2,k()))},{default:t(()=>l[12]||(l[12]=[n(" \u62D2\u7EDD ")])),_:1})):f("",!0),e.admin_id!=p(c).id&&e.flow_info.check_type==3?(d(),_(B,{key:2,onClick:l[5]||(l[5]=r=>(o.check=2,k()))},{default:t(()=>l[13]||(l[13]=[n(" \u56DE\u9000 ")])),_:1})):f("",!0),e.admin_id==p(c).id?(d(),_(B,{key:3,type:"info",onClick:l[6]||(l[6]=r=>(o.check=3,k()))},{default:t(()=>l[14]||(l[14]=[n(" \u64A4\u56DE ")])),_:1})):f("",!0)]),_:1})):f("",!0)]),_:1})]),_:1}),g.value?(d(),m("div",ke,[u(z,{ref_key:"personnel",ref:h,onConfirm:j,type:"1"},null,512)])):f("",!0)]),_:1},512)])}}});const ll=ce(be,[["__scopeId","data-v-2e944849"]]);export{ll as default};