import{aH as ee,aI as te,_ as q,d as H,D as ae,E as D,H as ne,x as d,o as n,N as r,K as o,c as V,M as oe,y as c,b as P,T as L,L as O,ba as se,z as ie,aC as le,ai as ue,aZ as ce,af as l,A as re,b3 as w,F as pe,aA as me,O as U,u as e,a as y,Q as de,ao as ve}from"./index.1417328f.js";import{I as _e}from"./index.68c806ba.js";import fe from"./upload-invoice.93d406d7.js";import ye from"./financial-review.08ccd390.js";import he from"./index.271968bd.js";import De from"./add-edit-form.45a21a4f.js";import{h as ge,a as Ce,b as Ae,c as be,d as ke}from"./index.cc00443d.js";import"./invoice.d2c04353.js";import"./status.727086c1.js";import"./status.4c13d767.js";import"./configs.f20f2935.js";import"./inv-open.516190c3.js";import"./tootip.8c37fa8a.js";import"./basic-descriptions.cadaf928.js";import"./index.0d44f987.js";import"./order-dialog.a2b698d4.js";import"./use-page-search.7e7b4728.js";import"./columns.db7de4f0.js";import"./edit-order.4ff54a03.js";import"./invoice-title.407de326.js";const{VITE_PROXY_DOMAIN_REAL:et,VITE_PROXY_USER_REAL:xe}=te(),Se=xe+"/admin/",Ee=g=>ee.request("post",`${Se}rolelist`,{data:g}),Ie={examCode:{type:String,required:!0}},Re=H({__name:"exam-record",props:Ie,setup(g,{expose:k}){const x=g,{logout:S}=ae(),E=D(""),C=D([]);k({code:E});async function A(v){const{code:_,data:u,message:s}=await Ee({examCode:v});se({code:_,message:s,logout:S,handler:()=>{C.value=u!=null?u:[]}})}return ne(()=>x.examCode,v=>{A(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(C.value,(f,b)=>(n(),r(s,{key:"examItem"+f.addtime+b,timestamp:f.addtime,placement:"top"},{default:o(()=>[c(u,null,{default:o(()=>[P("h4",null,L(f.action_name),1),P("p",null,L(f.re),1)]),_:2},1024)]),_:2},1032,["timestamp"]))),128))]),_:1})}}});var Be=q(Re,[["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/components/examRecord/src/exam-record.vue"]]);const Ne={1:{component:ye,title:"\u5F85\u8D22\u52A1\u5BA1\u6838"},2:{component:fe,title:"\u5F85\u4E0A\u4F20\u53D1\u7968"}};const we={class:"main bg-white"},Ve=H({__name:"detail",setup(g){const{query:k}=ie(),x=le(),{isSuperUser:S}=ue(),E="invoiceApplyDetail",{hasPermissionWithCode:C}=ce(E),A=D(!1),v=D(""),_=l(()=>p.value?"0":"1"),u=D(["0","1","2","3","4"]),s=l(()=>k.id),p=l(()=>!s.value),{push:f}=re(),{loading:b,data:a,run:T}=w({initalData:{},success:()=>a.value&&$(ge({companyNo:a.value.inv_out}))}),{data:I,run:j}=w({isList:!0,initalData:[]}),{data:M,run:$}=w({isList:!0,initalData:[],success:()=>{const[t]=M.value||[];if(!t)return;const{input_ticket:i}=t;A.value=i==="1"}}),X=l(()=>String(a.value.status)==="1"&&C("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"}),K=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 Ne[String(t)]||{}});async function W({status:t,...i}){let m;t?m=await Ae({invNo:s.value,status:t,...i}):m=await Ce({invNo:s.value,...i});const{code:h,message:B}=m;x({code:h,message:B,handler:()=>f("/InvoiceSales/invoiceApply")})}const Z=()=>{j(be({invNo:s.value}))},G=()=>{T(ke({invNo:s.value}))};return pe(()=>{p.value||(G(),Z())}),(t,i)=>{const m=d("el-tab-pane"),h=d("el-collapse-item"),B=d("el-collapse"),J=d("el-tabs"),F=me("loading");return U((n(),V("div",we,[c(J,{modelValue:e(_),"onUpdate:modelValue":i[1]||(i[1]=N=>ve(_)?_.value=N: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(De)]),_: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]=N=>u.value=N)},{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(b)]])]),_:1}),e(I).length>0&&e(I)[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(I)[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":A.value,"is-special-ticket":e(K),"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(b)]])}}});var tt=q(Ve,[["__scopeId","data-v-471f3669"],["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/InvoiceSales/invoiceApply/detail.vue"]]);export{tt as default};