Files
smeta-web/static/norm-finder.html

220 lines
19 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Подбор норм — Инфосмета</title>
<style>
:root { color-scheme: light; --bg:#f4f2ee; --card:#fff; --text:#272824; --muted:#626760;
--line:#d8d9d2; --accent:#176c63; --bad:#a83c31; --warn:#fff5da; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:16px/1.48 system-ui,-apple-system,Arial,sans-serif; }
button,input,select { font:inherit; }
button { cursor:pointer; }
:focus-visible { outline:3px solid #65aba4; outline-offset:2px; }
a { color:var(--accent); }
.wrap { max-width:1600px; margin:auto; padding:24px clamp(16px,3vw,40px) 64px; }
header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:32px; }
.brand { font-weight:750; font-size:1.15rem; text-decoration:none; color:var(--text); }
h1 { font-size:clamp(2rem,4vw,3rem); line-height:1.1; margin:0 0 12px; }
h2 { font-size:1.35rem; margin:0 0 12px; }
h3 { font-size:1.05rem; margin:0 0 8px; }
p { margin:0 0 12px; }
.intro { max-width:760px; color:var(--muted); margin-bottom:22px; }
.panel,.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:20px; }
.search-row,.controls,.actions { display:flex; gap:10px; align-items:end; flex-wrap:wrap; }
label { display:grid; grid-template-columns:minmax(0,1fr); min-width:0; gap:5px;
font-size:.84rem; color:var(--muted); font-weight:600; }
input,select { min-height:42px; padding:8px 11px; color:var(--text); background:var(--card);
border:1px solid var(--line); border-radius:8px; max-width:100%; }
select { min-width:0; width:100%; }
#query { flex:1 1 330px; }
.search-row label:has(#query) { flex:1 1 330px; }
.primary,.secondary { min-height:42px; padding:8px 16px; border-radius:8px; font-weight:650; }
a.secondary { display:inline-flex; align-items:center; text-decoration:none; }
.primary { background:var(--accent); border:1px solid var(--accent); color:#fff; }
.secondary { background:var(--card); border:1px solid var(--line); color:var(--text); }
.small { min-height:34px; padding:5px 10px; font-size:.84rem; }
.examples { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:14px; color:var(--muted); font-size:.85rem; }
.examples button { border:0; border-bottom:1px dotted var(--accent); background:transparent; color:var(--accent); padding:0; }
.status { min-height:24px; margin:14px 0; color:var(--muted); }
.status.error { color:var(--bad); }
.results { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr)); gap:14px; }
.card { display:flex; flex-direction:column; gap:7px; }
.card-head { display:flex; align-items:start; justify-content:space-between; gap:12px; }
.code { color:var(--accent); font-weight:750; font-variant-numeric:tabular-nums; }
.badge { background:#e9f4f1; color:#155f56; padding:3px 8px; border-radius:999px; font-size:.72rem; white-space:nowrap; }
.meta,.hint { font-size:.82rem; color:var(--muted); }
.card .actions { margin-top:auto; padding-top:7px; }
.variant-list { display:grid; gap:5px; border-top:1px solid var(--line); padding-top:10px; }
.variant-row { display:flex; flex-wrap:wrap; gap:5px; align-items:start; }
.variant-option { flex:1 1 220px; text-align:left; border:1px solid var(--line); border-radius:8px;
background:var(--card); padding:8px 10px; color:var(--text); font-size:.84rem; }
.variant-option:hover,.variant-option:focus-visible { border-color:var(--accent); background:#e9f4f1; }
.section { margin-top:28px; }
.detail-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(270px,.8fr); gap:18px; }
.detail-grid > .panel { min-width:0; }
.list { margin:0; padding-left:20px; }
.scroll { max-width:100%; overflow:auto; }
table { border-collapse:collapse; width:100%; font-size:.86rem; }
th,td { border-bottom:1px solid var(--line); text-align:left; padding:8px; vertical-align:top; }
th { color:var(--muted); font-weight:650; }
.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.comparison { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.comparison .card { overflow-wrap:anywhere; }
.notice { background:var(--warn); border-radius:9px; padding:10px 12px; font-size:.86rem; }
.result-amount { font-size:1.5rem; font-weight:750; font-variant-numeric:tabular-nums; }
.draft-rows { display:grid; gap:9px; }
.draft-row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:10px 0;
border-bottom:1px solid var(--line); }
.draft-row .draft-name { flex:1 1 270px; }
.draft-row input { width:110px; }
.quote-controls label { min-width:140px; }
.quote-controls #qty { width:125px; }
.workspace { display:grid; grid-template-columns:minmax(230px,280px) minmax(0,1fr); gap:16px; align-items:start; }
.catalog-tree { max-height:72vh; overflow:auto; position:sticky; top:12px; }
.catalog-tree h2 { font-size:1.05rem; }
.tree-list { list-style:none; margin:0; padding:0 0 0 12px; border-left:1px solid var(--line); }
.tree-list button { width:100%; text-align:left; border:0; border-radius:5px; background:transparent;
padding:6px; color:var(--text); font-size:.84rem; line-height:1.3; }
.tree-arrow { display:inline-block; width:17px; color:#526569; }
.tree-root-toggle { width:100%; border:0; background:#e8f0f3; text-align:left;
padding:7px; font-size:.85rem; font-weight:650; }
.tree-list button:hover,.tree-list button[aria-current="true"] { background:#e9f4f1; color:var(--accent); }
.table-panel { min-width:0; }
.table-panel h2 { margin:0; }
.table-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.norm-scroll { max-width:100%; overflow-x:auto; }
.norm-table { min-width:1420px; table-layout:fixed; font-size:.78rem; line-height:1.28; }
.norm-table th,.norm-table td { border:1px solid #d9e0e2; padding:4px 6px; vertical-align:middle; }
.norm-table th { background:#eef2f4; position:sticky; top:0; z-index:1; }
.norm-table tr > :first-child { position:sticky; left:0; z-index:2; background:#fff; }
.norm-table thead th:first-child { z-index:3; background:#eef2f4; }
.norm-table .norm-family-row td:first-child { background:#e8f0f3; }
.norm-table .norm-section-heading td:first-child,
.norm-table .norm-tools-row td:first-child { background:#f7fafb; }
.norm-table .norm-tools-row td:first-child { position:static; }
.norm-table .norm-work-row td:first-child,
.norm-table .norm-resource-row td:first-child { background:#fbfcfc; }
.norm-table .norm-row:hover { background:#f2f7f7; }
.norm-table .norm-row td,.norm-table .norm-resource-row td,
.norm-table .norm-work-row td { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.norm-table .norm-family-row { background:#e8f0f3; font-weight:650; }
.norm-table .norm-family-row td { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.norm-table .norm-section-heading { background:#f7fafb; }
.norm-table .norm-section-heading td:nth-child(2) { text-decoration:underline; }
.norm-table .norm-work-row,.norm-table .norm-resource-row { background:#fbfcfc; }
.norm-table .norm-name { min-width:0; }
.norm-code-cell { white-space:nowrap; }
.norm-toggle { display:inline-grid; place-items:center; width:19px; height:19px;
padding:0; margin-right:2px; border:1px solid #89999b; border-radius:2px;
background:#fff; color:#526569; font-size:.84rem; line-height:1; vertical-align:middle; }
.norm-toggle:hover,.norm-toggle[aria-expanded="true"] { background:#dcebed; color:#164e57; }
.norm-code { margin-left:5px; font-variant-numeric:tabular-nums; }
.norm-tools-row td { background:#f7fafb; }
.norm-tools { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.norm-tools .secondary { min-height:26px; padding:2px 8px; font-size:.75rem; }
.norm-tools .variant-list { width:100%; }
.rate-panel { border:1px solid var(--line); border-radius:8px; padding:9px 12px; margin:4px 0 12px; }
.rate-panel summary { cursor:pointer; font-weight:650; }
.rate-panel[open] summary { margin-bottom:10px; }
.rate-panel label { max-width:620px; margin:12px 0; }
.rate-panel .scroll { margin:8px 0 14px; }
.rate-panel table { min-width:650px; }
.rate-panel th,.rate-panel td { border:1px solid var(--line); }
.rate-panel input { width:100%; min-width:88px; }
.table-scroll-hint { margin:2px 0 8px; }
.breadcrumb { color:var(--muted); font-size:.84rem; overflow-wrap:anywhere; }
.catalog-mobile { display:none; }
[hidden] { display:none !important; }
@media (max-width:760px) { .wrap { padding:18px 14px 40px; } header { margin-bottom:24px; }
.detail-grid,.comparison { grid-template-columns:minmax(0,1fr); } .panel,.card { padding:15px; }
.search-row > *, .controls > label { flex:1 1 100%; } .search-row button { width:100%; }
.quote-controls label { min-width:0; } .workspace { display:block; }
.catalog-mobile { display:block; margin-bottom:10px; }
.catalog-tree { position:static; max-height:45vh; margin-bottom:12px; }
.catalog-tree[hidden] { display:none !important; }
.norm-table { min-width:1420px; }
}
</style>
</head>
<body>
<main class="wrap">
<header><a class="brand" href="/">ИНФОСМЕТА</a><a href="/">Вернуться в чат</a></header>
<h1>Подбор норм</h1>
<p class="intro">Выберите сборник и раздел или найдите норму по шифру и названию. Раскройте строку, чтобы увидеть состав работ, ресурсы и источник.</p>
<div id="auth-notice" class="notice" hidden>Нормы можно искать без входа. Для расчёта по ценам и сохранения подборки <a href="/">войдите в Инфосмету</a>.</div>
<form id="search-form" class="panel">
<div class="search-row">
<label for="query">Работа или шифр<input id="query" type="search" maxlength="160" placeholder="Например, монтаж пожарного извещателя" required></label>
<label for="base">Нормативная база<select id="base" aria-label="Нормативная база"></select></label>
<label for="base-type">Сборник<select id="base-type" aria-label="Сборник"></select></label>
<button class="primary" type="submit">Найти нормы</button>
</div>
<div class="examples">Примеры: <button type="button" data-query="монтаж извещателя">монтаж извещателя</button>
<button type="button" data-query="устройство стяжки пола">устройство стяжки пола</button>
<button type="button" data-query="10-08-002-02">10-08-002-02</button></div>
</form>
<div id="status" class="status" role="status" aria-live="polite"></div>
<button id="catalog-mobile" class="secondary catalog-mobile" type="button" aria-controls="catalog-tree" aria-expanded="false">Разделы сборника</button>
<div class="workspace section">
<aside id="catalog-tree" class="panel catalog-tree"><h2>Разделы сборника</h2><div id="tree-root"></div></aside>
<section id="results-section" class="panel table-panel" aria-label="Нормы сборника">
<div class="table-heading"><h2 id="results-title">Нормы сборника</h2><span id="result-count" class="hint"></span></div>
<p id="breadcrumb" class="breadcrumb"></p>
<details id="rate-panel" class="rate-panel">
<summary>НР, СП и коэффициенты</summary>
<p class="hint">Ставки НР и СП зависят от вида работ. Выберите пункт загруженного справочника 812/пр и 774/пр; по одному номеру сборника ставка не назначается.</p>
<label for="rate-type">Вид работ для НР и СП<select id="rate-type"><option value="">Выберите вид работ</option></select></label>
<div class="scroll"><table><thead><tr><th>НР, код</th><th class="num">НР, %</th><th class="num">НР, % (МРК)</th><th class="num">НР, % (РКС)</th><th>СП, код</th><th class="num">СП, %</th></tr></thead><tbody><tr id="rate-values"><td>—</td><td class="num">—</td><td class="num">—</td><td class="num">—</td><td>—</td><td class="num">—</td></tr></tbody></table></div>
<p class="hint">Отдельные значения для МРК и РКС в загруженном справочнике отсутствуют. Коэффициенты к НР и СП указывайте только при наличии основания.</p>
<div class="scroll"><table><thead><tr><th>НР, К</th><th>СП, К</th></tr></thead><tbody><tr>
<td><input id="coef-nr" type="number" min="0.01" max="100" step="any" inputmode="decimal" aria-label="Коэффициент НР" placeholder="1,00"></td>
<td><input id="coef-sp" type="number" min="0.01" max="100" step="any" inputmode="decimal" aria-label="Коэффициент СП" placeholder="1,00"></td>
</tr></tbody></table></div>
<p class="hint">Коэффициенты задаются условиями проекта. Введите их вручную для справки: они не меняют базисные суммы таблицы.</p>
<div class="scroll"><table><thead><tr><th>ОТ</th><th>ЗТ</th><th>ЭМ</th><th>ОТм</th><th>ЗТм</th><th>МАТ</th></tr></thead><tbody><tr>
<td><input id="coef-ot" type="number" min="0.01" max="100" step="any" inputmode="decimal" aria-label="Коэффициент ОТ" placeholder="1,00"></td>
<td><input id="coef-zt" type="number" min="0.01" max="100" step="any" inputmode="decimal" aria-label="Коэффициент ЗТ" placeholder="1,00"></td>
<td><input id="coef-em" type="number" min="0.01" max="100" step="any" inputmode="decimal" aria-label="Коэффициент ЭМ" placeholder="1,00"></td>
<td><input id="coef-otm" type="number" min="0.01" max="100" step="any" inputmode="decimal" aria-label="Коэффициент ОТм" placeholder="1,00"></td>
<td><input id="coef-ztm" type="number" min="0.01" max="100" step="any" inputmode="decimal" aria-label="Коэффициент ЗТм" placeholder="1,00"></td>
<td><input id="coef-mat" type="number" min="0.01" max="100" step="any" inputmode="decimal" aria-label="Коэффициент МАТ" placeholder="1,00"></td>
</tr></tbody></table></div>
</details>
<p class="hint table-scroll-hint">Прокрутите таблицу вправо для разбивки затрат; шифр останется виден. ОТм входит в ЭМ. В ГЭСН указаны нормы расхода без готовой единичной цены. Суммы ФЕР-2020 — базис на 01.01.2000, не текущие цены.</p>
<div class="norm-scroll"><table class="norm-table"><colgroup><col style="width:13%"><col style="width:31%"><col style="width:9%"><col style="width:7%"><col style="width:8%"><col style="width:8%"><col style="width:8%"><col style="width:8%"><col style="width:8%"></colgroup><thead><tr><th>Шифр</th><th>Наименование</th><th>Ед. изм.</th><th class="num">Расход</th><th class="num">ПЗ, руб.</th><th class="num" title="Оплата труда рабочих">ОТ, руб.</th><th class="num" title="Эксплуатация машин">ЭМ, руб.</th><th class="num" title="Оплата труда машинистов входит в ЭМ, второй раз к ПЗ не прибавляется">ОТм, руб.</th><th class="num" title="Материалы">МАТ, руб.</th></tr></thead><tbody id="results"></tbody></table></div>
<div class="actions" style="margin-top:16px"><button id="more-results" type="button" class="secondary" hidden>Показать ещё нормы</button></div>
</section>
</div>
<section id="detail-section" class="section" hidden><div class="detail-grid">
<div class="panel"><h2 id="detail-title">Состав нормы</h2><div id="detail"></div></div>
<div class="panel" id="quote-panel"><h2>Предварительный расчёт</h2><p class="hint">Объём вводится в выбранной единице. Недостающие цены и затраты будут отмечены.</p>
<div class="controls quote-controls">
<label for="subject">Регион<select id="subject"></select></label>
<label for="zone">Ценовая зона<select id="zone"></select></label>
<label for="period">Квартал<select id="period"></select></label>
<label for="qty">Объём<input id="qty" type="number" min="0.000001" max="1000000" step="any" value="1"></label>
<label for="unit">Единица<select id="unit"></select></label>
</div>
<div class="actions" style="margin-top:16px"><button id="calc" type="button" class="primary">Рассчитать</button>
<button id="add-draft" type="button" class="secondary">Добавить в подборку</button>
<button id="to-chat" type="button" class="secondary">Открыть подборку в чате</button></div>
<div id="quote" style="margin-top:16px" aria-live="polite"></div>
</div>
</div></section>
<section id="draft-section" class="section panel" hidden>
<h2>Подборка работ</h2>
<p class="hint">Объёмы сохраняются по шифру и измерителю. Для расчёта всей подборки выберите регион, зону и квартал в карточке нормы выше.</p>
<div id="draft-positions" class="draft-rows"></div>
<div class="actions" style="margin-top:16px"><button id="draft-calc" type="button" class="primary">Рассчитать подборку</button>
<a id="draft-chat" class="secondary" href="/">Открыть в чате</a></div>
<div id="draft-result" aria-live="polite" style="margin-top:16px"></div>
</section>
<section id="compare-section" class="section" hidden><h2>Сравнение норм</h2><p id="compare-warning" class="notice" hidden></p>
<div id="comparison" class="comparison"></div></section>
</main>
<script src="/static/norm-finder.js?v=2026-12-04h" defer></script>
</body>
</html>