PageSourceSearch

https://markethacker.ru/assets/wb-spp-column-Bc7jNod6.js

js markethacker.ru collected 2026-10-02 02:07:32 UTC 18,886 bytes, 1 lines download raw bytes

1import{m as e,h as d,L as y,q as u,_ as C,H as T,D as W,A as $,E as D,P as I}from"./index-BhuuQD9y.js";import{a as L,L as R}from"./MhShell-Cbejmf_i.js";import{A as M}from"./arrow-left-CrBeYGIJ.js";import{C as S}from"./check-DVd4CU5_.js";import{P as N}from"./plus-BeoQ3l_S.js";import{A as B}from"./arrow-right-DfMwkIJk.js";import{C as U}from"./columns-3-CGFvL_x6.js";import{W as F}from"./wand-sparkles-DN63WJyN.js";import{S as K}from"./shield-check-DtyjdqJ_.js";import{E as _}from"./eye-x9lTuTW0.js";import{Z as H}from"./zap-Dah-fsUc.js";import{E as Y}from"./eye-off-B2CqyrMi.js";import"./flame-Bik0_g14.js";import"./percent-wBt4aiQW.js";import"./wrench-CeVsxVf-.js";import"./wallet-sO7ZU_x5.js";function ce(){return e.jsxs(e.Fragment,{children:[e.jsx(L,{}),e.jsx(O,{})]})}const o=[{id:"1",img:"linear-gradient(135deg,#cfe3ff,#9fbcff)",name:"магниевое масло для мышц и сна",cat:"Масла",brand:"ASTARTA",art:"67143578",sku:"77415037Mg-200-n",priceBefore:9860,sellerDiscount:95,priceAfter:493,spp:8,finalPrice:453,margin:-42,marginPct:-9.3,warn:"loss"},{id:"2",img:"linear-gradient(135deg,#ffe7c2,#ffb978)",name:"масло кокосовое для тела натуральное",cat:"Масла",brand:"ASTARTA",art:"67140011",sku:"77415044coc-200-n",priceBefore:6123,sellerDiscount:92,priceAfter:489.84,spp:7,finalPrice:455.55,margin:38,marginPct:8.3,warn:"thin"},{id:"3",img:"linear-gradient(135deg,#ffd1d9,#ff8aa1)",name:"трусы кружевные набор",cat:"Трусы",brand:"SITY_SHIK",art:"259119004",sku:"СлипыRED",priceBefore:3491,sellerDiscount:58,priceAfter:1466.22,spp:12,finalPrice:1290.27,margin:482,marginPct:37.4,warn:"ok"},{id:"4",img:"linear-gradient(135deg,#efe1cf,#c9a988)",name:"трусы кружевные набор",cat:"Трусы",brand:"SITY_SHIK",art:"259117274",sku:"СлипыBEIGE",priceBefore:2374,sellerDiscount:58,priceAfter:997.08,spp:12,finalPrice:877.43,margin:211,marginPct:24.1,warn:"ok"},{id:"5",img:"linear-gradient(135deg,#e2e2e2,#7a7a7a)",name:"трусы кружевные набор",cat:"Трусы",brand:"SITY_SHIK",art:"259120649",sku:"СлипыBLAC",priceBefore:2374,sellerDiscount:58,priceAfter:997.08,spp:11,finalPrice:887.4,margin:221,marginPct:24.9,warn:"ok"}],w=s=>s.toLocaleString("ru-RU",{maximumFractionDigits:2})+" ₽";function O(){const[s,a]=d.useState(!0),[r,l]=d.useState(!0),[n,E]=d.useState(!0),[f,P]=d.useState(!0),g=d.useMemo(()=>{const t=o.filter(x=>x.warn==="loss").length,c=Math.round(o.reduce((x,j)=>x+j.spp,0)/o.length*10)/10,m=o.reduce((x,j)=>x+j.margin,0);return{losses:t,avgSpp:c,totalMargin:m}},[]);return e.jsxs("div",{className:"min-h-screen bg-[#f6f5fb] text-[#2a1b4a]",children:[e.jsx("header",{className:"sticky top-0 z-40 border-b border-black/5 bg-white/90 backdrop-blur-xl",children:e.jsxs("div",{className:"mx-auto flex max-w-[1600px] flex-wrap items-center gap-4 px-6 py-3",children:[e.jsxs(y,{to:"/",className:"flex items-center gap-2 text-[12px] text-[#9c8cbc] hover:text-[#8A2BE2]",children:[e.jsx(M,{className:"h-4 w-4"}),"На главную"]}),e.jsx("span",{className:"text-[#d6cfe8]",children:"/"}),e.jsx("span",{className:"text-[12px] text-[#9c8cbc]",children:"Wildberries"}),e.jsx("span",{className:"text-[#d6cfe8]",children:"/"}),e.jsx("span",{className:"text-[12px] text-[#9c8cbc]",children:"Цены и скидки"}),e.jsx("span",{className:"text-[#d6cfe8]",children:"/"}),e.jsx("span",{className:"text-[12px] font-medium text-[#2a1b4a]",children:"Столбец СПП"}),e.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-[#f0eaff] px-2.5 py-1 text-[11px] font-semibold text-[#8A2BE2] ring-1 ring-[#e2d6ff]",children:[e.jsx(u,{className:"h-3 w-3"})," MarketHacker плагин"]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-50 px-2.5 py-1 text-[11px] font-semibold text-emerald-700 ring-1 ring-emerald-200",children:[e.jsx(S,{className:"h-3 w-3"})," Установлено"]})]})]})}),e.jsx("section",{className:"mx-auto max-w-[1600px] px-6 pt-8",children:e.jsxs("div",{className:"relative overflow-hidden rounded-3xl bg-gradient-to-br from-[#8A2BE2] via-[#7a26c7] to-[#4f1a8a] p-8 text-white shadow-[0_30px_60px_-30px_rgba(138,43,226,0.6)]",children:[e.jsx("div",{className:"absolute -right-20 -top-20 h-72 w-72 rounded-full bg-white/10 blur-3xl"}),e.jsx("div",{className:"absolute -bottom-24 -left-10 h-72 w-72 rounded-full bg-[#ff7ad9]/20 blur-3xl"}),e.jsxs("div",{className:"relative grid gap-8 lg:grid-cols-[1.4fr_1fr] lg:items-center",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-white/15 px-3 py-1 text-[11px] font-semibold uppercase tracking-wider ring-1 ring-white/20",children:[e.jsx(N,{className:"h-3 w-3"})," Новый столбец в таблице товаров"]}),e.jsxs("h1",{className:"mt-4 text-[40px] font-semibold leading-[1.05] tracking-tight",children:["Столбец СПП —"," ",e.jsx("span",{className:"bg-gradient-to-r from-[#ffd6f3] to-[#fff] bg-clip-text text-transparent",children:"реальная цена клиента"}),e.jsx("br",{}),"прямо в кабинете WB"]}),e.jsx("p",{className:"mt-4 max-w-xl text-[15px] leading-relaxed text-white/80",children:"Wildberries скрывает скидку постоянного покупателя — её не увидеть в стандартной таблице. Наш плагин добавляет столбец СПП и пересчитывает финальную цену и маржу по каждому SKU. Без Excel, без выгрузок."}),e.jsxs("div",{className:"mt-6 flex flex-wrap items-center gap-3",children:[e.jsx("button",{onClick:()=>a(t=>
1!t),className:`inline-flex items-center gap-2 rounded-2xl px-5 py-3 text-[14px] font-semibold shadow-lg transition ${s?"bg-white text-[#5a1aa3] hover:bg-[#fff8ff]":"bg-[#ffd84a] text-[#3a1066] hover:bg-[#ffe27d]"}`,children:s?e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"h-4 w-4"})," Столбец включён"]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{className:"h-4 w-4"})," Добавить столбец СПП"]})}),e.jsxs(y,{to:"/wb-entry-points",className:"inline-flex items-center gap-1.5 rounded-2xl border border-white/25 px-4 py-3 text-[13px] font-medium text-white/90 hover:bg-white/10",children:["Все доработки кабинета ",e.jsx(B,{className:"h-4 w-4"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsxs("div",{className:"rounded-2xl bg-white/10 p-4 ring-1 ring-white/15 backdrop-blur",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-wide text-white/60",children:"средний СПП"}),e.jsxs("div",{className:"mt-1 text-[28px] font-semibold",children:[g.avgSpp,"%"]}),e.jsx("div",{className:"mt-1 text-[11px] text-white/60",children:"по портфелю"})]}),e.jsxs("div",{className:"rounded-2xl bg-white/10 p-4 ring-1 ring-white/15 backdrop-blur",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-wide text-white/60",children:"в минусе"}),e.jsxs("div",{className:"mt-1 text-[28px] font-semibold text-[#ffd6e2]",children:[g.losses," SKU"]}),e.jsx("div",{className:"mt-1 text-[11px] text-white/60",children:"с учётом СПП"})]}),e.jsxs("div",{className:"rounded-2xl bg-white/10 p-4 ring-1 ring-white/15 backdrop-blur",children:[e.jsx("div",{className:"text-[11px] uppercase tracking-wide text-white/60",children:"маржа всего"}),e.jsxs("div",{className:"mt-1 text-[28px] font-semibold",children:[g.totalMargin.toLocaleString("ru-RU")," ₽"]}),e.jsx("div",{className:"mt-1 text-[11px] text-white/60",children:"за единицу"})]})]})]})]})}),e.jsx("section",{className:"mx-auto max-w-[1600px] px-6 py-8",children:e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[280px_1fr]",children:[e.jsxs("aside",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-2xl border border-black/5 bg-white p-5 shadow-[0_8px_30px_-12px_rgba(42,27,74,0.15)]",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[12px] font-semibold uppercase tracking-wider text-[#9c8cbc]",children:[e.jsx(U,{className:"h-3.5 w-3.5"})," Настройки столбца"]}),e.jsx(p,{label:"Столбец СПП",hint:"Подтягивает % скидки постоянного покупателя",value:s,onChange:a,accent:!0}),e.jsx(p,{label:"Финальная цена",hint:"Сколько платит клиент после СПП",value:r,onChange:l}),e.jsx(p,{label:"Маржа с учётом СПП",hint:"С себестоимостью, комиссией и логистикой",value:n,onChange:E}),e.jsx(p,{label:"Подсветка убытка",hint:"Красный → маржа < 0 при СПП",value:f,onChange:P})]}),e.jsxs("div",{className:"rounded-2xl border border-black/5 bg-white p-5 shadow-[0_8px_30px_-12px_rgba(42,27,74,0.15)]",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[12px] font-semibold uppercase tracking-wider text-[#9c8cbc]",children:[e.jsx(F,{className:"h-3.5 w-3.5"})," Источник СПП"]}),e.jsxs("ul",{className:"mt-3 space-y-2 text-[13px]",children:[e.jsx(v,{icon:e.jsx(K,{className:"h-3.5 w-3.5"}),label:"API WB Партнёр",badge:"Активно",tone:"ok"}),e.jsx(v,{icon:e.jsx(_,{className:"h-3.5 w-3.5"}),label:"Сравнение с витриной",badge:"Каждые 15 мин",tone:"ok"}),e.jsx(v,{icon:e.jsx(C,{className:"h-3.5 w-3.5"}),label:"Сегменты WB Клуба",badge:"Pro",tone:"lock"})]})]}),e.jsxs("div",{className:"rounded-2xl border border-[#e2d6ff] bg-gradient-to-br from-[#faf6ff] to-[#f3eaff] p-5",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[12px] font-semibold text-[#8A2BE2]",children:[e.jsx(u,{className:"h-3.5 w-3.5"})," AI-подсказка"]}),e.jsxs("p",{className:"mt-2 text-[13px] leading-relaxed text-[#3f2873]",children:["У ",e.jsx("b",{children:"1 SKU"})," при текущей акции и СПП маржа уходит в минус. Поднимите цену на ",e.jsx("b",{children:"92 ₽"})," — попадёте в индекс 1 и сохраните сортировку."]}),e.jsxs("button",{className:"mt-3 inline-flex items-center gap-1.5 rounded-xl bg-[#8A2BE2] px-3 py-2 text-[12px] font-semibold text-white hover:bg-[#7a25c7]",children:["Применить рекомендацию ",e.jsx(B,{className:"h-3.5 w-3.5"})]})]})]}),e.jsxs("div",{className:"rounded-2xl border border-black/5 bg-white shadow-[0_8px_30px_-12px_rgba(42,27,74,0.15)]",children:[e.jsxs("div",{className:"flex items-center gap-6 border-b border-black/5 px-5 pt-4",children:[e.jsx(k,{active:!0,children:"Все товары"}),e.jsx(k,{children:"Карантин"}),e.jsx(k,{children:"История изменений"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-5 py-3",children:[e.jsx(h,{children:"Цена и скидка"}),e.jsx(h,{children:"Скидка WB Клуба"}),e.jsx(h,{caret:!0,children:"Действия"}),e.jsx(h,{caret:!0,children:"Excel"}),e.jsx("div",{className:"mx-2 h-5 w-px bg-black/10"}),e.jsxs("button",{className:"inline-flex items-center gap-1.5 rounded-xl bg-[#8A2BE2] px-3 py-1.5 text-[12px] font-semibold text-white shadow-sm hover:bg-[#7a25c7]",children:[e.jsx(N,{className:"h-3.5 w-3.5"})," Редактировать"]}),e.jsxs("button",{className:"inline-flex items-center gap-1.5 rounded-xl border border-black/10 bg-white px-3 py-1.5 text-[12px] font-medium text-[#2a1b4a] hover:bg-[#faf7ff]",children:[e.jsx(T,{className:"h-3.5 w-3.5"})," Фильтры"]}),e.jsxs("button",{className:"ml-auto inline-flex items-center gap-1.5 rounded-xl border border-black/10 bg-white px-3 py-1.5 text-[12px] font-medium text-[#2a1b4a] hover:bg-[#faf7ff]",children:[e.jsx(W,{className:"h-3.5 w-3.5"})," Экспорт"]})]}),e.jsx("div",{className:"overflow-x-auto px-2 pb-4",children:e.jsxs("table",{className:"w-full min-w-[1100px] text-[12px]",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[11px] text-[#9c8cbc]",children:[e.jsx(i,{className:"text-left",children:"Товар"}),e.jsx(i,{children:"Цена до скидки"}),e.jsx(i,{children:"Скидка"}),e.jsx(i,{children:"Цена со скидкой"}),e.jsx(i,{tone:"brand",badge:"новое",children:e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(u,{className:"h-3 w-3 text-[#8A2BE2]"}),"СПП"]})}),r&&e.jsx(i,{tone:"brand",children:"Цена для клиента"}),n&&e.jsx(i,{tone:"brand",children:"Маржа с СПП"}),e.jsx(i,{children:"Индекс цены"})]})}),e.jsx("tbody",{children:o.map(t=>{const c=f&&t.warn==="loss",m=f&&t.warn==="thin";return e.jsxs("tr",{className:`border-t border-black/5 ${c?"bg-rose-50/40":""}`,children:[e.jsx("td",{className:"py-3 pl-3 pr-2",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 shrink-0 rounded-lg ring-1 ring-black/5",style:{background:t.img}}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate font-medium text-[#2a1b4a]",children:t.name}),e.jsxs("div",{className:"mt-0.5 truncate text-[11px] text-[#9c8cbc]",children:[t.cat," · ",t.brand," · ",t.art,e.jsx("br",{}),e.jsxs("span",{className:"text-[#bdb1d6]",children:["· ",t.sku]})]})]})]})}),e.jsx(b,{children:w(t.priceBefore)}),e.jsxs(b,{children:[t.sellerDiscount,"%"]}),e.jsx(b,{children:w(t.priceAfter)}),e.jsx("td",{className:`px-3 py-3 text-center ${s?"bg-[#f3eaff]":"bg-[repeating-linear-gradient(45deg,#f6f5fb_0_6px,#ecebf3_6px_12px)]"}`,children:s?e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-white px-2 py-0.5 font-semibold text-[#8A2BE2] ring-1 ring-[#e2d6ff]",children:["−",t.spp,"%"]}):e.jsxs("span",{className:"inline-flex items-center gap-1 text-[11px] text-[#bdb1d6]",children:[e.jsx(R,{className:"h-3 w-3"})," скрыто WB"]})}),r&&e.jsx("td",{className:`px-3 py-3 text-right font-semibold ${s?"text-[#2a1b4a]":"text-[#bdb1d6]"}`,children:s?w(t.finalPrice):"—"}),n&&e.jsx("td",{className:"px-3 py-3 text-right",children:s?e.jsxs("div",{className:`inline-flex flex-col items-end leading-tight ${c?"text-rose-600":m?"text-amber-600":"text-emerald-600"}`,children:[e.jsxs("span",{className:"font-semibold",children:[t.margin>
10?"+":"",t.margin.toLocaleString("ru-RU")," ₽"]}),e.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[10px] opacity-80",children:[t.marginPct>=0?e.jsx($,{className:"h-3 w-3"}):e.jsx(D,{className:"h-3 w-3"}),t.marginPct,"%"]})]}):e.jsx("span",{className:"text-[#bdb1d6]",children:"—"})}),e.jsx(b,{children:e.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full ${c?"bg-rose-500":m?"bg-amber-400":"bg-emerald-500"}`})})]},t.id)})})]})}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-t border-black/5 px-5 py-3 text-[12px] text-[#6b5a8a]",children:[e.jsx(I,{className:"h-3.5 w-3.5 text-[#8A2BE2]"}),"СПП обновляется автоматически каждые 15 минут. Маржа считается с учётом ваших себестоимостей и логистики из раздела «Юнит-экономика»."]})]})]})}),e.jsx("section",{className:"mx-auto max-w-[1600px] px-6 pb-16",children:e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsx(A,{icon:e.jsx(_,{className:"h-5 w-5"}),title:"Видите то, что прячет WB",text:"СПП доступен только клиентам — мы достаём процент и подставляем в таблицу."}),e.jsx(A,{icon:e.jsx(H,{className:"h-5 w-5"}),title:"Маржа честно, по SKU",text:"Не «средняя по складу», а реальная — после СПП, акций, комиссии и логистики."}),e.jsx(A,{icon:e.jsx(Y,{className:"h-5 w-5"}),title:"Без переключений",text:"Столбец живёт прямо в стандартной таблице WB. Excel-выгрузки больше не нужны."})]})})]})}function p({label:s,hint:a,value:r,onChange:l,accent:n}){return e.jsxs("label",{className:"mt-3 flex cursor-pointer items-start gap-3",children:[e.jsx("button",{type:"button",onClick:()=>l(!r),className:`relative mt-0.5 h-5 w-9 shrink-0 rounded-full transition ${r?n?"bg-[#8A2BE2]":"bg-[#2a1b4a]":"bg-[#e2dcef]"}`,children:e.jsx("span",{className:`absolute top-0.5 h-4 w-4 rounded-full bg-white shadow transition ${r?"left-4":"left-0.5"}`})}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block text-[13px] font-medium text-[#2a1b4a]",children:s}),a&&e.jsx("span",{className:"mt-0.5 block text-[11px] text-[#9c8cbc]",children:a})]})]})}function v({icon:s,label:a,badge:r,tone:l}){return e.jsxs("li",{className:"flex items-center justify-between gap-2",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 text-[#2a1b4a]",children:[e.jsx("span",{className:"text-[#8A2BE2]",children:s}),a]}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ring-1 ${l==="ok"?"bg-emerald-50 text-emerald-700 ring-emerald-200":"bg-[#fff4d6] text-[#8a5a00] ring-[#ffe19a]"}`,children:r})]})}function k({active:s,children:a}){return e.jsxs("button",{className:`relative pb-3 text-[13px] ${s?"font-semibold text-[#2a1b4a]":"text-[#9c8cbc] hover:text-[#2a1b4a]"}`,children:[a,s&&e.jsx("span",{className:"absolute -bottom-px left-0 right-0 h-0.5 rounded-full bg-[#8A2BE2]"})]})}function h({children:s,caret:a}){return e.jsxs("button",{className:"inline-flex items-center gap-1 rounded-xl border border-black/10 bg-white px-3 py-1.5 text-[12px] font-medium text-[#2a1b4a] hover:bg-[#faf7ff]",children:[s,a&&e.jsx("span",{className:"text-[#9c8cbc]",children:"▾"})]})}function i({children:s,className:a="",tone:r,badge:l}){return e.jsx("th",{className:`px-3 pb-2 pt-3 align-bottom font-normal ${r==="brand"?"bg-[#f3eaff] text-[#8A2BE2]":""} ${a||"text-right"}`,children:e.jsxs("div",{className:"inline-flex items-center gap-1.5",children:[s,l&&e.jsx("span",{className:"rounded-full bg-[#8A2BE2] px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wider text-white",children:l})]})})}function b({children:s}){return e.jsx("td",{className:"px-3 py-3 text-right text-[#2a1b4a]",children:s})}function A({icon:s,title:a,text:r}){return e.jsxs("div",{className:"rounded-2xl border border-black/5 bg-white p-5 shadow-[0_8px_30px_-12px_rgba(42,27,74,0.15)]",children:[e.jsx("div",{className:"inline-flex h-10 w-10 items-center justify-center rounded-xl bg-[#f3eaff] text-[#8A2BE2]",children:s}),e.jsx("div",{className:"mt-3 text-[15px] font-semibold text-[#2a1b4a]",children:a}),e.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-[#6b5a8a]",children:r})]})}
1export{ce as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.