import{_ as C,d as R,n as s,r as m,o as k,c as B,h as e,y as a,i,e as D,H as N,cd as w,eD as x}from"./index.js";import{R as E}from"./index.6004c99e.js";import F from"./choose-modal.7af5b9.js";import T from"./invoice-table.eca48e.js";import{c as g}from"./invoice-form.72bb24.js";import"./orderRecord.92bbc10f.js";import"./porder.827c74bc.js";import"./_details.fe0966e2.js";import"./global.9ad647c8.js";const b={"w-full":""},I={class:"flex w-full justify-end"},A=R({__name:"return-form",emits:["create"],setup(M,{emit:p}){const d=p,c=s(null),f=s(null),_=s(null),t=s({payNo:"",invArr:[]}),v=()=>f.value.onDisplay();function y(){c.value.validate(n=>n&&d("create",i(t)))}const h=n=>{n.forEach(o=>{const r=o.invoiceType;if(!r)return;const l=x.find(({scanValue:u})=>u===r);l&&(o.invoiceType=l.value)}),t.value.invArr=n};return(n,o)=>{const r=m("ElFormItem"),l=m("ElButton");return k(),B("div",b,[e(i(w),{ref_key:"formRef",ref:c,"label-width":"100px",model:t.value,rules:i(g)},{default:a(()=>[e(r,{label:"\u8BA2\u5355\u5BF9\u8D26",prop:"payNo"},{default:a(()=>[e(i(E),{ref_key:"reconciliationRef",ref:_,showTicketColumn:!0,"is-purch-pay":!0,id:t.value.payNo,readonly:!!t.value.payNo,onChoose:v},null,8,["id","readonly"])]),_:1}),e(r,{label:"\u53D1\u7968",prop:"invArr"},{default:a(()=>[e(T,{onChange:h})]),_:1}),e(r,null,{default:a(()=>[D("div",I,[e(l,{type:"primary",onClick:y},{default:a(()=>o[1]||(o[1]=[N("\u4FDD\u5B58")])),_:1})])]),_:1})]),_:1},8,["model","rules"]),e(F,{ref_key:"chooseModalRef",ref:f,onChoose:o[0]||(o[0]=u=>t.value.payNo=u)},null,512)])}}});var L=C(A,[["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/supplierTicketReturn/components/return-form.vue"]]);export{L as default};
