import{_ as V,d as b,j,cb as P,cc as A,n as u,aa as K,cJ as q,p as F,r as f,o as r,c as v,e as _,h,y,F as H,z as I,A as k,C as N,d6 as O}from"./index.js";import{h as Q}from"./index.a26ed54d.js";import{Q as i}from"./query.84cca6d5.js";import{i as S}from"./context.bdf6d636.js";import U from"./anchor.d2fe90.js";import"./index.d978a290.js";import"./purchase.a458fd.js";import"./types.c098f8fe.js";import"./porder.827c74bc.js";import"./reconciliation.d12955.js";import"./index.6004c99e.js";import"./orderRecord.92bbc10f.js";import"./index.904472d8.js";import"./sale.7d96b8.js";import"./sale.3efcc247.js";import"./index.cfc78b88.js";import"./payment.8b683a.js";import"./purchPay.bf9ab6ff.js";import"./index.9c129b93.js";import"./ticket-return.0235fd.js";import"./ticketReturn.e53d6b17.js";import"./index.3c216f3c.js";import"./tradelog.044756.js";import"./tragelog.6608fb39.js";import"./index.afe5f4bc.js";import"./trade.0c5ec1.js";import"./index.3dfad87f.js";import"./refund.e1b6d4.js";import"./index.eed3ef73.js";import"./inv-return.bad4c4.js";import"./inv-return.96a2864f.js";import"./inv-open.c8a829.js";import"./inv-open.b2ee78c0.js";const z={class:"main flex h-full w-full"},G={"bg-white":"","min-w-230px":""},J={"bg-white":"","flex-1":""},L=b({__name:"detail",setup(Y){const{query:w}=j(),D=P(),l=A([]),p=u([]),n=u(new Map),d=u({}),g=K(()=>w.id),C=(e,t)=>{var s;const o=i[e].responseKey;return t[o]&&((s=i[e])==null?void 0:s.detail)&&t[o].length!==0};function x(e){return Object.keys(i).filter(o=>C(o,e)).map(o=>{const{api:s,component:a,requesetProp:m,responseKey:c,detail:R}=i[o],T=e[c];return{component:a,prop:m,title:R,api:s,value:T,key:o}})}async function E(){const{code:e,message:t,data:o}=await Q({id:g.value});D({code:e,message:t,handler:()=>l.value=x(o)})}async function B(){await E(),l.value.forEach((e,t)=>{p.value.push(e.key),n.value.set(e.title,{top:"",index:t})})}function M(e,t){const o=n.value.get(t);n.value.set(t,{...o,top:e})}return q(S,{goodData:d,setGoodData:e=>d.value=e}),F(()=>B()),(e,t)=>{const o=f("ElCollapseItem"),s=f("ElCollapse");return r(),v("div",z,[_("div",G,[h(U,{map:n.value},null,8,["map"])]),_("div",J,[h(s,{modelValue:p.value,"onUpdate:modelValue":t[1]||(t[1]=a=>p.value=a)},{default:y(()=>[(r(!0),v(H,null,I(l.value,a=>(r(),k(o,{title:a.title,name:a.key,key:a.key},{default:y(()=>[(r(),k(N(a.component),O({ref_for:!0},a,{onMapOffsetTop:t[0]||(t[0]=({top:m,title:c})=>M(m,c))}),null,16))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])])}}});var Te=V(L,[["__file","D:/work/jiesuan/settle-vue3/src/views/search/standBook/detail.vue"]]);export{Te as default};
