import{_ as k,d as b,ci as x,di as w,cm as q,n as f,r as c,o as I,A as M,y as a,h as l,i as n,cd as R,d5 as T,eg as U,e as j,H as Q,ak as S}from"./index.js";import{h as H}from"./index.5741d39c.js";const P={class:"w-full flex justify-end"},z=b({__name:"choose-modal",props:{visible:{type:Boolean,required:!0},data:{type:null,required:!0}},emits:["refresh"],setup(v,{emit:_}){const d=v,y=_,t=x(d,"visible"),N=w({success(){q.success("\u7ED1\u5B9A\u6210\u529F!"),t.value=!1,y("refresh")}}),o=f({companyNo:"",supplierNo:""}),m=f(null),B={companyNo:[{required:!0,message:"\u4E70\u5165\u65B9\u516C\u53F8\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],supplierNo:[{required:!0,message:"\u5356\u51FA\u65B9\u516C\u53F8\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}]};async function E(){var r;try{await((r=m.value)==null?void 0:r.validate());const{id:e,InvCode:s,invoice_code:i,invoice_type:p,invoice_total:u,invoice_number:C,invoice_subtotal:V,check_code:g,open_date:A,status:D}=d.data,h={id:e,InvCode:s,invoice_code:i,invoice_number:C,invoice_type:p,invoice_total:u,open_date:A,invoice_subtotal:V,check_code:g,status:D,companyNo:o.value.companyNo,supplierNo:o.value.supplierNo};N.run(H(h))}catch{}}const F=()=>o.value={companyNo:"",supplierNo:""};return(r,e)=>{const s=c("ElFormItem"),i=c("ElButton"),p=c("ElDialog");return I(),M(p,{modelValue:n(t),"onUpdate:modelValue":e[2]||(e[2]=u=>S(t)?t.value=u:null),center:"",title:"\u7ED1\u5B9A\u516C\u53F8",onClose:F,"close-on-click-modal":!1,"close-on-press-escape":!1},{default:a(()=>[l(n(R),{rules:B,ref_key:"formRef",ref:m,model:o.value},{default:a(()=>[l(s,{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyNo"},{default:a(()=>[l(n(T),{modelValue:o.value.companyNo,"onUpdate:modelValue":e[0]||(e[0]=u=>o.value.companyNo=u),placeholder:"\u4E70\u5165\u65B9\u516C\u53F8"},null,8,["modelValue"])]),_:1}),l(s,{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierNo"},{default:a(()=>[l(n(U),{modelValue:o.value.supplierNo,"onUpdate:modelValue":e[1]||(e[1]=u=>o.value.supplierNo=u),placeholder:"\u5356\u51FA\u65B9\u516C\u53F8"},null,8,["modelValue"])]),_:1}),l(s,null,{default:a(()=>[j("div",P,[l(i,{type:"primary",onClick:E},{default:a(()=>e[3]||(e[3]=[Q("\u4FDD\u5B58")])),_:1})])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}});var K=k(z,[["__file","D:/work/jiesuan/settle-vue3/src/views/supply/outputInvoicePool/choose-modal.vue"]]);export{K as default};
