detail.97045c35.js 2.7 KB

1
  1. import{_ as T,d as V,z as K,aC as P,bv as j,E as u,af as N,bp as Q,F as U,x as f,o as r,c as v,b as _,y as h,K as y,L as q,M as A,u as F,N as k,Q as H,b4 as I}from"./index.7f36d786.js";import{h as L}from"./index.a08bf262.js";import{Q as i}from"./query.09b261b1.js";import{i as O}from"./context.bdf6d636.js";import S from"./anchor.8c1dc0e6.js";import"./index.def28f1f.js";import"./purchase.bfec4113.js";import"./types.026bbe35.js";import"./purchase.cec0d886.js";import"./status.ba3625fb.js";import"./tootip.79922e9d.js";import"./basic-descriptions.a45bb748.js";import"./index.6c165331.js";import"./reconciliation.9836bce1.js";import"./reconciliation.3959640d.js";import"./index.5e672a7a.js";import"./sale.9f4cb3a3.js";import"./sale.4c5112d5.js";import"./index.277e9984.js";import"./payment.3a028003.js";import"./index.e659c7af.js";import"./ticket-return.3a0334db.js";import"./index.ea9579c0.js";import"./tradelog.2a1a2785.js";import"./tragelog.46cb0065.js";import"./index.59640d39.js";import"./trade.dc995acd.js";import"./index.7b546d77.js";import"./refund.3ce32833.js";import"./index.92e723dd.js";import"./inv-return.d6f6ed3a.js";import"./inv-return.5f7f99fb.js";import"./index.4b1d1800.js";import"./inv-open.49f3d470.js";import"./inv-open.9832d00a.js";import"./goods.0f0b5ca2.js";const z={class:"main flex h-full"},G={"bg-white":"","min-w-230px":""},Y={"bg-white":"","flex-1":""},J=V({__name:"detail",setup(W){const{query:D}=K(),g=P(),p=j([]),l=u([]),n=u(new Map),d=u({}),w=N(()=>D.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:M}=i[o],R=e[c];return{component:a,prop:m,title:M,api:s,value:R,key:o}})}async function E(){const{code:e,message:t,data:o}=await L({id:w.value});g({code:e,message:t,handler:()=>p.value=x(o)})}async function b(){await E(),p.value.forEach((e,t)=>{l.value.push(e.key),n.value.set(e.title,{top:"",index:t})})}function B(e,t){const o=n.value.get(t);n.value.set(t,{...o,top:e})}return Q(O,{goodData:d,setGoodData:e=>d.value=e}),U(()=>b()),(e,t)=>{const o=f("ElCollapseItem"),s=f("ElCollapse");return r(),v("div",z,[_("div",G,[h(S,{map:n.value},null,8,["map"])]),_("div",Y,[h(s,{modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=a=>l.value=a)},{default:y(()=>[(r(!0),v(q,null,A(F(p),a=>(r(),k(o,{title:a.title,name:a.key,key:a.key},{default:y(()=>[(r(),k(H(a.component),I(a,{onMapOffsetTop:t[0]||(t[0]=({top:m,title:c})=>B(m,c))}),null,16))]),_:2},1032,["title","name"]))),128))]),_:1},8,["modelValue"])])])}}});var Pe=T(J,[["__file","/Users/apple/Desktop/company-projects/accout-vue3-ui/src/views/search/standBook/detail.vue"]]);export{Pe as default};