import{_ as S,d as U,aL as j,n as w,w as q,ah as L,b3 as d,r as i,o,c as p,l as t,C as a,u as e,aq as G,a as u,G as _,F as D}from"./index.42bf163d.js";import{u as W}from"./useDetail.a92278a2.js";import{b as z,c as H,d as J}from"./index.662da746.js";import{B as K}from"./basic-descriptions.bd1e983e.js";import{R as M}from"./index.3d26752b.js";import O from"./return-form.266e1a96.js";import{I as Q}from"./index.2b5571d1.js";import{D as k}from"./default.bc693ea2.js";/* empty css */import{t as X}from"./ticketReturn.58915008.js";import"./porder.386fe03e.js";import"./index.e0b507e8.js";import"./tootip.bb80052f.js";import"./status.d6b2a53d.js";import"./choose-modal.7e506a9e.js";import"./_details.70698317.js";import"./date-range.26f9b7e9.js";import"./_options.b664a184.js";import"./invoice-table.be6e130b.js";import"./invoice-form.c8ee37a1.js";import"./global.9ad647c8.js";import"./invoice.f8cf8dbb.js";const Y={class:"padding__container"},Z={key:0},$=U({__name:"detail",setup(ee){const b="ticketReturnDetail",{hasPermissionWithCode:v}=j(b),{push:A}=w(),m=q(null),{isSuperUser:y}=L(),{id:C,isDetail:c,title:E,collapses:f}=W({baseName:"\u91C7\u8D2D\u56DE\u7968",collapseLen:5}),{run:R,data:s}=d({initalData:{}}),{run:N}=d({success:()=>A("/purchase/ticketReturn")}),{run:F}=d({success:()=>g()});function g(){h(),m.value&&m.value.refresh()}const h=()=>R(z({hpNo:C.value})),I=l=>N(H(l));function B(l){const n={...l,hpNo:C.value};F(J(n))}return c.value&&h(),(l,n)=>{const r=i("ElCollapseItem"),T=i("ElCollapse"),V=i("ElTabPane"),x=i("ElTabs");return o(),p("div",Y,[t(x,null,{default:a(()=>[t(V,{label:e(E)},{default:a(()=>[t(T,{modelValue:e(f),"onUpdate:modelValue":n[0]||(n[0]=P=>G(f)?f.value=P:null)},{default:a(()=>[t(r,{name:"1",title:e(E)},{default:a(()=>[u(" \u56DE\u7968\u8BE6\u60C5 "),e(c)?(o(),_(e(K),{key:0,columns:e(X),data:e(s)},null,8,["columns","data"])):(o(),p(D,{key:1},[u(" \u521B\u5EFA\u56DE\u7968 "),t(O,{onCreate:I})],2112))]),_:1},8,["title"]),e(c)?(o(),p("div",Z,[t(r,{name:"2",title:"\u5BF9\u8D26\u8BE6\u60C5"},{default:a(()=>[t(e(M),{ref_key:"formRef",ref:m,readonly:"",id:e(s).payNo},null,8,["id"])]),_:1}),t(r,{name:"3",title:"\u53D1\u7968\u8BE6\u60C5"},{default:a(()=>[t(e(Q),{type:"purchase","inv-number":e(s).invoiceNumber},null,8,["inv-number"])]),_:1}),u(" \u5BA1\u6279\u8282\u70B9 "),e(y)?u("v-if",!0):(o(),p(D,{key:0},[String(e(s).status)==="2"&&e(v)("020")?(o(),_(r,{key:0,title:"\u4E70\u65B9\u516C\u53F8\u4E1A\u52A1\u5BA1\u6838",name:"4"},{default:a(()=>[t(e(k),{"approve-value":"3","reject-value":"6",onApproval:B})]),_:1})):u("v-if",!0),String(e(s).status)==="3"&&e(v)("021")?(o(),_(r,{key:1,name:"5",title:"\u4E70\u65B9\u516C\u53F8\u8BA4\u8BC1"},{default:a(()=>[t(e(k),{"approve-value":"4","reject-value":"7",onApproval:B})]),_:1})):u("v-if",!0)],64))])):u("v-if",!0)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})])}}});var be=S($,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/purchase/ticketReturn/detail.vue"]]);export{be as default};