return-form.0e4f51.js 1.2 KB

1
  1. 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 i,aQ as k,df as w}from"./index.js";import B from"./invoice-table.d05740.js";import{c as D}from"./_rules.bde94d19.js";import"./invoice-form.ce6266.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 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=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(i(k),{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",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 j=v(N,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/purchase/inputInvoicePool/components/return-form.vue"]]);export{j as default};