import{C as N,D as R,w as q,F as T,L as U,M as j,b as M,N as K,O}from"./element-plus.1e96d4ee.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.272adef5.js";import{u as z}from"./usePaging.6a6670f9.js";import{u as G}from"./useDictOptions.456dd92f.js";import{d as H,e as J}from"./store_product.f47f58fc.js";import{d as D,r as E,Z as Q,af as W,ap as X,o as n,c as Y,U as o,L as e,u as r,R as i,M as p,K as m,a as k,S as oo,j as eo}from"./@vue.18505fe0.js";import"./lodash.60201f64.js";import{f as to}from"./index.893d9365.js";import{_ as lo}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.f3bf55af.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"./system_store.c583de69.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.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const ao={class:"mt-4"},ro={class:"flex mt-4 justify-end"},io=D({name:"storeProductLists"}),Go=D({...io,setup(so){const h=E(null),_=Q({store_name:"",cate_id:""}),w=E([]),y=s=>{console.log(s),w.value=s.map(({id:a})=>a)};G("");const{pager:d,getLists:C,resetParams:B,resetPage:x}=z({fetchFun:J,params:_}),V=async s=>{var a,f;(a=h.value)==null||a.open(),(f=h.value)==null||f.setFormData(s)},v=async s=>{await to.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await H({id:s}),C()};return C(),(s,a)=>{const f=N,b=R,u=q,P=T,g=U,F=W("router-link"),t=j,L=M,S=K,$=Z,c=X("perms"),A=O;return n(),Y("div",null,[o(g,{class:"!border-none mb-4",shadow:"never"},{default:e(()=>[o(P,{class:"mb-[-16px]",model:r(_),inline:""},{default:e(()=>[o(b,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:e(()=>[o(f,{class:"w-[280px]",modelValue:r(_).store_name,"onUpdate:modelValue":a[0]||(a[0]=l=>r(_).store_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(b,null,{default:e(()=>[o(u,{type:"primary",onClick:r(x)},{default:e(()=>[i("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(u,{onClick:r(B)},{default:e(()=>[i("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),p((n(),m(g,{class:"!border-none",shadow:"never"},{default:e(()=>[p((n(),m(F,{to:{path:"store_product_edit",query:{id:0,mode:"add"}},class:"mr-4"},{default:e(()=>[o(u,{type:"primary",icon:"Plus"},{default:e(()=>[i(" \u65B0\u589E ")]),_:1})]),_:1})),[[c,["store_product.store_product/add"]]]),p((n(),m(u,{disabled:!r(w).length,onClick:a[1]||(a[1]=l=>v(r(w)))},{default:e(()=>[i(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[c,["store_product.store_product/delete"]]]),k("div",ao,[o(S,{data:r(d).lists,onSelectionChange:y},{default:e(()=>[o(t,{type:"selection",width:"55"}),o(t,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),o(t,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:e(({row:l})=>[o(L,{style:{width:"50px",height:"50px"},src:l.image},null,8,["src"])]),_:1}),o(t,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),o(t,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),o(t,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),o(t,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),o(t,{label:"\u6210\u672C\u4EF7",prop:"cost","min-width":"100","show-overflow-tooltip":""}),o(t,{label:"\u91C7\u8D2D\u4EF7",prop:"purchase","min-width":"100","show-overflow-tooltip":""}),o(t,{label:"\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),o(t,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""}),o(t,{label:"\u6761\u7801",prop:"bar_code","min-width":"200","show-overflow-tooltip":""}),o(t,{label:"\u72B6\u6001",prop:"is_show","show-overflow-tooltip":""},{default:e(({row:l})=>[i(oo(l.is_show?"\u4E0A\u67B6":"\u672A\u4E0A\u67B6"),1)]),_:1}),o(t,{label:"\u64CD\u4F5C",width:"180",fixed:"right"},{default:e(({row:l})=>[p((n(),m(F,{to:{path:"store_product_edit",query:{id:l.id,mode:"edit"}},class:"mr-4"},{default:e(()=>[o(u,{type:"primary",link:""},{default:e(()=>[i(" \u7F16\u8F91 ")]),_:1})]),_:2},1032,["to"])),[[c,["store_product.store_product/edit"]]]),p((n(),m(u,{type:"primary",link:"",onClick:I=>V(l)},{default:e(()=>[i(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[c,["store_product.store_product/edit"]]]),p((n(),m(u,{type:"danger",link:"",onClick:I=>v(l.id)},{default:e(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[c,["store_product.store_product/delete"]]])]),_:1})]),_:1},8,["data"])]),k("div",ro,[o($,{modelValue:r(d),"onUpdate:modelValue":a[2]||(a[2]=l=>eo(d)?d.value=l:null),onChange:r(C)},null,8,["modelValue","onChange"])])]),_:1})),[[A,r(d).loading]]),o(lo,{ref_key:"detailsRef",ref:h},null,512)])}}});export{Go as default};