import{_ as y,d as h,n as m,r as l,o as C,c as w,h as o,y as i,e as x,H as E,i as c,cd as k,eD as B}from"./index.js";import D from"./invoice-table.caa80b.js";import{c as N}from"./_rules.e8143b8f.js";import"./invoice-form.2bad9e.js";import"./global.9ad647c8.js";const g={"w-full":""},F={class:"flex w-full justify-end"},R=h({__name:"return-form",emits:["create"],setup(T,{emit:f}){const p=f,u=m(null),t=m({payNo:"",invArr:[]});async function _(){try{await u.value.validate(),p("create",c(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",g,[o(c(k),{ref_key:"formRef",ref:u,"label-width":"100px",model:t.value,rules:c(N)},{default:i(()=>[o(n,{label:"\u53D1\u7968",prop:"invArr"},{default:i(()=>[o(D,{onChange:d})]),_:1}),x("div",F,[o(a,{type:"primary",onClick:_},{default:i(()=>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 A=y(R,[["__file","D:/work/jiesuan/settle-vue3/src/views/supplyNew/inputInvoicePool/components/return-form.vue"]]);export{A as default};
