import{d as e,r as a,o as l,j as t,b as s,e as o,k as n,w as i,m as r,F as u,f as d,i as c,c as f,t as p}from"./index-BmnJ93Po.js";import{g as m,p as v}from"./index.BXTZ2GXu.js";import{_}from"./_plugin-vue_export-helper.BCo6x5W8.js";const g=_(e({__name:"listSearch",setup(e){const _=a({}),g=a([]);l((()=>{m("/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 h=()=>{window.history.back()},w=a(!1),b=a([]),k=()=>{w.value=!0},y=e=>{_.value.pl=e.selectedValues[0];let a=_.value.list.find((a=>a.category==e.selectedValues[0]));var l;l=a.list,g.value=[],v("/rawFabric/preview",l).then((e=>{if(200==e.code)for(let a in e.data)g.value.push({name:a,ps:e.data[a]})})),x()},x=()=>{w.value=!1};return(e,a)=>{const l=t("van-nav-bar"),m=t("van-field"),v=t("van-cell-group"),C=c,V=t("van-picker"),j=t("van-popup");return s(),o(u,null,[n(C,{class:"flex"},{default:i((()=>[n(l,{title:"白胚库存列表","left-text":"返回","left-arrow":"",onClickLeft:h}),n(v,{inset:""},{default:i((()=>[n(m,{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}),n(C,{class:"grid-container"},{default:i((()=>[n(C,{class:"grid-item"},{default:i((()=>[r("面料名称")])),_:1}),n(C,{class:"grid-item"},{default:i((()=>[r("面料匹数")])),_:1}),n(C,{class:"grid-item"},{default:i((()=>[r("操作")])),_:1})])),_:1}),n(C,{class:"content"},{default:i((()=>[(s(!0),o(u,null,d(g.value,((e,a)=>(s(),f(C,{class:"grid-container",key:a,onClick:a=>(e=>{console.log(e)})(e)},{default:i((()=>[n(C,{class:"grid-item"},{default:i((()=>[r(p(e.name),1)])),_:2},1024),n(C,{class:"grid-item"},{default:i((()=>[r(p(e.ps),1)])),_:2},1024),n(C,{class:"grid-item"},{default:i((()=>[r("查看")])),_:1})])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1}),n(j,{show:w.value,"onUpdate:show":a[1]||(a[1]=e=>w.value=e),round:"",position:"bottom"},{default:i((()=>[n(V,{"show-toolbar":"",columns:b.value,onConfirm:y,onCancel:x,ref:"pickerRef"},null,8,["columns"])])),_:1},8,["show"])],64)}}}),[["__scopeId","data-v-5d61d7a9"]]);export{g as default};
