import{a4 as G,H,$ as J,J as Q,K as Z,D as W,w as X,F as Y,L as ee,M as te,b as oe,N as ae,O as le}from"./element-plus.91c68cc0.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{u as ue}from"./usePaging.f8c888e4.js";import{u as ne}from"./useDictOptions.bbcac283.js";import{b as re,d as ie}from"./system_store_storage.bfc9a502.js";import{a as me}from"./system_store.7c50d15d.js";import"./lodash.4e6d2a38.js";import{f as pe}from"./index.892cd835.js";import{_ as de}from"./edit.vue_vue_type_script_setup_true_name_systemStoreStorageEdit_lang.ed70250c.js";import{d as L,s as _e,r as c,Z as fe,ap as ce,o as s,c as C,U as o,L as a,u as l,T as V,a9 as S,K as i,R as r,M as h,a as x,Q as b,j as Ee}from"./@vue.76ce7aa3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.659d5af3.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./index.c6e6b480.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const ge={class:"mt-4"},ve={class:"flex mt-4 justify-end"},Ce=L({name:"systemStoreStorageLists"}),mt=L({...Ce,setup(be){const A=_e(),y=c(!1),n=fe({store_id:"",admin_name:"",staff_name:"",status:"",type:1}),R=c([]),T=m=>{R.value=m.map(({id:e})=>e)},{dictData:N}=ne(""),{pager:p,getLists:d,resetParams:U,resetPage:_}=ue({fetchFun:ie,params:n}),$=async m=>{await pe.confirm("\u786E\u5B9A\u8981\u5165\u5E93\u5417\uFF1F"),re({id:m.id}).then(e=>{d()})};d();const f=c(!1),B=c([]),P=(m="")=>{f.value=!0,me({name:m,page_size:50}).then(e=>{B.value=e.lists,setTimeout(()=>{f.value=!1},300)}).catch(e=>{setTimeout(()=>{f.value=!1},300)})};return(m,e)=>{const k=Q,F=Z,E=W,g=X,M=Y,w=ee,D=G,j=H,u=te,I=oe,v=J,K=ae,O=se,q=ce("perms"),z=le;return s(),C("div",null,[o(w,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[o(M,{class:"mb-[-16px]",model:l(n),inline:""},{default:a(()=>[o(E,{label:"\u95E8\u5E97",prop:"store_id"},{default:a(()=>[o(F,{modelValue:l(n).store_id,"onUpdate:modelValue":e[0]||(e[0]=t=>l(n).store_id=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":P,loading:l(f),style:{width:"240px"},onChange:l(_)},{default:a(()=>[(s(!0),C(V,null,S(l(B),t=>(s(),i(k,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),o(E,{label:"\u72B6\u6001",prop:"status"},{default:a(()=>[o(F,{modelValue:l(n).status,"onUpdate:modelValue":e[1]||(e[1]=t=>l(n).status=t),placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22",style:{width:"240px"},onChange:l(_)},{default:a(()=>[(s(),C(V,null,S([{id:1,name:"\u5DF2\u5165\u5E93"},{id:0,name:"\u5F85\u786E\u8BA4"},{id:-1,name:"\u5E93\u5B58\u4E0D\u8DB3"}],t=>o(k,{key:t.id,label:t.name,value:t.id},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"])]),_:1}),o(E,null,{default:a(()=>[o(g,{type:"primary",onClick:l(_)},{default:a(()=>e[5]||(e[5]=[r("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(g,{onClick:l(U)},{default:a(()=>e[6]||(e[6]=[r("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),h((s(),i(w,{class:"!border-none",shadow:"never"},{default:a(()=>[o(j,{modelValue:l(n).type,"onUpdate:modelValue":e[2]||(e[2]=t=>l(n).type=t),onChange:l(_)},{default:a(()=>[o(D,{label:1,value:1},{default:a(()=>e[7]||(e[7]=[r("\u552E\u5356\u5E93\u5B58")])),_:1}),o(D,{label:2,value:2},{default:a(()=>e[8]||(e[8]=[r("\u5151\u6362\u5E93\u5B58")])),_:1})]),_:1},8,["modelValue","onChange"]),x("div",ge,[o(K,{data:l(p).lists,onSelectionChange:T},{default:a(()=>[o(u,{label:"\u95E8\u5E97",prop:"system_store_name"}),o(u,{label:"\u5BFC\u5165\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),o(u,{label:"\u95E8\u5E97\u786E\u8BA4\u4EBA\u5458",prop:"staff_name","show-overflow-tooltip":""}),o(u,{label:"\u5546\u54C1\u56FE",prop:"image","show-overflow-tooltip":""},{default:a(({row:t})=>[o(I,{class:"w-[40px] h-[40px]",src:t.image},null,8,["src"])]),_:1}),o(u,{label:"\u5546\u54C1",prop:"store_name"}),o(u,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),o(u,{label:"\u72B6\u6001",prop:"status"},{default:a(({row:t})=>[t.status===1?(s(),i(v,{key:0,type:"success"},{default:a(()=>e[9]||(e[9]=[r("\u5DF2\u5165\u5E93")])),_:1})):t.status===0?(s(),i(v,{key:1,type:"warning"},{default:a(()=>e[10]||(e[10]=[r("\u5F85\u786E\u8BA4")])),_:1})):t.status===-1?(s(),i(v,{key:2,type:"danger"},{default:a(()=>e[11]||(e[11]=[r("\u5E93\u5B58\u4E0D\u8DB3")])),_:1})):b("",!0)]),_:1}),o(u,{label:"\u5907\u6CE8",prop:"mark"}),o(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:t})=>[t.status==0?h((s(),i(g,{key:0,type:"success",link:"",onClick:ye=>$(t)},{default:a(()=>e[12]||(e[12]=[r(" \u786E\u8BA4\u5165\u5E93 ")])),_:2},1032,["onClick"])),[[q,["system_store_storage.system_store_storage/edit"]]]):b("",!0)]),_:1})]),_:1},8,["data"])]),x("div",ve,[o(O,{modelValue:l(p),"onUpdate:modelValue":e[3]||(e[3]=t=>Ee(p)?p.value=t:null),onChange:l(d)},null,8,["modelValue","onChange"])])]),_:1})),[[z,l(p).loading]]),l(y)?(s(),i(de,{key:0,ref_key:"editRef",ref:A,"dict-data":l(N),onSuccess:l(d),onClose:e[4]||(e[4]=t=>y.value=!1)},null,8,["dict-data","onSuccess"])):b("",!0)])}}});export{mt as default};