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