import{J as M,K as j,D as q,C as O,w as z,F as J,L as Q,M as Z,N as G,O as H}from"./element-plus.4a7d92a3.js";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{_ as X}from"./index.vue_vue_type_script_setup_true_lang.77dd59e0.js";import{d as E,s as Y,r as _,Z as ee,af as oe,ap as te,o as s,c as b,U as o,L as l,u as e,T as ae,a9 as le,K as c,aa as re,R as v,M as k,a as y,j as ne,Q as se}from"./@vue.18505fe0.js";import{u as ie}from"./usePaging.6a6670f9.js";import{u as ue}from"./useDictOptions.69165381.js";import{d as me}from"./user_product_storage.e8132a56.js";import"./lodash.9dc701ad.js";import{h as pe}from"./index.3c35f968.js";import{_ as de}from"./edit.vue_vue_type_script_setup_true_name_userProductStorageEdit_lang.bc7ade33.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.8a199d83.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const _e={class:"flex mt-4 justify-end"},ce=E({name:"userProductStorageLists"}),oo=E({...ce,setup(fe){const F=Y(),C=_(!1),r=ee({uid:"",oid:"",product_id:"",create_time:"",start_time:"",end_time:""}),B=_([]),V=p=>{B.value=p.map(({id:a})=>a)},{dictData:D}=ue(""),{pager:i,getLists:f,resetParams:T,resetPage:u}=ie({fetchFun:me,params:r});f();const m=_(!1),w=_([]),x=(p="")=>{m.value=!0,pe({nickname:p,page_size:50}).then(a=>{w.value=a.lists,setTimeout(()=>{m.value=!1},300)}).catch(a=>{setTimeout(()=>{m.value=!1},300)})};return(p,a)=>{const L=M,U=j,d=q,S=O,P=X,g=z,$=J,h=Q,n=Z,K=oe("router-link"),N=G,R=W,A=te("perms"),I=H;return s(),b("div",null,[o(h,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[o($,{class:"mb-[-16px]",model:e(r),inline:""},{default:l(()=>[o(d,{label:"\u7528\u6237",prop:"uid"},{default:l(()=>[o(U,{modelValue:e(r).uid,"onUpdate:modelValue":a[0]||(a[0]=t=>e(r).uid=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u7528\u6237\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":x,loading:e(m),style:{width:"240px"},onChange:e(u)},{default:l(()=>[(s(!0),b(ae,null,le(e(w),t=>(s(),c(L,{key:t.id,label:`${t.real_name||t.nickname} (ID:${t.id})`,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),o(d,{label:"\u8BA2\u5355id",prop:"oid"},{default:l(()=>[o(S,{class:"w-[280px]",modelValue:e(r).oid,"onUpdate:modelValue":a[1]||(a[1]=t=>e(r).oid=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355id",onKeydown:re(e(u),["enter"]),onClear:e(u)},null,8,["modelValue","onKeydown","onClear"])]),_:1}),o(d,{label:"",prop:"create_time"},{default:l(()=>[o(P,{startTime:e(r).start_time,"onUpdate:startTime":a[2]||(a[2]=t=>e(r).start_time=t),endTime:e(r).end_time,"onUpdate:endTime":a[3]||(a[3]=t=>e(r).end_time=t),type:"daterange",onChange:e(u)},null,8,["startTime","endTime","onChange"])]),_:1}),o(d,null,{default:l(()=>[o(g,{type:"primary",onClick:e(u)},{default:l(()=>[v("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(g,{onClick:e(T)},{default:l(()=>[v("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),k((s(),c(h,{class:"!border-none",shadow:"never"},{default:l(()=>[y("div",null,[o(N,{data:e(i).lists,onSelectionChange:V},{default:l(()=>[o(n,{label:"\u7528\u6237",prop:"nickname","show-overflow-tooltip":""}),o(n,{label:"\u8BA2\u5355id",prop:"oid","show-overflow-tooltip":""}),o(n,{label:"\u5546\u54C1",prop:"store_name","show-overflow-tooltip":""}),o(n,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),o(n,{label:"\u72B6\u6001",prop:"status_name","show-overflow-tooltip":""}),o(n,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),o(n,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:t})=>[k((s(),c(K,{to:{path:"user_product_storage_log",query:{oid:t.oid,product_id:t.product_id}},class:"ml-4"},{default:l(()=>[o(g,{type:"primary",link:""},{default:l(()=>[v(" \u8BE6\u60C5 ")]),_:1})]),_:2},1032,["to"])),[[A,["user_product_storage.user_product_storage/edit"]]])]),_:1})]),_:1},8,["data"])]),y("div",_e,[o(R,{modelValue:e(i),"onUpdate:modelValue":a[4]||(a[4]=t=>ne(i)?i.value=t:null),onChange:e(f)},null,8,["modelValue","onChange"])])]),_:1})),[[I,e(i).loading]]),e(C)?(s(),c(de,{key:0,ref_key:"editRef",ref:F,"dict-data":e(D),onSuccess:e(f),onClose:a[5]||(a[5]=t=>C.value=!1)},null,8,["dict-data","onSuccess"])):se("",!0)])}}});export{oo as default};