import{_ as V,d as w,c9 as x,k as P,n as j,ab as U,cB as v,r as i,o as s,c as p,h as t,y as a,i as e,ak as q,a as o,A as _,ca as L,F as y}from"./index.js";import{u as W}from"./useDetail.da468487.js";import{h as z,d as G,e as H}from"./index.9c129b93.js";import J from"./index.48d92d.js";import K from"./return-form.ed14c9.js";import{I as M}from"./index.b589278a.js";import{D as k}from"./receipt.f599b785.js";import{s as Q}from"./ticketReturn.e53d6b17.js";import"./porder.827c74bc.js";import"./orderRecord.92bbc10f.js";import"./index.f78c594b.js";import"./choose-modal.6c8da0.js";import"./_details.810a642a.js";import"./invoice-table.b963eb.js";import"./invoice-form.d38d37.js";import"./global.9ad647c8.js";const X={class:"padding__container bg-white"},Y={key:0},Z="sendOrderInvoiceDetail",$=w({__name:"detail",setup(ee){const{hasPermissionWithCode:C}=x(Z),{push:B}=P(),c=j(null),{isSuperUser:m}=U(),{id:E,isDetail:d,title:h,collapses:f}=W({baseName:"\u8FD0\u5355\u56DE\u7968",collapseLen:5}),{run:b,data:r}=v({initalData:{}}),{run:N}=v({success:()=>B("/postSupplierOrder/postSupplierOrderCollection?tab=sendOrderInvoice_collection")}),{run:F}=v({success:()=>I()});function I(){A(),c.value&&c.value.refresh()}const A=()=>b(z({hpNo:E.value})),R=l=>N(G(l));function D(l){const n={...l,hpNo:E.value};F(H(n))}return d.value&&A(),(l,n)=>{const u=i("ElCollapseItem"),S=i("ElCollapse"),g=i("ElTabPane"),O=i("ElTabs");return s(),p("div",X,[t(O,null,{default:a(()=>[t(g,{label:e(h)},{default:a(()=>[t(S,{modelValue:e(f),"onUpdate:modelValue":n[0]||(n[0]=T=>q(f)?f.value=T:null)},{default:a(()=>[t(u,{name:"1",title:e(h)},{default:a(()=>[o(" \u56DE\u7968\u8BE6\u60C5 "),e(d)?(s(),_(e(L),{key:0,columns:e(Q),data:e(r)},null,8,["columns","data"])):(s(),p(y,{key:1},[o(" \u521B\u5EFA\u56DE\u7968 "),t(K,{onCreate:R})],2112))]),_:1},8,["title"]),e(d)?(s(),p("div",Y,[t(u,{name:"2",title:"\u5BF9\u8D26\u8BE6\u60C5"},{default:a(()=>[o(' <ReconciliationForm ref="formRef" readonly :id="data.payNo"  /> '),t(J,{ref_key:"formRef",ref:c,request:"",readonly:"",payNo:e(r).payNo},null,8,["payNo"])]),_:1}),t(u,{name:"3",title:"\u53D1\u7968\u8BE6\u60C5"},{default:a(()=>[t(e(M),{type:"purchase","inv-number":e(r).invoiceNumber},null,8,["inv-number"])]),_:1}),o(" \u5BA1\u6279\u8282\u70B9 "),e(m)?o("v-if",!0):(s(),p(y,{key:0},[String(e(r).status)==="2"&&e(C)("053")&&!e(m)?(s(),_(u,{key:0,title:"\u4E1A\u52A1\u516C\u53F8\u4E1A\u52A1\u5BA1\u6838",name:"4"},{default:a(()=>[t(e(k),{"approve-value":"3","reject-value":"6",onApproval:D})]),_:1})):o("v-if",!0),String(e(r).status)==="3"&&e(C)("054")&&!e(m)?(s(),_(u,{key:1,name:"5",title:"\u4E1A\u52A1\u516C\u53F8\u8BA4\u8BC1"},{default:a(()=>[t(e(k),{"approve-value":"4","reject-value":"7",onApproval:D})]),_:1})):o("v-if",!0)],64))])):o("v-if",!0)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})])}}});var Ce=V($,[["__file","D:/work/jiesuan/settle-vue3/src/views/postSupplierOrder/sendOrderInvoice/detail.vue"]]);export{Ce as default};
