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