import{aQ as ee,ac as te,_ as q,d as H,v as ae,w as g,z as ne,r as d,o as n,G as r,C as o,c as V,F as O,D as oe,l as c,b as L,L as P,bm as se,m as ie,aL as le,ah as ue,bs as ce,ag as l,n as re,bv as N,x as pe,aC as me,H as U,u as e,a as y,I as de,aq as ve}from"./index.0bc83371.js";import{I as _e}from"./index.b2229991.js";import fe from"./upload-invoice.24fa16de.js";import ye from"./financial-review.5c8495cd.js";import he from"./index.c8a29ba5.js";import ge from"./add-edit-form.74852b4d.js";import{h as Ce,a as De,b as be,c as ke,d as xe}from"./index.b39a4bf1.js";import"./invoice.f874e7b3.js";import"./status.d6b2a53d.js";import"./status.4c13d767.js";import"./configs.70b565f6.js";import"./inv-open.83dc6b1a.js";import"./tootip.d8389d77.js";import"./basic-descriptions.10a27b1b.js";import"./index.2fbf9f50.js";import"./order-dialog.02165559.js";import"./search-check.6146b491.js";import"./use-page-search.58c51153.js";import"./columns.5046f9c8.js";import"./search-batch.69f956dd.js";import"./edit-order.978409bf.js";import"./invoice-title.af402356.js";const{VITE_PROXY_DOMAIN_REAL:at,VITE_PROXY_USER_REAL:Ae}=te(),Se=Ae+"/admin/",Ie=C=>ee.request("post",`${Se}rolelist`,{data:C}),Ee={examCode:{type:String,required:!0}},Re=H({__name:"exam-record",props:Ee,setup(C,{expose:x}){const A=C,{logout:S}=ae(),I=g(""),D=g([]);x({code:I});async function b(v){const{code:_,data:u,message:s}=await Ie({examCode:v});se({code:_,message:s,logout:S,handler:()=>{D.value=u!=null?u:[]}})}return ne(()=>A.examCode,v=>{b(v)}),(v,_)=>{const u=d("el-card"),s=d("el-timeline-item"),p=d("el-timeline");return n(),r(p,null,{default:o(()=>[(n(!0),V(O,null,oe(D.value,(f,k)=>(n(),r(s,{key:"examItem"+f.addtime+k,timestamp:f.addtime,placement:"top"},{default:o(()=>[c(u,null,{default:o(()=>[L("h4",null,P(f.action_name),1),L("p",null,P(f.re),1)]),_:2},1024)]),_:2},1032,["timestamp"]))),128))]),_:1})}}});var Be=q(Re,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/components/examRecord/src/exam-record.vue"]]);const we={1:{component:ye,title:"\u5F85\u8D22\u52A1\u5BA1\u6838"},2:{component:fe,title:"\u5F85\u4E0A\u4F20\u53D1\u7968"}};const Ne={class:"main bg-white"},Ve=H({__name:"detail",setup(C){const{query:x}=ie(),A=le(),{isSuperUser:S}=ue(),I="invoiceApplyDetail",{hasPermissionWithCode:D}=ce(I),b=g(!1),v=g(""),_=l(()=>p.value?"0":"1"),u=g(["0","1","2","3","4"]),s=l(()=>x.id),p=l(()=>!s.value),{push:f}=re(),{loading:k,data:a,run:j}=N({initalData:{},success:()=>a.value&&M(Ce({companyNo:a.value.inv_out}))}),{data:E,run:T}=N({isList:!0,initalData:[]}),{data:$,run:M}=N({isList:!0,initalData:[],success:()=>{const[t]=$.value||[];if(!t)return;const{input_ticket:i}=t;b.value=i==="1"}}),X=l(()=>String(a.value.status)==="1"&&D("025")||String(a.value.status)==="2"),Y=l(()=>{const{status:t}=a.value;return["4","6"].includes(String(t))}),z=l(()=>{const{inv_type:t}=a.value;return t==="3"||t==="4"}),G=l(()=>{const{inv_type:t}=a.value;return t==="4"}),Q=l(()=>{const{inv_type:t}=a.value;return t==="2"||t==="3"}),R=l(()=>{const{status:t}=a.value;return we[String(t)]||{}});async function W({status:t,...i}){let m;t?m=await be({invNo:s.value,status:t,...i}):m=await De({invNo:s.value,...i});const{code:h,message:B}=m;A({code:h,message:B,handler:()=>f("/InvoiceSales/invoiceApply")})}const J=()=>{T(ke({invNo:s.value}))},K=()=>{j(xe({invNo:s.value}))};return pe(()=>{p.value||(K(),J())}),(t,i)=>{const m=d("el-tab-pane"),h=d("el-collapse-item"),B=d("el-collapse"),Z=d("el-tabs"),F=me("loading");return U((n(),V("div",Ne,[c(Z,{modelValue:e(_),"onUpdate:modelValue":i[1]||(i[1]=w=>ve(_)?_.value=w:null),type:"border-card"},{default:o(()=>[e(p)?(n(),r(m,{key:0,label:"\u65B0\u5EFA\u53D1\u7968\u7533\u8BF7",name:"0"},{default:o(()=>[c(ge)]),_:1})):y("v-if",!0),e(p)?y("v-if",!0):(n(),r(m,{key:1,label:"\u4E1A\u52A1\u8BE6\u60C5",name:"1"},{default:o(()=>[c(B,{modelValue:u.value,"onUpdate:modelValue":i[0]||(i[0]=w=>u.value=w)},{default:o(()=>[c(h,{title:"\u53D1\u7968\u7533\u8BF7\u8BE6\u60C5",name:"2"},{default:o(()=>[U(c(he,{detail:e(a)},null,8,["detail"]),[[F,e(k)]])]),_:1}),e(E).length>0&&e(E)[0].inv_number&&e(Y)?(n(),r(h,{key:0,name:"3",title:"\u53D1\u7968\u8BE6\u60C5"},{default:o(()=>[c(e(_e),{"inv-number":e(E)[0].inv_number,type:"sale"},null,8,["inv-number"])]),_:1})):y("v-if",!0),e(S)?y("v-if",!0):(n(),V(O,{key:1},[Object.keys(e(R)).length&&e(X)?(n(),r(h,{key:0,title:e(R).title,name:"4"},{default:o(()=>[(n(),r(de(e(R).component),{"is-electronic":e(z),"is-support":b.value,"is-special-ticket":e(G),"is-plain":e(Q),"inv-type":e(a).inv_type,onChangeStatus:W},null,40,["is-electronic","is-support","is-special-ticket","is-plain","inv-type"]))]),_:1},8,["title"])):y("v-if",!0)],64))]),_:1},8,["modelValue"])]),_:1})),e(p)?y("v-if",!0):(n(),r(m,{key:2,label:"\u5BA1\u6279\u8BB0\u5F55",name:"2"},{default:o(()=>[c(e(Be),{examCode:v.value},null,8,["examCode"])]),_:1}))]),_:1},8,["modelValue"])])),[[F,e(k)]])}}});var nt=q(Ve,[["__scopeId","data-v-471f3669"],["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/detail.vue"]]);export{nt as default};