import{_ as v,d as C,x as s,r as f,o as N,c as D,l as e,D as n,a as k,h as R,M as x,m as c,aQ as B,df as w}from"./index.js";import E from"./index.f6be26.js";import F from"./choose-modal.e73e5e.js";import T from"./invoice-table.0d7489.js";import{c as g}from"./invoice-form.d4b616.js";import"./orderRecord.bd0f73d4.js";import"./index.a7de6b05.js";import"./_details.7e8f00e4.js";import"./date-range.019e953f.js";import"./global.9ad647c8.js";const b={"w-full":""},I={class:"flex w-full justify-end"},M=C({__name:"return-form",emits:["create"],setup(V,{emit:m}){const u=s(null),p=s(null),d=s(null),o=s({payNo:"",invArr:[]}),_=()=>p.value.onDisplay();function h(){u.value.validate(t=>t&&m("create",c(o)))}const y=t=>{t.forEach(a=>{const r=a.invoiceType;if(!r)return;const l=w.find(({scanValue:i})=>i===r);l&&(a.invoiceType=l.value)}),o.value.invArr=t};return(t,a)=>{const r=f("ElFormItem"),l=f("ElButton");return N(),D("div",b,[e(c(B),{ref_key:"formRef",ref:u,"label-width":"100px",model:o.value,rules:c(g)},{default:n(()=>[e(r,{label:"\u8BA2\u5355\u5BF9\u8D26",prop:"payNo"},{default:n(()=>[k(` <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(E,{ref_key:"reconciliationRef",ref:d,showTicketColumn:!0,"is-purch-pay":!0,payNo:o.value.payNo,readonly:!!o.value.payNo,onChoose:_,choose:"",request:""},null,8,["payNo","readonly"])]),_:1}),e(r,{label:"\u53D1\u7968",prop:"invArr"},{default:n(()=>[e(T,{onChange:y})]),_:1}),e(r,null,{default:n(()=>[R("div",I,[e(l,{type:"primary",onClick:h},{default:n(()=>[x("\u4FDD\u5B58")]),_:1})])]),_:1})]),_:1},8,["model","rules"]),e(F,{ref_key:"chooseModalRef",ref:p,onChoose:a[0]||(a[0]=i=>o.value.payNo=i)},null,512)])}}});var K=v(M,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supplierOrder/sendOrderInvoice/components/return-form.vue"]]);export{K as default};
