import{k as y,C as x,D as L,w as I,F as P,G as S,H as A,I as N}from"./element-plus.8e273e86.js";import{_ as T}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{u as U}from"./usePaging.f8c888e4.js";import{u as W}from"./useDictOptions.0f4dac76.js";import{a as j}from"./warehouse.d5d15cd6.js";import"./lodash.41b9567d.js";import"./index.2078eb25.js";import{d as E,Z as M,r as R,o as _,c as f,U as e,L as l,u as t,R as m,M as q,a as G,j as H}from"./@vue.76ce7aa3.js";const Z={class:"mt-4"},$={class:"flex mt-4 justify-end"},z=E({name:"systemStoreLists"}),le=E({...z,emits:["onBindWarehouse"],setup(J,{emit:g}){const u=M({name:""}),p=R([]),w=n=>{p.value=n.map(({id:o})=>o)};W("");const{pager:a,getLists:d,resetParams:C,resetPage:v}=U({fetchFun:j,params:u});d();const D=g,b=()=>{const n=a.lists.filter(o=>p.value.includes(o.id));if(!n.length)return y.error("\u8BF7\u5148\u9009\u62E9\u4ED3\u5E93");D("onBindWarehouse",n[0])};return(n,o)=>{const h=x,c=L,i=I,B=P,s=S,F=A,V=T,k=N;return _(),f("div",null,[e(B,{class:"mb-[-16px]",model:t(u),inline:""},{default:l(()=>[e(c,{label:"\u4ED3\u5E93\u540D\u79F0",prop:"name"},{default:l(()=>[e(h,{class:"w-[200px]",modelValue:t(u).name,"onUpdate:modelValue":o[0]||(o[0]=r=>t(u).name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(c,null,{default:l(()=>[e(i,{type:"primary",onClick:t(v)},{default:l(()=>o[2]||(o[2]=[m("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(i,{onClick:t(C)},{default:l(()=>o[3]||(o[3]=[m("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),q((_(),f("div",Z,[e(F,{data:t(a).lists,onSelectionChange:w,height:300},{default:l(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(s,{label:"\u4ED3\u5E93\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(s,{label:"\u8054\u7CFB\u4EBA\u5458",prop:"contacts","show-overflow-tooltip":""}),e(s,{label:"\u624B\u673A\u53F7\u7801",prop:"tel","show-overflow-tooltip":""}),e(s,{label:"\u8BE6\u7EC6\u5730\u5740",prop:"address","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[k,t(a).loading]]),G("div",$,[e(V,{modelValue:t(a),"onUpdate:modelValue":o[1]||(o[1]=r=>H(a)?a.value=r:null),onChange:t(d)},null,8,["modelValue","onChange"])]),e(i,{class:"w-full mt-4",type:"primary",onClick:b},{default:l(()=>o[4]||(o[4]=[m("\u6DFB\u52A0\u4ED3\u5E93")])),_:1})])}}});export{le as _};
