import{_ as j}from"./TABBG-WY6uizpD.js";import{h as N,p as V,i as z}from"./api-cxsdgs3-.js";import{_ as G,a as S,i as v,r as b,o as L,j as R,b as d,f as r,d as c,q as y,F as A,g as F,e as C,h as x,k as D,t as P,y as q,z as M}from"./index-YcrvWpTH.js";import"./axios-QLjAsgXu.js";const O=g=>(q("data-v-893c7b72"),g=g(),M(),g),T={class:"box"},H={class:"img-cls"},J=O(()=>c("img",{src:j,style:{width:"100%",height:"100%",position:"absolute","z-index":"-10000"},alt:""},null,-1)),K={class:"content"},Q={class:"btns"},U={key:0,style:{display:"flex",color:"white","justify-content":"flex-end","margin-right":"5vw",cursor:"pointer"}},W=["onClick"],X={key:1,class:"table"},Y={key:2,class:"table"},Z={__name:"commodity",setup(g){const s=S();N({...s.area}).then(i=>{_(u,i.data)});let h=v(1);const p=i=>{o.data.splice(0,o.data.length),h.value=i,z({...s.area,limit:50,type:h.value}).then(t=>{_(o,t.data.list,!0)})};let w=b([]);V({...s.area}).then(i=>{i.data.forEach(t=>{w.push(t)})}),v(2);const I=i=>{if(i.ceil)if(i.columnIndex==1){let t=document.getElementById(`zmj${i.rowIndex}`),l=document.getElementById(`lj${i.rowIndex}`);t.style.display="none",l.style.display="block"}else{let t=document.getElementsByClassName("zmj"),l=document.getElementsByClassName("lj");for(let e=0;e{let t="";for(let l=0;l');return t},n=v(!0),_=(i,t,l)=>{l?t.forEach((e,a)=>{var m,f,$,B,E;a%2==0?i.data.push([`
${a+1}
`,`
`,`
${e.store_name}
`,`
${((m=e.merchant)==null?void 0:m.mer_name)||"--"}
`,`
${(f=e.merchant)!=null&&f.is_trader?"自营":"非自营"}
`,`
${e.price}
`,`
${(($=e.storeCategory)==null?void 0:$.cate_name)||"--"}
`,`
${e.attrValue[0].sales}
`,`
${e.attrValue[0].stock}
`,`
${k(e.star)}
`,`
${e.update_time}
`]):i.data.push([`
${a+1}
`,`
`,`
${e.store_name}
`,`
${e.merchant.mer_name}
`,`
${(B=e.merchant)!=null&&B.is_trader?"自营":"非自营"}
`,`
${e.price}
`,`
${((E=e.storeCategory)==null?void 0:E.cate_name)||"--"}
`,`
${e.attrValue[0].sales}
`,`
${e.attrValue[0].stock}
`,`
${k(e.star)}
`,`
${e.update_time}
`])}):t.forEach((e,a)=>{a%2==0?i.data.push([`
${a+1}
`,`
${e.cate_name}
`,`
`,`
${e.is_show?"显示":"不显示"}
`,`
${e.is_hot?"推荐":"不推荐"}
`,`
${e.create_time}
`]):i.data.push([`
${a+1}
`,`
${e.cate_name}
`,`
`,`
${e.is_show?"显示":"不显示"}
`,`
${e.is_hot?"推荐":"不推荐"}
`,`
${e.create_time}
`])})},u=b({headerBGC:"linear-gradient(to right, #ff0000, #00ff00)",oddRowBGC:"",evenRowBGC:"",rowNum:20,header:["
排序
","
分类名称
","
分类图标
","
是否显示
","
是否推荐
","
创建时间
"],data:[]}),o=b({headerBGC:"linear-gradient(to right, #ff0000, #00ff00)",oddRowBGC:"",evenRowBGC:"",rowNum:20,header:["
ID
","
商品图
","
商品名称
","
商户名称
","
商户分类
","
商品售价
","
平台分类
","
销量
","
库存
","
推荐级别
","
更新时间
"],data:[]});return L(()=>{p(1)}),(i,t)=>{const l=R("dv-scroll-board");return d(),r("div",T,[c("div",H,[J,c("div",K,[c("div",Q,[c("div",{class:y(["btn",n.value?"act-btn":""]),onClick:t[0]||(t[0]=e=>n.value=!0)},"商品分类",2),c("div",{class:y(["btn",n.value?"":"act-btn"]),onClick:t[1]||(t[1]=e=>n.value=!1)},"商品管理",2)]),n.value?x("",!0):(d(),r("div",U,[(d(!0),r(A,null,F(C(w),e=>(d(),r("div",{onClick:a=>p(e.type),class:y(["manageBtn",{actmanageBtn:C(h)==e.type}])},P(e.name),11,W))),256))])),n.value&&u.data.length?(d(),r("div",X,[D(l,{onClick:I,config:u,style:{width:"95vw",height:"100%"}},null,8,["config"])])):x("",!0),!n.value&&o.data.length?(d(),r("div",Y,[D(l,{config:o,style:{width:"95vw",height:"100%"}},null,8,["config"])])):x("",!0)])])])}}},ae=G(Z,[["__scopeId","data-v-893c7b72"]]);export{ae as default};