1 |
- import{_ as z,d as G,p as H,x as v,ai as W,aM as J,bc as A,z as K,r as p,aD as Q,o as s,c as f,l as o,D as l,m as e,ar as X,a,G as r,aN as Y,F as b,dF as Z,H as $}from"./index.js";import{u as ee}from"./useDetail.d77f98f9.js";import{h as te,a as ae,b as oe,c as ue}from"./index.ff7eb665.js";import se from"./return-form.fd8662.js";import{D as g}from"./default.86fd4980.js";/* empty css */import{c as le}from"./ticketReturn.6df30604.js";import"./porder.9a85976d.js";import ne from"./invoice-modal.d9028e.js";import"./index.d8f51d.js";import"./index.2fb9f37c.js";import"./global.9ad647c8.js";import"./index.bf16817a.js";const ie={class:"padding__container"},re={key:0},pe=G({__name:"detail",setup(ce){const S="supplierInvoiceRelationDetail",{push:I}=H(),_=v(!0),{isSuperUser:T}=W(),{hasPermissionWithCode:c,permissions:me}=J(S),D=v(null),N=v(null),{id:B,isDetail:E,title:k,collapses:y}=ee({baseName:"\u4E70\u5165\u53D1\u7968\u5173\u8054",collapseLen:14}),w=v(!1),{run:x,data:t}=A({initalData:{},success:async(n={})=>{var d;const{supplierName:i}=n,u=await te({name:i}),[m={}]=((d=u==null?void 0:u.data)==null?void 0:d.list)||[];w.value=m.has_account}}),{run:P}=A({success:()=>I("/supply/supplierInvoiceRelation")}),{run:V,loading:j}=A({success:()=>M()});function M(){h(),N.value&&N.value.refresh(),_.value=!1,K(()=>_.value=!0)}const h=()=>x(ae({hpNo:B.value})),U=n=>P(oe(n));function C(n){const i={...n,hpNo:B.value};V(ue(i))}return E.value&&h(),(n,i)=>{const u=p("ElCollapseItem"),m=p("OrderRelationApproval"),d=p("ElCollapse"),O=p("ElTabPane"),L=p("ElTabs"),q=Q("loading");return s(),f("div",ie,[o(L,null,{default:l(()=>[o(O,{label:e(k)},{default:l(()=>[o(d,{modelValue:e(y),"onUpdate:modelValue":i[0]||(i[0]=F=>X(y)?y.value=F:null)},{default:l(()=>[o(u,{name:"1",title:e(k)},{default:l(()=>[a(" \u56DE\u7968\u8BE6\u60C5 "),e(E)?(s(),r(e(Y),{key:0,data:e(t),columns:e(le)(F=>{var R;return(R=D.value)==null?void 0:R.onDisplay(F)})},null,8,["data","columns"])):(s(),f(b,{key:1},[a(" \u521B\u5EFA\u56DE\u7968 "),o(se,{onCreate:U})],2112))]),_:1},8,["title"]),e(E)?(s(),f("div",re,[e(t)&&["2","3","4","6","12"].includes(String(e(t).status))&&_.value?(s(),r(u,{key:0,title:"\u5173\u8054\u4FE1\u606F",name:"10"},{default:l(()=>[o(m,{readonly:"",code:e(t).hpNo},null,8,["code"])]),_:1})):a("v-if",!0),o(ne,{ref_key:"invoiceModalRef",ref:D},null,512),a(" \u5BA1\u6279\u8282\u70B9 "),e(T)?a("v-if",!0):(s(),f(b,{key:1},[e(t)&&e(t).status=="11"&&e(c)("063")?(s(),r(u,{key:0,title:"\u5F85\u53D1\u7968\u4E0E\u8BA2\u5355\u5173\u8054",name:"8"},{default:l(()=>[a(' v-if="!isSupplierClient" '),o(Z,{code:e(t).hpNo,payNo:e(t).payNo,onRefresh:h,companyNo:e(t).companyNo,supplierNo:e(t).supplierNo,multiplePayNos:!0},null,8,["code","payNo","companyNo","supplierNo"]),a(' <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})):a("v-if",!0),e(t).status=="12"&&e(c)("065")?$((s(),r(u,{key:1,title:"\u5F85\u8D22\u52A1\u5BA1\u6838\u5173\u8054\u4FE1\u606F",name:"9"},{default:l(()=>[o(m,{rejectCode:13,successCode:3,code:e(t).hpNo,onSubmit:C},null,8,["code"])]),_:1})),[[q,e(j)]]):a("v-if",!0),String(e(t).status)==="2"&&e(c)("020")?(s(),r(u,{key:2,title:"\u4E70\u65B9\u516C\u53F8\u4E1A\u52A1\u5BA1\u6838",name:"4"},{default:l(()=>[o(e(g),{"approve-value":"3","reject-value":"6",onApproval:C})]),_:1})):a("v-if",!0),String(e(t).status)==="3"&&e(c)("021")?(s(),r(u,{key:3,title:"\u4E70\u65B9\u516C\u53F8\u8BA4\u8BC1",name:"5"},{default:l(()=>[o(e(g),{"approve-value":"4","reject-value":"7",onApproval:C})]),_:1})):a("v-if",!0)],64))])):a("v-if",!0)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})])}}});var ke=z(pe,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supply/invoiceRelation/detail.vue"]]);export{ke as default};
|