import{_ as G,d as H,k as K,n as M,c9 as Q,ab as X,cB as f,e0 as Y,aa as v,r as y,aw as Z,o as i,c as k,a as l,h as u,y as r,i as t,ak as ee,B as N,A as p,ca as te,F as B}from"./index.js";import{u as ne}from"./useDetail.da468487.js";import ae from"./return-form.d62902.js";import oe from"./approval-pending.9ddaaf.js";import{I as ie}from"./index.c443965f.js";import{i as se}from"./_details.3de0dc8c.js";import le from"./index.5405ac.js";import{h as A,a as ue,b as re}from"./index.eed3ef73.js";import"./inv-open.b2ee78c0.js";import"./index.19032b.js";const ce={class:"padding__container"},ve="returnTicketDetail",me=H({__name:"detail",setup(_e){const{push:S}=K(),g=M({}),{hasPermissionWithCode:x}=Q(ve),{id:D,isDetail:h,collapses:C,title:b}=ne({baseName:"\u9000\u7968\u7533\u8BF7",collapseLen:5}),{isSuperUser:T}=X(),{data:a,run:I,loading:F}=f({initalData:{},success:({invNo:e})=>{J(Y({invNo:e}))}}),{run:V}=f({success:()=>S("/InvoiceSales/returnTicket")}),{run:w}=f({success:()=>{I(A({returnCode:D.value}))}}),P=v(()=>{const{inv_type:e}=a.value;return e==="2"||e==="3"}),R=v(()=>{const{inv_type:e}=a.value;return e==="fully_digitalized_special_electronic"||e==="fully_digitalized_normal_electronic"}),j=v(()=>{const{open_type:e}=a.value;return String(e)==="1"}),U=v(()=>{const{is_out_month:e}=a.value;return e}),z=v(()=>{const{open_type:e}=c.value;return["2","3"].includes(String(e))}),O=v(()=>{const{inv_type:e}=a.value;return e}),{data:c,run:J,loading:L}=f({initalData:{},success(e){const{inv_code:o,inv_number:n,open_date:s,inv_subtotal:m,check_code:_,inv_total:d}=e.invinfo;g.value={invCode:o,invNum:n,subtotal_fee:m,checkCode:_,total_fee:d,open_date:s}}});function E(){const{inv_code:e,inv_number:o,open_date:n,inv_subtotal:s,check_code:m,inv_total:_}=g.value;return{total_fee:_,invCode:e,invNum:o,open_date:n,subtotal_fee:s,checkCode:m}}function W(e,o=!1){const n=E(),s={returnCode:D.value,...e,...o?n:{}};w(ue(s))}const $=e=>{V(re(e))};return h.value&&I(A({returnCode:D.value})),(e,o)=>{const n=y("ElCollapseItem"),s=y("ElCollapse"),m=y("ElTabPane"),_=y("ElTabs"),d=Z("loading");return i(),k("div",ce,[l(" {{ orginInvData }} "),u(_,null,{default:r(()=>[u(m,{label:t(b)},{default:r(()=>[u(s,{modelValue:t(C),"onUpdate:modelValue":o[0]||(o[0]=q=>ee(C)?C.value=q:null)},{default:r(()=>[u(n,{name:"1",title:t(b)},{default:r(()=>[t(h)?N((i(),p(t(te),{key:0,columns:t(se),data:t(a)},null,8,["columns","data"])),[[d,t(F)]]):(i(),p(ae,{key:1,onCreate:$}))]),_:1},8,["title"]),t(h)?(i(),k(B,{key:0},[t(a).invNo?(i(),p(n,{key:0,name:"2",title:"\u53D1\u7968\u7533\u8BF7\u8BE6\u60C5"},{default:r(()=>[N(u(le,{detail:t(c)},null,8,["detail"]),[[d,t(L)]])]),_:1})):l("v-if",!0),t(c)&&t(c).invinfo&&t(c).invinfo.inv_number?(i(),p(n,{key:1,name:"3",title:"\u84DD\u7968\u8BE6\u60C5"},{default:r(()=>[l(' @get-invoice-data="data => (orginInvData = data)" '),u(t(ie),{type:"sale","inv-number":t(c).invinfo.inv_number},null,8,["inv-number"])]),_:1})):l("v-if",!0),t(T)?l("v-if",!0):(i(),k(B,{key:2},[String(t(a).status)==="0"&&t(x)("025")?(i(),p(n,{key:0,name:"4",title:"\u5F85\u5BA1\u6838"},{default:r(()=>[u(oe,{isNormal:P.value,isAllEx:R.value,"is-js":j.value,"is-out-month":U.value,"is-normal-open":z.value,"inv-type":O.value,"company-no":t(a).companyNo,orginInvData:g.value,onApproval:W,getOriginInvoice:E},null,8,["isNormal","isAllEx","is-js","is-out-month","is-normal-open","inv-type","company-no","orginInvData"])]),_:1})):l("v-if",!0)],64))],64)):l("v-if",!0)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})])}}});var Ie=G(me,[["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/returnTicket/detail.vue"]]);export{Ie as default};
