detail.b7d637.js 2.2 KB

1
  1. import{_ as w,d as A,aM as V,x as c,ai as g,p as F,bc as p,z as R,r as i,o as m,c as b,l as s,D as u,m as o,ar as Y,a as D,G as M,aN as U,F as j,ae as O}from"./index.js";import{u as S}from"./useDetail.d77f98f9.js";import{b as q,c as z,a as G}from"./index.2fb9f37c.js";import L from"./return-form.9a7b4a.js";import{i as H}from"./ticketReturn.6df30604.js";import"./porder.9a85976d.js";import"./invoice-table.dbd73d.js";import"./invoice-form.13a609.js";import"./_rules.e8143b8f.js";import"./global.9ad647c8.js";const J={class:"padding__container"},K=A({__name:"detail",setup(Q){V("inputInvoicePoolDetail"),c(null);const _=c(null);g();const{push:h}=F(),y=c(!1),d=c(!0),{id:E,isDetail:f,title:v,collapses:r}=S({baseName:"\u53D1\u7968",collapseLen:14}),{run:k,data:N}=p({initalData:{},success:async(n={})=>{var l;const{supplierName:t}=n,a=await q({name:t}),[e={}]=((l=a==null?void 0:a.data)==null?void 0:l.list)||[];y.value=e.has_account}}),{run:T}=p({success:()=>h("/purchase/inputInvoicePool")});p({success:()=>x()});function x(){C(),_.value&&_.value.refresh(),d.value=!1,R(()=>d.value=!0)}const C=()=>k(z({InvCode:E.value})),I=n=>{const{invArr:t}=n,a=t.map(e=>({invoice_subtotal:e.invoiceType.indexOf("fully")!==-1?"0":e.subtotal_amount,invoice_total:e.invoiceType.indexOf("fully")!==-1?e.subtotal_amount:"0",invoice_type:e.invoiceType||"",invoice_number:e.invNumber||"",check_code:e.checkNumber||"",invoice_code:e.invCode||"",open_date:O(e.open_time).format("YYYY-MM-DD")}));T(G({list:a}))};return f.value&&C(),(n,t)=>{const a=i("ElCollapseItem"),e=i("ElCollapse"),l=i("ElTabPane"),P=i("ElTabs");return m(),b("div",J,[s(P,null,{default:u(()=>[s(l,{label:o(v)},{default:u(()=>[s(e,{modelValue:o(r),"onUpdate:modelValue":t[0]||(t[0]=B=>Y(r)?r.value=B:null)},{default:u(()=>[s(a,{name:"1",title:o(v)},{default:u(()=>[D(" \u53D1\u7968\u8BE6\u60C5 "),o(f)?(m(),M(o(U),{key:0,data:o(N),columns:o(H)},null,8,["data","columns"])):(m(),b(j,{key:1},[D(" \u521B\u5EFA\u56DE\u7968 "),s(L,{onCreate:I})],2112))]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})])}}});var ce=w(K,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supplyNew/inputInvoicePool/detail.vue"]]);export{ce as default};