import{d as w,a as C,g as s,z as f,k as r,w as l,e as t,f as F,c as g,F as B,y as S,t as y,l as v,O as T,s as U,_ as G}from"./index-CUnFTKV2.js";const K=w({__name:"GoodsSearchForm",props:{goodsTypes:{}},emits:["search","reset"],setup(b,{emit:V}){const p=V,e=C({title:"",status:void 0,type:void 0}),i=()=>{const n={};e.title&&(n.title=e.title),e.status!==void 0&&(n.status=e.status),e.type!==void 0&&(n.type=e.type),p("search",n)},h=()=>{e.title="",e.status=void 0,e.type=void 0,p("reset")};return(n,o)=>{const x=s("el-input"),u=s("el-form-item"),d=s("el-option"),m=s("el-select"),c=s("el-icon"),_=s("el-button"),k=s("el-form");return r(),f(k,{inline:!0,model:e,class:"search-form"},{default:l(()=>[t(u,{label:"盒子标题"},{default:l(()=>[t(x,{modelValue:e.title,"onUpdate:modelValue":o[0]||(o[0]=a=>e.title=a),placeholder:"请输入盒子标题",clearable:"",onKeyup:F(i,["enter"]),style:{width:"180px"}},null,8,["modelValue"])]),_:1}),t(u,{label:"状态"},{default:l(()=>[t(m,{modelValue:e.status,"onUpdate:modelValue":o[1]||(o[1]=a=>e.status=a),placeholder:"全部状态",clearable:"",style:{width:"120px"}},{default:l(()=>[t(d,{label:"上架",value:1}),t(d,{label:"下架",value:0}),t(d,{label:"售罄",value:2})]),_:1},8,["modelValue"])]),_:1}),t(u,{label:"盒子类型"},{default:l(()=>[t(m,{modelValue:e.type,"onUpdate:modelValue":o[2]||(o[2]=a=>e.type=a),placeholder:"全部类型",clearable:"",style:{width:"140px"}},{default:l(()=>[(r(!0),g(B,null,S(b.goodsTypes,a=>(r(),f(d,{key:a.value,label:a.name,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(u,null,{default:l(()=>[t(_,{type:"primary",onClick:i},{default:l(()=>[t(c,null,{default:l(()=>[t(v(T))]),_:1}),o[3]||(o[3]=y("查询 ",-1))]),_:1}),t(_,{onClick:h},{default:l(()=>[t(c,null,{default:l(()=>[t(v(U))]),_:1}),o[4]||(o[4]=y("重置 ",-1))]),_:1})]),_:1})]),_:1},8,["model"])}}}),z=G(K,[["__scopeId","data-v-af89f674"]]);export{z as default};
