import{_ as $,d as z,n as K,w as M,aL as Q,ah as X,b3 as v,ag as c,r as d,aC as Y,o as s,c as h,l as i,C as l,u as e,aq as Z,H as N,G as m,F as B,a as p}from"./index.1d1a5ecb.js";import{u as ee}from"./useDetail.def78081.js";import te from"./return-form.bd9a21bf.js";import{B as ne}from"./basic-descriptions.1879b0f8.js";import oe from"./approval-pending.219eff7f.js";import{I as ae}from"./index.b5c3b679.js";import{i as se}from"./capital-modal.bbd60b51.js";import ie from"./index.fe3d2258.js";import{h as S,a as le,b as re}from"./index.fd0a7cba.js";import{d as ue}from"./index.5fa131c7.js";import"./inv-open.21fa1eb1.js";import"./tootip.76f6bcc3.js";import"./status.d6b2a53d.js";import"./invoice.be540bfd.js";const ce={class:"padding__container"},me=z({__name:"detail",setup(pe){const{push:T}=K(),A="returnTicketDetail",g=M({}),{hasPermissionWithCode:F}=Q(A),{id:_,isDetail:f,collapses:C,title:b}=ee({baseName:"\u9000\u7968\u7533\u8BF7",collapseLen:5}),{isSuperUser:V}=X(),{data:n,run:k,loading:P}=v({initalData:{},success:({invNo:t})=>{O(ue({invNo:t}))}}),{run:R}=v({success:()=>T("/InvoiceSales/returnTicket")}),{run:w}=v({success:()=>{k(S({returnCode:_.value}))}}),x=c(()=>{const{inv_type:t}=n.value;return t==="2"||t==="3"}),U=c(()=>{const{open_type:t}=n.value;return String(t)==="1"}),j=c(()=>{const{is_out_month:t}=n.value;return t}),G=c(()=>{const{open_type:t}=r.value;return["2","3"].includes(String(t))}),L=c(()=>{const{inv_type:t}=n.value;return t}),{data:r,run:O,loading:q}=v({initalData:{}});function I(){const{inv_code:t,inv_number:o,open_date:a,inv_subtotal:u,check_code:y}=g.value;return{invCode:t,invNum:o,open_date:a,subtotal_fee:u,checkCode:y}}function H(t,o=!1){const a=I(),u={returnCode:_.value,...t,...o?a:{}};w(le(u))}const J=t=>{R(re(t))};return f.value&&k(S({returnCode:_.value})),(t,o)=>{const a=d("ElCollapseItem"),u=d("ElCollapse"),y=d("ElTabPane"),W=d("ElTabs"),E=Y("loading");return s(),h("div",ce,[i(W,null,{default:l(()=>[i(y,{label:e(b)},{default:l(()=>[i(u,{modelValue:e(C),"onUpdate:modelValue":o[1]||(o[1]=D=>Z(C)?C.value=D:null)},{default:l(()=>[i(a,{name:"1",title:e(b)},{default:l(()=>[e(f)?N((s(),m(e(ne),{key:0,columns:e(se),data:e(n)},null,8,["columns","data"])),[[E,e(P)]]):(s(),m(te,{key:1,onCreate:J}))]),_:1},8,["title"]),e(f)?(s(),h(B,{key:0},[e(n).invNo?(s(),m(a,{key:0,name:"2",title:"\u53D1\u7968\u7533\u8BF7\u8BE6\u60C5"},{default:l(()=>[N(i(ie,{detail:e(r)},null,8,["detail"]),[[E,e(q)]])]),_:1})):p("v-if",!0),e(r)&&e(r).invinfo&&e(r).invinfo.inv_number?(s(),m(a,{key:1,name:"3",title:"\u84DD\u7968\u8BE6\u60C5"},{default:l(()=>[i(e(ae),{type:"sale","inv-number":e(r).invinfo.inv_number,onGetInvoiceData:o[0]||(o[0]=D=>g.value=D)},null,8,["inv-number"])]),_:1})):p("v-if",!0),e(V)?p("v-if",!0):(s(),h(B,{key:2},[String(e(n).status)==="0"&&e(F)("025")?(s(),m(a,{key:0,name:"4",title:"\u5F85\u5BA1\u6838"},{default:l(()=>[i(oe,{isNormal:e(x),"is-js":e(U),"is-out-month":e(j),"is-normal-open":e(G),"inv-type":e(L),"company-no":e(n).companyNo,onApproval:H,getOriginInvoice:I},null,8,["isNormal","is-js","is-out-month","is-normal-open","inv-type","company-no"])]),_:1})):p("v-if",!0)],64))],64)):p("v-if",!0)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})])}}});var Be=$(me,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/returnTicket/detail.vue"]]);export{Be as default};
