import{q as _,w as f,a2 as v,B as d,C as h,o as y,n as g,t as i}from"./index.7a111e62.js";import q from"./receipt-payment.159a1022.js";import w from"./related-order.7a3e8d5d.js";import{h as C,a as N,b as B}from"./index.694cd68a.js";import{u as k}from"./use-response-handle.f995d678.js";import"./configs.ef9479ae.js";import"./sales-modal.b2ccff2c.js";const x={class:"invoice__content","bg-white":""},A=_({__name:"detail",setup(D){const{query:c}=f(),o=v(()=>c.id),n=k(),r=d({}),s=d([]);async function l(){const{code:e,message:t,data:a}=await N({tradNo:o.value});n({code:e,message:t,handler:()=>r.value=a})}async function u(){const{code:e,message:t,data:a}=await B({tradNo:o.value});n({code:e,message:t,handler:()=>s.value=a})}function m(){!o.value||(l(),u())}async function p(e=[]){const{code:t,message:a}=await C({tradNo:o.value,orderArr:e});n({code:t,message:a,handler:()=>{}})}return h(()=>m()),(e,t)=>(y(),g("div",x,[i(q,{"trade-info":r.value},null,8,["trade-info"]),i(w,{"trade-order-list":s.value,onCreateBtnClick:p},null,8,["trade-order-list"])]))}});export{A as default};
