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