detail.1ecae99c.js 2.6 KB

1
  1. import{h as R}from"./index.98e32ea9.js";import{r as T,y as V,az as K,bc as q,D as u,a9 as j,b6 as A,E as H,v as f,o as r,p as v,q as _,w as h,J as y,K as I,L,x as N,M as D,P as O,bp as Q}from"./index.6c746546.js";import{Q as i}from"./query.50f5262c.js";import{i as S}from"./context.bdf6d636.js";import U from"./anchor.13e86bb7.js";import"./index.8252e89b.js";import"./purchase.273cc592.js";import"./types.4bdb363b.js";import"./purchase.bc085978.js";import"./status.4f7e5409.js";import"./tootip.9a16e4b7.js";import"./basic-descriptions.ee189723.js";import"./index.1f4bcd6b.js";import"./reconciliation.02e25278.js";import"./reconciliation.3dd1ee94.js";import"./index.421ddc09.js";import"./sale.c29a6465.js";import"./sale.d009e5e2.js";import"./index.a86480a7.js";import"./payment.58bf1f2e.js";import"./index.d61fa883.js";import"./ticket-return.40756f3d.js";import"./index.86a0a773.js";import"./tradelog.0a7ded55.js";import"./tragelog.e3a92b97.js";import"./index.e5e291db.js";import"./trade.2c24979c.js";import"./index.5f66048e.js";import"./refund.d06fd7b6.js";import"./index.4f46a9fb.js";import"./inv-return.0b367c7a.js";import"./inv-return.52da0759.js";import"./index.c317dc25.js";import"./inv-open.86767b1d.js";import"./inv-open.b5ebb542.js";import"./goods.eb09b99d.js";const z={class:"main flex h-full"},F={"bg-white":"","min-w-230px":""},G={"bg-white":"","flex-1":""},Te=T({__name:"detail",setup(J){const{query:g}=V(),k=K(),p=q([]),l=u([]),n=u(new Map),d=u({}),w=j(()=>g.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 E(e){return Object.keys(i).filter(o=>C(o,e)).map(o=>{const{api:s,component:a,requesetProp:m,responseKey:c,detail:B}=i[o],P=e[c];return{component:a,prop:m,title:B,api:s,value:P,key:o}})}async function x(){const{code:e,message:t,data:o}=await R({id:w.value});k({code:e,message:t,handler:()=>p.value=E(o)})}async function b(){await x(),p.value.forEach((e,t)=>{l.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 A(S,{goodData:d,setGoodData:e=>d.value=e}),H(()=>b()),(e,t)=>{const o=f("ElCollapseItem"),s=f("ElCollapse");return r(),v("div",z,[_("div",F,[h(U,{map:n.value},null,8,["map"])]),_("div",G,[h(s,{modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=a=>l.value=a)},{default:y(()=>[(r(!0),v(I,null,L(N(p),a=>(r(),D(o,{title:a.title,name:a.key,key:a.key},{default:y(()=>[(r(),D(O(a.component),Q(a,{onMapOffsetTop:t[0]||(t[0]=({top:m,title:c})=>M(m,c))}),null,16))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])])}}});export{Te as default};