import{d as S,a as w,r as D,g as s,z as C,k as b,w as o,e as l,f as i,c as U,F,y as K,t as v,l as V,O as Y,s as B,_ as R}from"./index-CUnFTKV2.js";import{S as m}from"./order-BSmesayL.js";const M=S({__name:"ShippingSearchForm",emits:["search","reset"],setup(O,{emit:h}){const c=h,e=w({userId:"",mobile:"",sendNum:"",status:void 0}),u=D(null),y=[{value:m.Pending,label:"待发货"},{value:m.Shipped,label:"已发货"},{value:m.Received,label:"已签收"},{value:m.Cancelled,label:"已取消"}],r=()=>{const n={};e.userId&&(n.userId=parseInt(e.userId)),e.mobile&&(n.mobile=e.mobile),e.sendNum&&(n.sendNum=e.sendNum),e.status!==void 0&&(n.status=e.status),u.value&&u.value.length===2&&(n.startDate=u.value[0],n.endDate=u.value[1]),c("search",n)},I=()=>{e.userId="",e.mobile="",e.sendNum="",e.status=void 0,u.value=null,c("reset")};return(n,t)=>{const p=s("el-input"),d=s("el-form-item"),g=s("el-option"),x=s("el-select"),k=s("el-date-picker"),_=s("el-icon"),f=s("el-button"),N=s("el-form");return b(),C(N,{inline:!0,model:e,class:"search-form"},{default:o(()=>[l(d,{label:"用户ID"},{default:o(()=>[l(p,{modelValue:e.userId,"onUpdate:modelValue":t[0]||(t[0]=a=>e.userId=a),placeholder:"用户ID/UID",clearable:"",onKeyup:i(r,["enter"]),style:{width:"120px"}},null,8,["modelValue"])]),_:1}),l(d,{label:"手机号"},{default:o(()=>[l(p,{modelValue:e.mobile,"onUpdate:modelValue":t[1]||(t[1]=a=>e.mobile=a),placeholder:"手机号",clearable:"",onKeyup:i(r,["enter"]),style:{width:"140px"}},null,8,["modelValue"])]),_:1}),l(d,{label:"发货单号"},{default:o(()=>[l(p,{modelValue:e.sendNum,"onUpdate:modelValue":t[2]||(t[2]=a=>e.sendNum=a),placeholder:"发货单号",clearable:"",onKeyup:i(r,["enter"]),style:{width:"180px"}},null,8,["modelValue"])]),_:1}),l(d,{label:"状态"},{default:o(()=>[l(x,{modelValue:e.status,"onUpdate:modelValue":t[3]||(t[3]=a=>e.status=a),placeholder:"全部状态",clearable:"",style:{width:"120px"}},{default:o(()=>[(b(),U(F,null,K(y,a=>l(g,{key:a.value,label:a.label,value:a.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),l(d,{label:"申请时间"},{default:o(()=>[l(k,{modelValue:u.value,"onUpdate:modelValue":t[4]||(t[4]=a=>u.value=a),type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY-MM-DD",style:{width:"240px"}},null,8,["modelValue"])]),_:1}),l(d,null,{default:o(()=>[l(f,{type:"primary",onClick:r},{default:o(()=>[l(_,null,{default:o(()=>[l(V(Y))]),_:1}),t[5]||(t[5]=v("查询 ",-1))]),_:1}),l(f,{onClick:I},{default:o(()=>[l(_,null,{default:o(()=>[l(V(B))]),_:1}),t[6]||(t[6]=v("重置 ",-1))]),_:1})]),_:1})]),_:1},8,["model"])}}}),L=R(M,[["__scopeId","data-v-2a2261fe"]]);export{L as default};
