import{_ as $,d as q,p as K,x as Q,aM as X,ai as Y,bc as f,cC as Z,ah as v,r as y,aD as ee,o as i,c as b,a as l,l as r,D as u,m as e,ar as te,H as N,G as _,aN as ne,F as A}from"./index.js";import{u as ae}from"./useDetail.748c7288.js";import oe from"./return-form.99f8b3.js";import ie from"./approval-pending.09d376.js";import{I as se}from"./index.47e512cd.js";import{i as le}from"./_details.7654bf63.js";import re from"./index.dfc773.js";import{h as B,a as ue,b as ce}from"./index.cddc3b13.js";import"./inv-open.90cd9d14.js";import"./index.eaa670.js";const ve={class:"padding__container"},pe=q({__name:"detail",setup(me){const{push:x}=K(),S="returnTicketDetail",D=Q({}),{hasPermissionWithCode:T}=X(S),{id:C,isDetail:g,collapses:h,title:k}=ae({baseName:"\u9000\u7968\u7533\u8BF7",collapseLen:5}),{isSuperUser:F}=Y(),{data:a,run:I,loading:V}=f({initalData:{},success:({invNo:t})=>{H(Z({invNo:t}))}}),{run:P}=f({success:()=>x("/InvoiceSales/returnTicket")}),{run:R}=f({success:()=>{I(B({returnCode:C.value}))}}),U=v(()=>{const{inv_type:t}=a.value;return t==="2"||t==="3"}),j=v(()=>{const{inv_type:t}=a.value;return t==="fully_digitalized_special_electronic"||t==="fully_digitalized_normal_electronic"}),w=v(()=>{const{open_type:t}=a.value;return String(t)==="1"}),z=v(()=>{const{is_out_month:t}=a.value;return t}),O=v(()=>{const{open_type:t}=c.value;return["2","3"].includes(String(t))}),G=v(()=>{const{inv_type:t}=a.value;return t}),{data:c,run:H,loading:J}=f({initalData:{},success(t){const{inv_code:o,inv_number:n,open_date:s,inv_subtotal:p,check_code:m,inv_total:d}=t.invinfo;D.value={invCode:o,invNum:n,subtotal_fee:p,checkCode:m,total_fee:d,open_date:s}}});function E(){const{inv_code:t,inv_number:o,open_date:n,inv_subtotal:s,check_code:p,inv_total:m}=D.value;return{total_fee:m,invCode:t,invNum:o,open_date:n,subtotal_fee:s,checkCode:p}}function L(t,o=!1){const n=E(),s={returnCode:C.value,...t,...o?n:{}};R(ue(s))}const M=t=>{P(ce(t))};return g.value&&I(B({returnCode:C.value})),(t,o)=>{const n=y("ElCollapseItem"),s=y("ElCollapse"),p=y("ElTabPane"),m=y("ElTabs"),d=ee("loading");return i(),b("div",ve,[l(" {{ orginInvData }} "),r(m,null,{default:u(()=>[r(p,{label:e(k)},{default:u(()=>[r(s,{modelValue:e(h),"onUpdate:modelValue":o[0]||(o[0]=W=>te(h)?h.value=W:null)},{default:u(()=>[r(n,{name:"1",title:e(k)},{default:u(()=>[e(g)?N((i(),_(e(ne),{key:0,columns:e(le),data:e(a)},null,8,["columns","data"])),[[d,e(V)]]):(i(),_(oe,{key:1,onCreate:M}))]),_:1},8,["title"]),e(g)?(i(),b(A,{key:0},[e(a).invNo?(i(),_(n,{key:0,name:"2",title:"\u53D1\u7968\u7533\u8BF7\u8BE6\u60C5"},{default:u(()=>[N(r(re,{detail:e(c)},null,8,["detail"]),[[d,e(J)]])]),_:1})):l("v-if",!0),e(c)&&e(c).invinfo&&e(c).invinfo.inv_number?(i(),_(n,{key:1,name:"3",title:"\u84DD\u7968\u8BE6\u60C5"},{default:u(()=>[l(' @get-invoice-data="data => (orginInvData = data)" '),r(e(se),{type:"sale","inv-number":e(c).invinfo.inv_number},null,8,["inv-number"])]),_:1})):l("v-if",!0),e(F)?l("v-if",!0):(i(),b(A,{key:2},[String(e(a).status)==="0"&&e(T)("025")?(i(),_(n,{key:0,name:"4",title:"\u5F85\u5BA1\u6838"},{default:u(()=>[r(ie,{isNormal:e(U),isAllEx:e(j),"is-js":e(w),"is-out-month":e(z),"is-normal-open":e(O),"inv-type":e(G),"company-no":e(a).companyNo,orginInvData:D.value,onApproval:L,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=$(pe,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/returnTicket/detail.vue"]]);export{Ie as default};
