import{_ as v,d as h,x as f,r as l,o as y,c as C,l as o,D as c,h as x,M as E,m as u,aQ as k,df as w}from"./index.js";import B from"./invoice-table.a7122b.js";import{c as D}from"./invoice-form.b6a27e.js";import"./global.9ad647c8.js";const g={"w-full":""},F={class:"flex w-full justify-end"},N=h({__name:"return-form",emits:["create"],setup(R,{emit:m}){const i=f(null),t=f({payNo:"",invArr:[]});async function p(){try{await i.value.validate(),m("create",u(t))}catch{}}const _=r=>{r.forEach(e=>{const a=e.invoiceType;if(!a)return;const n=w.find(({scanValue:s})=>s===a);n&&(e.invoiceType=n.value)}),t.value.invArr=r};return(r,e)=>{const a=l("ElFormItem"),n=l("ElButton"),s=l("ChooseModal");return y(),C("div",g,[o(u(k),{ref_key:"formRef",ref:i,"label-width":"100px",model:t.value,rules:u(D)},{default:c(()=>[o(a,{label:"\u53D1\u7968",prop:"invArr"},{default:c(()=>[o(B,{onChange:_})]),_:1}),x("div",F,[o(n,{type:"primary",onClick:p},{default:c(()=>[E(" \u4FDD\u5B58 ")]),_:1})])]),_:1},8,["model","rules"]),o(s,{ref:"chooseModalRef",onChoose:e[0]||(e[0]=d=>t.value.payNo=d)},null,512)])}}});var V=v(N,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supply/outputInvoicePool/components/return-form.vue"]]);export{V as default};
