import $ from"./initiate-audit.92e58551.js";import q from"./business-audit.0999c381.js";import F from"./financial-audit.a98d15d9.js";import R from"./payment-receipt.52eadf9d.js";import T from"./index.97537c48.js";import V from"./index.79f4240a.js";import{a2 as n,_ as z,q as H,x as K,w as M,B as U,C as j,r as h,o as u,n as G,v as _,K as c,H as o,t,P as v}from"./index.10c3f8e5.js";import{u as J}from"./use-response-handle.23bba72b.js";import{h as L,a as O,b as Q}from"./index.5ed24c0b.js";import"./use-review-process.41795506.js";import"./configs.40b3dcc9.js";import"./index.a762c091.js";import"./order-table.13fee2cf.js";import"./index.44c8546a.js";import"./add-order-modal.fd2b5df8.js";import"./basic-purchase.5bb63e11.js";import"./status.7319085b.js";function W(r,s){const y=n(()=>r.value===0&&!s.value),l=n(()=>r.value===1&&!s.value),p=n(()=>r.value===2&&!s.value),m=n(()=>r.value===3&&!s.value);return{showInitiateAudit:y,showBusinessAudit:l,showFinancialAudit:p,showPaymentReceipt:m}}const X={class:"pay__content","bg-white":""},Y=H({__name:"detail",setup(r){const{push:s}=K(),{query:y}=M(),l=n(()=>y.id),p=n(()=>!l.value),m=J(),d=U({}),E=()=>s("/purchase/purchPay"),D=n(()=>d.value?Number(d.value.status):0),C=["0","1","2","3","4"],{showInitiateAudit:w,showBusinessAudit:P,showFinancialAudit:b,showPaymentReceipt:g}=W(D,p);async function f(i,a={}){const{code:e,message:B}=await L({status:i,...a,dzNo:l.value});m({code:e,message:B,handler:E})}async function k(i){const{code:a,message:e}=await O(i);m({code:a,message:e,handler:E})}async function S(){const{message:i,code:a,data:e}=await Q({DzNo:l.value});m({message:i,code:a,handler:()=>d.value=e})}async function x(){!l.value||S()}return j(()=>x()),(i,a)=>{const e=h("ElCollapseItem"),B=h("ElCollapse"),A=h("ElTabPane"),I=h("ElTabs");return u(),G("div",X,[_(p)?(u(),c(T,{key:0,onCreatePayment:k})):(u(),c(I,{key:1},{default:o(()=>[t(A,{label:"\u91C7\u8D2D\u4ED8\u6B3E\u7533\u8BF7\u8BE6\u60C5"},{default:o(()=>[t(B,{modelValue:C,"onUpdate:modelValue":a[0]||(a[0]=N=>C=N)},{default:o(()=>[t(e,{title:"\u91C7\u8D2D\u4ED8\u6B3E\u7533\u8BF7\u8BE6\u60C5",name:"0"},{default:o(()=>[t(V,{detail:d.value},null,8,["detail"])]),_:1}),_(w)?(u(),c(e,{key:0,name:"1",title:"\u53D1\u8D77\u5BA1\u6838\u6D41\u7A0B"},{default:o(()=>[t($,{onChangeStatus:f})]),_:1})):v("",!0),_(P)?(u(),c(e,{key:1,name:"2",title:"\u4E1A\u52A1\u5BA1\u6838"},{default:o(()=>[t(q,{onChangeStatus:f})]),_:1})):v("",!0),_(b)?(u(),c(e,{key:2,name:"3",title:"\u8D22\u52A1\u5BA1\u6838"},{default:o(()=>[t(F,{onChangeStatus:f})]),_:1})):v("",!0),_(g)?(u(),c(e,{key:3,name:"4",title:"\u4ED8\u6B3E\u56DE\u6267"},{default:o(()=>[t(R,{onChangeStatus:f})]),_:1})):v("",!0)]),_:1})]),_:1}),t(A,{label:"\u5BA1\u6279\u8BB0\u5F55"})]),_:1}))])}}});var he=z(Y,[["__scopeId","data-v-c31f9700"]]);export{he as default};
