import{_ as v,d,O as h,cc as C,n,w as N,ax as _,o as w,c as I,h as m,i as R}from"./index.js";import{R as T}from"./index.6004c99e.js";import k from"./choose-modal.e0bf83.js";import"./orderRecord.92bbc10f.js";import"./porder.827c74bc.js";const g={"w-full":""},B=d({__name:"choose-form",props:{platformType:{type:String,required:!0}},emits:["create","openInv","getBuyer"],setup(D,{expose:u,emit:c}){const r=c,{currentCompany:s}=h(),p=C(""),l=n(null),i=n(null),a=n({payNo:""}),f=()=>{var e;return(e=l.value)==null?void 0:e.onDisplay()},y=e=>r("getBuyer",e);return N(()=>s.value,async()=>{var t;const{data:e}=await _({name:(t=s.value)==null?void 0:t.companyName}),o=e.list[0]||{};p.value=o.code||""},{immediate:!0}),u({getOpenInvInfo:()=>{var e;return((e=i.value)==null?void 0:e.getOpenInvInfo())||{}}}),(e,o)=>(w(),I("div",g,[m(R(T),{ref_key:"reconciliationRef",ref:i,showTicketColumn:!0,cover:!0,isPurchPay:"",edit:!0,platformType:e.platformType,id:a.value.payNo,readonly:!!a.value.payNo,onGetRecord:y,onChoose:f,onClear:o[0]||(o[0]=t=>a.value.payNo=""),onOpenInv:o[1]||(o[1]=t=>r("openInv",t))},null,8,["platformType","id","readonly"]),m(k,{ref_key:"chooseModalRef",ref:l,supplierNo:p.value,platformType:e.platformType,onChoose:o[2]||(o[2]=t=>a.value.payNo=t)},null,8,["supplierNo","platformType"])]))}});var P=v(B,[["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/invoiceApply/components/form-copy/chooseForm/choose-form.vue"]]);export{P as default};
