import{C as j,D as I,w as M,F as q,L as K,M as O,N as Q,O as Z}from"./element-plus.78e68aed.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.3c4454b7.js";import{f as G,b as H}from"./index.b18da889.js";import{u as J}from"./usePaging.6a6670f9.js";import{u as W}from"./useDictOptions.0e0294ee.js";import{d as X,e as Y}from"./system_store_storage.c266737c.js";import"./lodash.60201f64.js";import{_ as ee}from"./edit.vue_vue_type_script_setup_true_name_systemStoreStorageEdit_lang.b02b1bf8.js";import{d as V,s as te,r as y,Z as oe,ap as ae,o as n,c as le,U as e,L as a,u as t,R as m,M as f,K as p,a as F,j as se,Q as re,n as k}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.68558adb.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const ue={class:"mt-4"},ie={class:"flex mt-4 justify-end"},ne=V({name:"systemStoreStorageLists"}),He=V({...ne,setup(de){const E=te(),g=y(!1),s=oe({store_id:"",admin_id:"",operating_id:"",status:""}),b=y([]),h=r=>{b.value=r.map(({id:o})=>o)},{dictData:x}=W(""),{pager:_,getLists:v,resetParams:D,resetPage:S}=J({fetchFun:Y,params:s}),A=async()=>{var r;g.value=!0,await k(),(r=E.value)==null||r.open("add")},$=async r=>{var o,i;g.value=!0,await k(),(o=E.value)==null||o.open("edit"),(i=E.value)==null||i.setFormData(r)},w=async r=>{await G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await X({id:r}),v()};return v(),(r,o)=>{const i=j,c=I,d=M,L=q,B=K,U=H,u=O,N=Q,P=z,C=ae("perms"),R=Z;return n(),le("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(L,{class:"mb-[-16px]",model:t(s),inline:""},{default:a(()=>[e(c,{label:"\u95E8\u5E97",prop:"store_id"},{default:a(()=>[e(i,{class:"w-[280px]",modelValue:t(s).store_id,"onUpdate:modelValue":o[0]||(o[0]=l=>t(s).store_id=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97"},null,8,["modelValue"])]),_:1}),e(c,{label:"\u5BFC\u5165\u4EBA\u5458",prop:"admin_id"},{default:a(()=>[e(i,{class:"w-[280px]",modelValue:t(s).admin_id,"onUpdate:modelValue":o[1]||(o[1]=l=>t(s).admin_id=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BFC\u5165\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),e(c,{label:"\u95E8\u5E97\u786E\u8BA4\u4EBA\u5458",prop:"operating_id"},{default:a(()=>[e(i,{class:"w-[280px]",modelValue:t(s).operating_id,"onUpdate:modelValue":o[2]||(o[2]=l=>t(s).operating_id=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u786E\u8BA4\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),e(c,{label:"\u72B6\u6001",prop:"status"},{default:a(()=>[e(i,{class:"w-[280px]",modelValue:t(s).status,"onUpdate:modelValue":o[3]||(o[3]=l=>t(s).status=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u72B6\u6001"},null,8,["modelValue"])]),_:1}),e(c,null,{default:a(()=>[e(d,{type:"primary",onClick:t(S)},{default:a(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:t(D)},{default:a(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((n(),p(B,{class:"!border-none",shadow:"never"},{default:a(()=>[f((n(),p(d,{type:"primary",onClick:A},{icon:a(()=>[e(U,{name:"el-icon-Plus"})]),default:a(()=>[m(" \u65B0\u589E ")]),_:1})),[[C,["system_store_storage.system_store_storage/add"]]]),f((n(),p(d,{disabled:!t(b).length,onClick:o[4]||(o[4]=l=>w(t(b)))},{default:a(()=>[m(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[C,["system_store_storage.system_store_storage/delete"]]]),F("div",ue,[e(N,{data:t(_).lists,onSelectionChange:h},{default:a(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"\u95E8\u5E97",prop:"store_id","show-overflow-tooltip":""}),e(u,{label:"\u5BFC\u5165\u4EBA\u5458",prop:"admin_id","show-overflow-tooltip":""}),e(u,{label:"\u95E8\u5E97\u786E\u8BA4\u4EBA\u5458",prop:"operating_id","show-overflow-tooltip":""}),e(u,{label:"\u5546\u54C1",prop:"product_id","show-overflow-tooltip":""}),e(u,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),e(u,{label:"\u72B6\u6001",prop:"status","show-overflow-tooltip":""}),e(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[f((n(),p(d,{type:"primary",link:"",onClick:T=>$(l)},{default:a(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[C,["system_store_storage.system_store_storage/edit"]]]),f((n(),p(d,{type:"danger",link:"",onClick:T=>w(l.id)},{default:a(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[C,["system_store_storage.system_store_storage/delete"]]])]),_:1})]),_:1},8,["data"])]),F("div",ie,[e(P,{modelValue:t(_),"onUpdate:modelValue":o[5]||(o[5]=l=>se(_)?_.value=l:null),onChange:t(v)},null,8,["modelValue","onChange"])])]),_:1})),[[R,t(_).loading]]),t(g)?(n(),p(ee,{key:0,ref_key:"editRef",ref:E,"dict-data":t(x),onSuccess:t(v),onClose:o[6]||(o[6]=l=>g.value=!1)},null,8,["dict-data","onSuccess"])):re("",!0)])}}});export{He as default};