import{_ as L,d as Z,p as q,x as d,ai as z,aM as G,bc as C,z as W,r as i,o as s,c as f,l as o,D as l,m as e,ar as H,a as t,G as p,aN as J,F as R,dF as K}from"./index.js";import{u as Q}from"./useDetail.748c7288.js";import{h as X,a as Y,b as $,c as ee}from"./index.ae4dabde.js";import ae from"./return-form.4fb7df.js";import{D as te}from"./default.5cadb723.js";/* empty css                                                */import{c as oe}from"./ticketReturn.8c918810.js";import"./porder.cb2a60e8.js";import ue from"./invoice-modal.047b9b.js";import{Z as se}from"./index.7fca4ea5.js";import"./index.1d1004.js";import"./index.8d1ab27f.js";import"./global.9ad647c8.js";import"./index.47e512cd.js";const le={class:"padding__container"},ne={key:0},re=Z({__name:"detail",setup(ie){const b="supplyInvoiceRelationDetail",{push:g}=q(),v=d(!0),{isSuperUser:I}=z(),F=d(null),{hasPermissionWithCode:_,permissions:pe}=G(b),A=d(null),{id:D,isDetail:E,title:k,collapses:y}=Q({baseName:"\u4E70\u5165\u53D1\u7968\u5173\u8054",collapseLen:14}),S=d(!1),{run:T,data:a}=C({initalData:{},success:async(n={})=>{var m;const{supplierName:r}=n,u=await X({name:r}),[h={}]=((m=u==null?void 0:u.data)==null?void 0:m.list)||[];S.value=h.has_account}}),{run:w}=C({success:()=>g("/supply/supplyCollection")}),{run:x,loading:P}=C({success:()=>V()});function V(){c(),A.value&&A.value.refresh(),v.value=!1,W(()=>v.value=!0)}const c=()=>T(Y({hpNo:D.value})),M=n=>w($(n));function U(n){const r={...n,hpNo:D.value};x(ee(r))}return E.value&&c(),(n,r)=>{const u=i("ElCollapseItem"),h=i("OrderRelationApproval"),m=i("ElCollapse"),O=i("ElTabPane"),j=i("ElTabs");return s(),f("div",le,[o(j,null,{default:l(()=>[o(O,{label:e(k)},{default:l(()=>[o(m,{modelValue:e(y),"onUpdate:modelValue":r[0]||(r[0]=N=>H(y)?y.value=N:null)},{default:l(()=>[o(u,{name:"1",title:e(k)},{default:l(()=>[t(" \u56DE\u7968\u8BE6\u60C5 "),e(E)?(s(),p(e(J),{key:0,data:e(a),columns:e(oe)(N=>{var B;return(B=F.value)==null?void 0:B.onDisplay(N)})},null,8,["data","columns"])):(s(),f(R,{key:1},[t(" \u521B\u5EFA\u56DE\u7968 "),o(ae,{onCreate:M})],2112))]),_:1},8,["title"]),e(E)?(s(),f("div",ne,[e(a)&&["2","3","4","6","12"].includes(String(e(a).status))&&v.value?(s(),p(u,{key:0,title:"\u5173\u8054\u4FE1\u606F",name:"10"},{default:l(()=>[o(h,{readonly:"",code:e(a).hpNo},null,8,["code"])]),_:1})):t("v-if",!0),o(ue,{ref_key:"invoiceModalRef",ref:F},null,512),e(a)&&e(a).status=="14"&&e(_)("067")?(s(),p(u,{key:1,title:"\u5F85\u786E\u8BA4\u53D1\u7968\u660E\u7EC6",name:"10"},{default:l(()=>[o(e(se),{code:e(a).hpNo,onRefresh:c},null,8,["code"])]),_:1})):t("v-if",!0),t(" \u5BA1\u6279\u8282\u70B9 "),e(I)?t("v-if",!0):(s(),f(R,{key:2},[e(a)&&e(a).status=="11"&&e(_)("063")?(s(),p(u,{key:0,title:"\u5F85\u53D1\u7968\u4E0E\u8BA2\u5355\u5173\u8054",name:"8"},{default:l(()=>[t(' v-if="!isSupplierClient"  '),o(K,{code:e(a).hpNo,payNo:e(a).payNo,onRefresh:c,companyNo:e(a).companyNo,supplierNo:e(a).supplierNo,multiplePayNos:!0},null,8,["code","payNo","companyNo","supplierNo"]),t(' <ElAlert v-else :closable="false" type="warning"  title="\u5F53\u524D\u4F9B\u5E94\u5546\u5DF2\u5F00\u901A\u4F9B\u5E94\u5546\u7AEF,\u8BF7\u5230\u4F9B\u5E94\u5546\u7AEF\u64CD\u4F5C" /> ')]),_:1})):t("v-if",!0),!e(P)&&String(e(a).status)==="2"&&e(_)("020")?(s(),p(u,{key:1,title:"\u4E70\u65B9\u516C\u53F8\u4E1A\u52A1\u5BA1\u6838",name:"4"},{default:l(()=>[o(e(te),{"approve-value":"3","reject-value":"6",onApproval:U})]),_:1})):t("v-if",!0)],64))])):t("v-if",!0)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})])}}});var ke=L(re,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supplyNew/invoiceRelation/detail.vue"]]);export{ke as default};
