import{am as p,db as C,aR as c,bb as d,bO as F,ae as B,_ as y,d as w,x as N,aV as x,r as i,o as m,G as f,D as r,m as s,l as k,M as V,a as A,ar as S,bd as M,aZ as v}from"./index.js";import{e as L}from"./index.8d1ab27f.js";const R=[{type:"selection",width:40,align:"center",fixed:"left"},{label:"\u53D1\u7968\u7F16\u7801",prop:"InvCode",width:140},{label:"\u7A0E\u524D\u91D1\u989D",prop:"invoice_total",width:100},{label:"\u7A0E\u540E\u91D1\u989D",prop:"invoice_subtotal",width:100},{label:"\u72B6\u6001",prop:"status",width:120,cellRenderer:({row:e,props:u})=>p(c,{size:u.size},{default:()=>{var o;return(o=C.find(t=>String(e.status)===String(t.value)))==null?void 0:o.label}})},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",width:145,...d("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",width:145,...d("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u53D1\u7968\u7C7B\u578B",width:185,cellRenderer({row:e}){return p(c,null,{default:()=>{var u;return((u=F.find(({value:o})=>o===e.invoice_type))==null?void 0:u.label)||"--"}})}},{label:"\u53D1\u7968\u53F7\u7801",width:110,prop:"invoice_number"},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:150,formatter:({addtime:e})=>B(e).format("YYYY-MM-DD HH:mm:ss")}],I={title:"\u91C7\u8D2D\u56DE\u7968",statusProp:"supplierNo",columns:R,apis:{httpList:({companyNo:e,...u}={})=>L({supplierNo:e,...u,status:"2"})}},b={formItems:[]},P=w({__name:"index",props:{visible:{type:Boolean,required:!0}},emits:["submit"],setup(e,{emit:u}){const o=e,t=N([]),a=x(o,"visible"),h={pageSearchHook:()=>M(void 0,void 0,b)};async function g(){if(t.value.length===0){v.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u6570\u636E");return}if(t.value.length>1){v.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E");return}a.value=!1,u("submit",t.value[0])}return(Y,n)=>{const D=i("ElButton"),E=i("PageContainer"),_=i("ElDialog");return m(),f(_,{"close-on-click-modal":!1,"close-on-press-escape":!1,title:"\u9009\u62E9\u8FDB\u9879\u53D1\u7968",modelValue:s(a),"onUpdate:modelValue":n[1]||(n[1]=l=>S(a)?a.value=l:null),top:"10px",center:""},{default:r(()=>[s(a)?(m(),f(E,{key:0,hooks:h,notice:!1,"search-config":s(b),"content-config":s(I),onContentSelectChange:n[0]||(n[0]=l=>t.value=l)},{search_action:r(()=>[k(D,{type:"primary",onClick:g},{default:r(()=>[V(" \u4FDD\u5B58 ")]),_:1})]),_:1},8,["search-config","content-config"])):A("v-if",!0)]),_:1},8,["modelValue"])}}});var j=y(P,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supply/invoiceRelation/components/choose-invoice-modal/index.vue"]]);export{j as default};
