import{d as a,I as e,a5 as o,r as l,ad as t,o as s,m as n,g as r,a as i,F as u,b as c,i as d,L as m,u as p,w as v,C as f,D as C,T as b,W as g,z as y,Y as h,_ as w}from"./index-CY26MUkV.js";import{g as _}from"./table-config.Bhn2IzT2.js";const k=w(a({__name:"inventoryQuery",props:{rowColorShow:{type:Boolean,default:!1},focus:{type:Boolean,default:!0}},setup(a){const{l:w}=e(),{topContainerColor:k,fontSize:S,itemColor:N,itemEvenColor:x}=o(),I=l({barCode:""}),L=l([]),z=t(()=>L.value),D=l([]),P=l();s(()=>{$()});const $=async()=>{const a=await _("warehouse-location-search");a&&(L.value=a.listViewColumns||[])},j=async()=>{if(!I.value.barCode.trim())return void b.info(w("PleaseInputorScan"));let a={lotNo:I.value.barCode.trim()};g(w("NowIsLoading"));let e=await y("/api/services/app/PDA/LotForSearch",a).catch(a=>{});h(),e&&e.success&&(e.result&&e.result.length?D.value=e.result||[]:b.error(w("ResultIsEmpty")))};return(a,e)=>{const o=n("m-page-item"),l=d,t=n("m-blank"),s=n("m-card"),b=n("m-virtual-scroll"),g=n("m-toast-app"),y=n("m-loading-round-app");return i(),r(u,null,[c(l,{class:"page-container",style:m({fontSize:p(S)+"px"})},{default:v(()=>[c(l,{class:"serach-container",style:m({backgroundColor:p(k)})},{default:v(()=>[c(o,{value:I.value.barCode,"onUpdate:value":e[0]||(e[0]=a=>I.value.barCode=a),title:a.$t("LotNO"),iconName:"yo-icon-kuqukuwei",iconSize:"32",focus:a.focus,class:"last-input",onConfirm:j,placeholder:a.$t("PleaseInputorScan"),onScan:e[1]||(e[1]=a=>((a,e=1)=>{1===e&&(I.value.barCode=a,j())})(a,1))},null,8,["value","title","focus","placeholder"])]),_:1},8,["style"]),c(l,{class:"body-container mt-10"},{default:v(()=>[f(c(t,{class:"page-blank"},null,512),[[C,!D.value.length]]),f(c(b,{ref_key:"scrollDom",ref:P,list:D.value,class:"list-container",height:500},{default:v(({item:e,index:o})=>[c(s,{columns:z.value,item:e,index:o,backgroundColor:o%2&&a.rowColorShow?p(x):p(N),title:a.$t("LocationName"),keyName:"locationName"},null,8,["columns","item","index","backgroundColor","title"])]),_:1},8,["list"]),[[C,D.value.length]])]),_:1})]),_:1},8,["style"]),c(g),c(y)],64)}}}),[["__scopeId","data-v-b2a4131c"]]);export{k as i};
