import{d as y,a as N,r as x,g as d,z as k,k as w,w as t,e as o,f as p,t as f,l as b,O as D,s as U,_ as g}from"./index-CUnFTKV2.js";const C=y({__name:"OrderSearchForm",emits:["search","reset"],setup(K,{emit:V}){const i=V,e=N({userId:"",mobile:"",orderNum:""}),a=x(null),u=()=>{const r={};if(e.userId){const l=parseInt(e.userId);isNaN(l)||(r.userId=l)}e.mobile&&(r.mobile=e.mobile),e.orderNum&&(r.orderNum=e.orderNum),a.value&&a.value.length===2&&(r.startDate=a.value[0],r.endDate=a.value[1]),i("search",r)},I=()=>{e.userId="",e.mobile="",e.orderNum="",a.value=null,i("reset")};return(r,l)=>{const m=d("el-input"),s=d("el-form-item"),h=d("el-date-picker"),_=d("el-icon"),c=d("el-button"),v=d("el-form");return w(),k(v,{inline:!0,model:e,class:"search-form"},{default:t(()=>[o(s,{label:"用户ID"},{default:t(()=>[o(m,{modelValue:e.userId,"onUpdate:modelValue":l[0]||(l[0]=n=>e.userId=n),placeholder:"用户ID/UID",clearable:"",onKeyup:p(u,["enter"]),style:{width:"120px"}},null,8,["modelValue"])]),_:1}),o(s,{label:"手机号"},{default:t(()=>[o(m,{modelValue:e.mobile,"onUpdate:modelValue":l[1]||(l[1]=n=>e.mobile=n),placeholder:"手机号",clearable:"",onKeyup:p(u,["enter"]),style:{width:"140px"}},null,8,["modelValue"])]),_:1}),o(s,{label:"订单号"},{default:t(()=>[o(m,{modelValue:e.orderNum,"onUpdate:modelValue":l[2]||(l[2]=n=>e.orderNum=n),placeholder:"订单号",clearable:"",onKeyup:p(u,["enter"]),style:{width:"180px"}},null,8,["modelValue"])]),_:1}),o(s,{label:"下单时间"},{default:t(()=>[o(h,{modelValue:a.value,"onUpdate:modelValue":l[3]||(l[3]=n=>a.value=n),type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY-MM-DD",style:{width:"240px"}},null,8,["modelValue"])]),_:1}),o(s,null,{default:t(()=>[o(c,{type:"primary",onClick:u},{default:t(()=>[o(_,null,{default:t(()=>[o(b(D))]),_:1}),l[4]||(l[4]=f("查询 ",-1))]),_:1}),o(c,{onClick:I},{default:t(()=>[o(_,null,{default:t(()=>[o(b(U))]),_:1}),l[5]||(l[5]=f("重置 ",-1))]),_:1})]),_:1})]),_:1},8,["model"])}}}),F=g(C,[["__scopeId","data-v-58650ad0"]]);export{F as default};
