import{T as q,J as z,K as J,D as Q,w as Z,F as G,L as H,M as W,b as X,N as Y,O as ee}from"./element-plus.78e68aed.js";import{_ as te}from"./index.vue_vue_type_script_setup_true_lang.3c4454b7.js";import{u as oe}from"./usePaging.6a6670f9.js";import{u as ae}from"./useDictOptions.e2d02908.js";import{d as se}from"./system_store_storage.affa6706.js";import{a as le}from"./system_store.8210a48c.js";import"./lodash.60201f64.js";import"./index.f985d63e.js";import{_ as ue}from"./edit.vue_vue_type_script_setup_true_name_systemStoreStorageEdit_lang.eb91c9d5.js";import{d as L,s as ne,r as c,Z as re,ap as ie,o as l,c as b,U as t,L as o,u as a,T as B,a9 as x,K as n,R as m,M as V,a as S,Q as k,j as me,n as pe}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.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.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.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.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.824d4b7a.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const de={class:"mt-4"},_e={class:"flex mt-4 justify-end"},ce=L({name:"systemStoreStorageLists"}),ot=L({...ce,setup(fe){const f=ne(),E=c(!1),r=re({store_id:"",admin_name:"",staff_name:"",status:""}),T=c([]),A=i=>{T.value=i.map(({id:s})=>s)},{dictData:N}=ae(""),{pager:p,getLists:g,resetParams:R,resetPage:v}=oe({fetchFun:se,params:r}),P=async i=>{var s,d;E.value=!0,await pe(),(s=f.value)==null||s.open("edit"),(d=f.value)==null||d.setFormData(i)};g();const _=c(!1),F=c([]),U=(i="")=>{_.value=!0,le({name:i,page_size:50}).then(s=>{F.value=s.lists,setTimeout(()=>{_.value=!1},300)}).catch(s=>{setTimeout(()=>{_.value=!1},300)})};return(i,s)=>{const d=z,w=J,C=Q,h=Z,$=G,D=H,u=W,M=X,y=q,j=Y,I=te,K=ie("perms"),O=ee;return l(),b("div",null,[t(D,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[t($,{class:"mb-[-16px]",model:a(r),inline:""},{default:o(()=>[t(C,{label:"\u95E8\u5E97",prop:"store_id"},{default:o(()=>[t(w,{modelValue:a(r).store_id,"onUpdate:modelValue":s[0]||(s[0]=e=>a(r).store_id=e),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":U,loading:a(_),style:{width:"240px"},onChange:a(v)},{default:o(()=>[(l(!0),b(B,null,x(a(F),e=>(l(),n(d,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),t(C,{label:"\u72B6\u6001",prop:"status"},{default:o(()=>[t(w,{modelValue:a(r).status,"onUpdate:modelValue":s[1]||(s[1]=e=>a(r).status=e),placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22",style:{width:"240px"},onChange:a(v)},{default:o(()=>[(l(),b(B,null,x([{id:1,name:"\u5DF2\u5165\u5E93"},{id:0,name:"\u5F85\u786E\u8BA4"},{id:-1,name:"\u5E93\u5B58\u4E0D\u8DB3"}],e=>t(d,{key:e.id,label:e.name,value:e.id},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"])]),_:1}),t(C,null,{default:o(()=>[t(h,{type:"primary",onClick:a(v)},{default:o(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),t(h,{onClick:a(R)},{default:o(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),V((l(),n(D,{class:"!border-none",shadow:"never"},{default:o(()=>[S("div",de,[t(j,{data:a(p).lists,onSelectionChange:A},{default:o(()=>[t(u,{label:"\u95E8\u5E97",prop:"system_store_name"}),t(u,{label:"\u5BFC\u5165\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),t(u,{label:"\u95E8\u5E97\u786E\u8BA4\u4EBA\u5458",prop:"staff_name","show-overflow-tooltip":""}),t(u,{label:"\u5546\u54C1\u56FE",prop:"image","show-overflow-tooltip":""},{default:o(({row:e})=>[t(M,{class:"w-[40px] h-[40px]",src:e.image},null,8,["src"])]),_:1}),t(u,{label:"\u5546\u54C1",prop:"store_name"}),t(u,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),t(u,{label:"\u72B6\u6001",prop:"status"},{default:o(({row:e})=>[e.status===1?(l(),n(y,{key:0,type:"success"},{default:o(()=>[m("\u5DF2\u5165\u5E93")]),_:1})):e.status===0?(l(),n(y,{key:1,type:"warning"},{default:o(()=>[m("\u5F85\u786E\u8BA4")]),_:1})):e.status===-1?(l(),n(y,{key:2,type:"danger"},{default:o(()=>[m("\u5E93\u5B58\u4E0D\u8DB3")]),_:1})):k("",!0)]),_:1}),t(u,{label:"\u5907\u6CE8",prop:"mark"}),t(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:e})=>[e.status!==1?V((l(),n(h,{key:0,type:"primary",link:"",onClick:Ee=>P(e)},{default:o(()=>[m(" \u7F16\u8F91\u5E93\u5B58 ")]),_:2},1032,["onClick"])),[[K,["system_store_storage.system_store_storage/edit"]]]):k("",!0)]),_:1})]),_:1},8,["data"])]),S("div",_e,[t(I,{modelValue:a(p),"onUpdate:modelValue":s[2]||(s[2]=e=>me(p)?p.value=e:null),onChange:a(g)},null,8,["modelValue","onChange"])])]),_:1})),[[O,a(p).loading]]),a(E)?(l(),n(ue,{key:0,ref_key:"editRef",ref:f,"dict-data":a(N),onSuccess:a(g),onClose:s[3]||(s[3]=e=>E.value=!1)},null,8,["dict-data","onSuccess"])):k("",!0)])}}});export{ot as default};