17 lines
10 KiB
JavaScript
17 lines
10 KiB
JavaScript
import{_ as j}from"./TABBG-WY6uizpD.js";import{e as N,p as V,f as z}from"./api-JoJiEZDD.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,z as y,F as A,g as F,e as C,h as x,k as D,t as P,x as M,y as O}from"./index-5L8dO1EA.js";import"./axios-QLjAsgXu.js";const T=g=>(M("data-v-893c7b72"),g=g(),O(),g),q={class:"box"},H={class:"img-cls"},J=T(()=>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<t.length;e++)t[e].style.display="block",l[e].style.display="none"}},k=i=>{let t="";for(let l=0;l<i;l++)t=t.concat('<input type="radio" name="rate" readonly>');return t},n=v(!0),_=(i,t,l)=>{l?t.forEach((e,a)=>{var m,f,$,B,E;a%2==0?i.data.push([`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${a+1}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;dislay:flex;align-items:center'>
|
|
<img src='${e.image}' style='width:25px;height:25px;margin-top:1px'>
|
|
</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${e.store_name}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${((m=e.merchant)==null?void 0:m.mer_name)||"--"}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${(f=e.merchant)!=null&&f.is_trader?"自营":"非自营"}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${e.price}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${(($=e.storeCategory)==null?void 0:$.cate_name)||"--"}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${e.attrValue[0].sales}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${e.attrValue[0].stock}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>
|
|
${k(e.star)}
|
|
</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${e.update_time}</div>`]):i.data.push([`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${a+1}</div>`,`<div style='width: 100%;text-align: center; height: 40px; color: aliceblue; background: #102B3E;dislay:flex;align-items:center;box-sizing: border-box; padding-top: 5px;'>
|
|
<img src='${e.image}' style='width:25px;height:25px;margin-top:1px'>
|
|
|
|
</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${e.store_name}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${e.merchant.mer_name}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${(B=e.merchant)!=null&&B.is_trader?"自营":"非自营"}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${e.price}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${((E=e.storeCategory)==null?void 0:E.cate_name)||"--"}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${e.attrValue[0].sales}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${e.attrValue[0].stock}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>
|
|
|
|
${k(e.star)}
|
|
|
|
</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${e.update_time}</div>`])}):t.forEach((e,a)=>{a%2==0?i.data.push([`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${a+1}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;' >${e.cate_name}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;dislay:flex;align-items:center'>
|
|
<img src='${e.pic}' style='width:25px;height:25px;margin-top:5px;position:re'>
|
|
</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${e.is_show?"显示":"不显示"}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${e.is_hot?"推荐":"不推荐"}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #02243D;'>${e.create_time}</div>`]):i.data.push([`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${a+1}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${e.cate_name}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;dislay:flex;align-items:center'>
|
|
<img src='${e.pic}' style='width:25px;height:25px;margin-top:5px'>
|
|
</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${e.is_show?"显示":"不显示"}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${e.is_hot?"推荐":"不推荐"}</div>`,`<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: #102B3E;'>${e.create_time}</div>`])})},u=b({headerBGC:"linear-gradient(to right, #ff0000, #00ff00)",oddRowBGC:"",evenRowBGC:"",rowNum:20,header:["<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>排序</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>分类名称</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>分类图标</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>是否显示</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>是否推荐</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>创建时间</div>"],data:[]}),o=b({headerBGC:"linear-gradient(to right, #ff0000, #00ff00)",oddRowBGC:"",evenRowBGC:"",rowNum:20,header:["<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>ID</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>商品图</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>商品名称</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>商户名称</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>商户分类</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>商品售价</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>平台分类</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>销量</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>库存</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>推荐级别</div>","<div style='width: 100%;text-align: center; height: 100%; color: aliceblue; background: linear-gradient(#002841, #007092);'>更新时间</div>"],data:[]});return L(()=>{p(1)}),(i,t)=>{const l=R("dv-scroll-board");return d(),r("div",q,[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};
|