import{_ as h,d as C,E as s,x as m,o as R,c as k,y as e,K as n,u as i,b as E,aE as x,W as B}from"./index.1417328f.js";import{R as N}from"./index.38882c18.js";import D from"./choose-modal.4cbbc2f7.js";import F from"./invoice-table.cd887915.js";import{c as b}from"./invoice-form.0539c193.js";import{h as g}from"./status.727086c1.js";import"./index.08fe6875.js";import"./basic-descriptions.cadaf928.js";import"./tootip.8c37fa8a.js";import"./status.0f757cb5.js";import"./_details.af0a3d2a.js";import"./_opitons.2a65e7c0.js";import"./reconciliation.53461462.js";import"./global.9ad647c8.js";const w={"w-full":""},T={class:"flex w-full justify-end"},A=B("\u4FDD\u5B58"),I=C({__name:"return-form",emits:["create"],setup(M,{emit:f}){const c=s(null),p=s(null),d=s(null),o=s({payNo:"",invArr:[]}),_=()=>p.value.onDisplay();function v(){c.value.validate(r=>r&&f("create",i(o)))}const y=r=>{r.forEach(a=>{const t=a.invoiceType;if(!t)return;const l=g.find(({scanValue:u})=>u===t);l&&(a.invoiceType=l.value)}),o.value.invArr=r};return(r,a)=>{const t=m("ElFormItem"),l=m("ElButton");return R(),k("div",w,[e(i(x),{ref_key:"formRef",ref:c,"label-width":"100px",model:o.value,rules:i(b)},{default:n(()=>[e(t,{label:"\u8BA2\u5355\u5BF9\u8D26",prop:"payNo"},{default:n(()=>[e(i(N),{ref_key:"reconciliationRef",ref:d,isPurchPay:"",id:o.value.payNo,readonly:!!o.value.payNo,onChoose:_},null,8,["id","readonly"])]),_:1}),e(t,{label:"\u53D1\u7968",prop:"invArr"},{default:n(()=>[e(F,{onChange:y})]),_:1}),e(t,null,{default:n(()=>[E("div",T,[e(l,{type:"primary",onClick:v},{default:n(()=>[A]),_:1})])]),_:1})]),_:1},8,["model","rules"]),e(D,{ref_key:"chooseModalRef",ref:p,onChoose:a[0]||(a[0]=u=>o.value.payNo=u)},null,512)])}}});var S=h(I,[["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/supply/ticketReturn/components/return-form.vue"]]);export{S as default};