import{d as e,r as a,o as l,j as t,b as s,e as o,k as r,w as i,m as n,F as u,f as c,i as d,c as f,t as m,n as p}from"./index-z4UiUMlV.js";import{g as v,p as g}from"./index.Wwo-uIrA.js";import{_}from"./_plugin-vue_export-helper.BCo6x5W8.js";const h=_(e({__name:"listSearch",setup(e){const _=a({}),h=a([]);l((()=>{v("/fabric/info/all").then((e=>{if(200===e.code){let a=new Set,l=[];e.data.forEach((e=>{a.add(e.category);let t=l.find((a=>a.category===e.category));t?t.list.push(e.name):l.push({category:e.category,list:[e.name]})})),_.value.list=l,b.value=[...a].map((e=>({text:e,value:e})))}}))}));const w=()=>{window.history.back()},y=a(!1),b=a([]),k=()=>{y.value=!0},x=e=>{_.value.pl=e.selectedValues[0];let a=_.value.list.find((a=>a.category==e.selectedValues[0]));var l;l=a.list,h.value=[],g("/rawFabric/preview",l).then((e=>{200==e.code&&(h.value=e.data)})),C()},C=()=>{y.value=!1};return(e,a)=>{const l=t("van-nav-bar"),v=t("van-field"),g=t("van-cell-group"),V=d,j=t("van-picker"),E=t("van-popup");return s(),o(u,null,[r(V,{class:"flex"},{default:i((()=>[r(l,{title:"白胚库存列表","left-text":"返回","left-arrow":"",onClickLeft:w}),r(g,{inset:""},{default:i((()=>[r(v,{modelValue:_.value.pl,"onUpdate:modelValue":a[0]||(a[0]=e=>_.value.pl=e),name:"品类",label:"品类",colon:"",class:"bor","label-width":"3em",readonly:"",onClick:k},null,8,["modelValue"])])),_:1}),r(V,{class:"grid-container"},{default:i((()=>[r(V,{class:"grid-item"},{default:i((()=>[n("面料名称")])),_:1}),r(V,{class:"grid-item"},{default:i((()=>[n("面料匹数")])),_:1}),r(V,{class:"grid-item"},{default:i((()=>[n("面料米数")])),_:1}),r(V,{class:"grid-item"},{default:i((()=>[n("操作")])),_:1})])),_:1}),r(V,{class:"content"},{default:i((()=>[(s(!0),o(u,null,c(h.value,((e,a)=>(s(),f(V,{class:"grid-container",key:a},{default:i((()=>[r(V,{class:"grid-item"},{default:i((()=>[n(m(e.category),1)])),_:2},1024),r(V,{class:"grid-item"},{default:i((()=>[n(m(e.count),1)])),_:2},1024),r(V,{class:"grid-item"},{default:i((()=>[n(m(e.len),1)])),_:2},1024),r(V,{class:"grid-item",onClick:a=>(e=>{p({url:"/pages/whiteEmbryo/warehouse-in-out?category="+e.category})})(e)},{default:i((()=>[n("查看")])),_:2},1032,["onClick"])])),_:2},1024)))),128))])),_:1})])),_:1}),r(E,{show:y.value,"onUpdate:show":a[1]||(a[1]=e=>y.value=e),round:"",position:"bottom"},{default:i((()=>[r(j,{"show-toolbar":"",columns:b.value,onConfirm:x,onCancel:C,ref:"pickerRef"},null,8,["columns"])])),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-9fd108ba"]]);export{h as default};
