import{_ as h,d as y,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.fd980e.js";import{c as g}from"./_rules.bde94d19.js";import"./invoice-form.f6042b.js";import"./global.9ad647c8.js";const F={"w-full":""},N={class:"flex w-full justify-end"},R=y({__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",F,[o(c(k),{ref_key:"formRef",ref:u,"label-width":"100px",model:t.value,rules:c(g)},{default:i(()=>[o(n,{label:"\u53D1\u7968",prop:"invArr"},{default:i(()=>[o(D,{onChange:d})]),_:1}),x("div",N,[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=h(R,[["__file","D:/work/jiesuan/settle-vue3/src/views/purchase/inputInvoicePool/components/return-form.vue"]]);export{A as default};
