import{T as z,J,K as Q,D as Z,C as G,w as H,F as W,L as X,M as Y,b as ee,N as te,O as oe}from"./element-plus.78e68aed.js";import{_ as ae}from"./index.vue_vue_type_script_setup_true_lang.3c4454b7.js";import{u as le}from"./usePaging.6a6670f9.js";import{u as ue}from"./useDictOptions.d3b8fa80.js";import{d as se}from"./system_store_storage.5fea31d4.js";import{a as ne}from"./system_store.09c222e2.js";import"./lodash.60201f64.js";import"./index.49b211ae.js";import{_ as re}from"./edit.vue_vue_type_script_setup_true_name_systemStoreStorageEdit_lang.cdd6d090.js";import{d as L,s as ie,r as f,Z as me,ap as pe,o as s,c as w,U as t,L as l,u as o,T as V,a9 as x,K as r,R as m,M as S,a as A,Q as B,j as de,n as _e}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.af6a9f5a.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const ce={class:"mt-4"},fe={class:"flex mt-4 justify-end"},Ee=L({name:"systemStoreStorageLists"}),lt=L({...Ee,setup(ge){const E=ie(),g=f(!1),u=me({store_id:"",admin_id:"",operating_id:"",status:""}),T=f([]),U=i=>{T.value=i.map(({id:a})=>a)},{dictData:N}=ue(""),{pager:p,getLists:v,resetParams:R,resetPage:C}=le({fetchFun:se,params:u}),P=async i=>{var a,d;g.value=!0,await _e(),(a=E.value)==null||a.open("edit"),(d=E.value)==null||d.setFormData(i)};v();const c=f(!1),y=f([]),$=(i="")=>{c.value=!0,ne({name:i,page_size:50}).then(a=>{y.value=a.lists,setTimeout(()=>{c.value=!1},300)}).catch(a=>{setTimeout(()=>{c.value=!1},300)})};return(i,a)=>{const d=J,F=Q,_=Z,k=G,b=H,I=W,D=X,n=Y,M=ee,h=z,j=te,K=ae,O=pe("perms"),q=oe;return s(),w("div",null,[t(D,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[t(I,{class:"mb-[-16px]",model:o(u),inline:""},{default:l(()=>[t(_,{label:"\u95E8\u5E97",prop:"store_id"},{default:l(()=>[t(F,{modelValue:o(u).store_id,"onUpdate:modelValue":a[0]||(a[0]=e=>o(u).store_id=e),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":$,loading:o(c),style:{width:"240px"},onChange:o(C)},{default:l(()=>[(s(!0),w(V,null,x(o(y),e=>(s(),r(d,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])]),_:1}),t(_,{label:"\u5BFC\u5165\u4EBA\u5458",prop:"admin_id"},{default:l(()=>[t(k,{class:"w-[280px]",modelValue:o(u).admin_id,"onUpdate:modelValue":a[1]||(a[1]=e=>o(u).admin_id=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BFC\u5165\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),t(_,{label:"\u95E8\u5E97\u786E\u8BA4\u4EBA\u5458",prop:"operating_id"},{default:l(()=>[t(k,{class:"w-[280px]",modelValue:o(u).operating_id,"onUpdate:modelValue":a[2]||(a[2]=e=>o(u).operating_id=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u786E\u8BA4\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),t(_,{label:"\u72B6\u6001",prop:"status"},{default:l(()=>[t(F,{modelValue:o(u).status,"onUpdate:modelValue":a[3]||(a[3]=e=>o(u).status=e),placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22",style:{width:"240px"},onChange:o(C)},{default:l(()=>[(s(),w(V,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(_,null,{default:l(()=>[t(b,{type:"primary",onClick:o(C)},{default:l(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),t(b,{onClick:o(R)},{default:l(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),S((s(),r(D,{class:"!border-none",shadow:"never"},{default:l(()=>[A("div",ce,[t(j,{data:o(p).lists,onSelectionChange:U},{default:l(()=>[t(n,{label:"\u95E8\u5E97",prop:"system_store_name","show-overflow-tooltip":""}),t(n,{label:"\u5BFC\u5165\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),t(n,{label:"\u95E8\u5E97\u786E\u8BA4\u4EBA\u5458",prop:"staff_name","show-overflow-tooltip":""}),t(n,{label:"\u5546\u54C1\u56FE",prop:"image","show-overflow-tooltip":""},{default:l(({row:e})=>[t(M,{class:"w-[40px] h-[40px]",src:e.image},null,8,["src"])]),_:1}),t(n,{label:"\u5546\u54C1",prop:"store_name","show-overflow-tooltip":""}),t(n,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),t(n,{label:"\u72B6\u6001",prop:"status","show-overflow-tooltip":""},{default:l(({row:e})=>[e.status===1?(s(),r(h,{key:0,type:"success"},{default:l(()=>[m("\u5DF2\u5165\u5E93")]),_:1})):e.status===0?(s(),r(h,{key:1,type:"warning"},{default:l(()=>[m("\u5F85\u786E\u8BA4")]),_:1})):e.status===-1?(s(),r(h,{key:2,type:"danger"},{default:l(()=>[m("\u5E93\u5B58\u4E0D\u8DB3")]),_:1})):B("",!0)]),_:1}),t(n,{label:"\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),t(n,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:e})=>[e.status!==1?S((s(),r(b,{key:0,type:"primary",link:"",onClick:ve=>P(e)},{default:l(()=>[m(" \u7F16\u8F91\u5E93\u5B58 ")]),_:2},1032,["onClick"])),[[O,["system_store_storage.system_store_storage/edit"]]]):B("",!0)]),_:1})]),_:1},8,["data"])]),A("div",fe,[t(K,{modelValue:o(p),"onUpdate:modelValue":a[4]||(a[4]=e=>de(p)?p.value=e:null),onChange:o(v)},null,8,["modelValue","onChange"])])]),_:1})),[[q,o(p).loading]]),o(g)?(s(),r(re,{key:0,ref_key:"editRef",ref:E,"dict-data":o(N),onSuccess:o(v),onClose:a[5]||(a[5]=e=>g.value=!1)},null,8,["dict-data","onSuccess"])):B("",!0)])}}});export{lt as default};