ya-aliya-soprovozhdayu-dogov/index.html

393 lines
21 KiB
HTML
Raw 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" data-theme="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Алия — Сопровождение договоров</title>
<link rel="stylesheet" href="design-system/kt-ai-fonts.css">
<link rel="stylesheet" href="design-system/kt-ai-tokens.css">
<link rel="stylesheet" href="design-system/kt-ai-components.css">
<link rel="stylesheet" href="design-system/kt-ai-page.css">
<style>
a.kt-ai-btn { text-decoration: none; }
.search-box { position: relative; max-width: 720px; margin: 0 auto; }
.search-input { width: 100%; padding: var(--kt-ai-space-4) var(--kt-ai-space-5); font-size: var(--kt-ai-text-lg); border: 2px solid var(--kt-ai-border); border-radius: var(--kt-ai-radius-2xl); background: var(--kt-ai-bg); color: var(--kt-ai-fg); }
.search-input:focus { outline: none; border-color: var(--kt-ai-primary); }
.search-icon { position: absolute; right: var(--kt-ai-space-4); top: 50%; transform: translateY(-50%); color: var(--kt-ai-fg-muted); }
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--kt-ai-space-5); margin-top: var(--kt-ai-space-8); }
.qa-card { cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.qa-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.qa-card[data-expanded="true"] { grid-column: 1 / -1; }
.qa-answer { display: none; margin-top: var(--kt-ai-space-4); padding-top: var(--kt-ai-space-4); border-top: 1px solid var(--kt-ai-border); }
.qa-card[data-expanded="true"] .qa-answer { display: block; }
.step-list { counter-reset: step; list-style: none; padding: 0; }
.step-list li { position: relative; padding-left: var(--kt-ai-space-10); margin-bottom: var(--kt-ai-space-3); }
.step-list li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; background: var(--kt-ai-primary); color: var(--kt-ai-bg); border-radius: var(--kt-ai-radius-full); text-align: center; line-height: 28px; font-size: var(--kt-ai-text-sm); font-weight: var(--kt-ai-weight-semibold); }
.link-hint { color: var(--kt-ai-link); font-size: var(--kt-ai-text-sm); }
.empty-state { text-align: center; padding: var(--kt-ai-space-12) var(--kt-ai-space-6); color: var(--kt-ai-fg-muted); }
.category-filter { display: flex; flex-wrap: wrap; gap: var(--kt-ai-space-2); justify-content: center; margin-top: var(--kt-ai-space-6); }
.filter-chip { cursor: pointer; }
.filter-chip[data-active="true"] { data-tone: "primary"; }
.add-question-form { max-width: 600px; margin: var(--kt-ai-space-8) auto; display: none; }
.add-question-form[data-visible="true"] { display: block; }
.tabs { display: flex; gap: var(--kt-ai-space-2); border-bottom: 1px solid var(--kt-ai-border); margin-bottom: var(--kt-ai-space-6); }
.tab { padding: var(--kt-ai-space-3) var(--kt-ai-space-4); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--kt-ai-fg-muted); }
.tab[data-active="true"] { border-bottom-color: var(--kt-ai-primary); color: var(--kt-ai-fg); font-weight: var(--kt-ai-weight-medium); }
.my-questions-list { margin-top: var(--kt-ai-space-4); }
.my-question-item { display: flex; justify-content: space-between; align-items: center; padding: var(--kt-ai-space-3) var(--kt-ai-space-4); border: 1px solid var(--kt-ai-border); border-radius: var(--kt-ai-radius-lg); margin-bottom: var(--kt-ai-space-2); }
.toast { position: fixed; bottom: var(--kt-ai-space-6); right: var(--kt-ai-space-6); background: var(--kt-ai-card-bg); border: 1px solid var(--kt-ai-border); padding: var(--kt-ai-space-4) var(--kt-ai-space-5); border-radius: var(--kt-ai-radius-xl); box-shadow: 0 8px 24px rgba(0,0,0,0.15); z-index: 1000; display: none; }
.toast[data-visible="true"] { display: block; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
</style>
</head>
<body class="kt-ai-app" data-kt-data-mode="demo">
<header class="kt-ai-pagehead">
<div class="kt-ai-wrap kt-ai-pagehead-in">
<div style="display:flex;align-items:center;gap:var(--kt-ai-space-3)">
<img src="https://code.vibe42.kz/tore/aitu/kt-logo.svg" alt="Казахтелеком" height="28">
<strong>Алия — Помощник по договорам</strong>
</div>
<span class="kt-ai-spacer"></span>
<span class="kt-ai-chip" data-tone="orange">Демо-данные</span>
<span class="kt-ai-spacer"></span>
<button class="kt-ai-btn" data-variant="ghost" id="btnMyQuestions">Мои вопросы</button>
<button class="kt-ai-btn" data-variant="primary" id="btnAddQuestion">Задать вопрос</button>
</div>
</header>
<main class="kt-ai-wrap" style="padding-top:var(--kt-ai-space-10);padding-bottom:var(--kt-ai-space-12)">
<section class="kt-ai-hero" data-align="center" style="padding:0;margin-bottom:var(--kt-ai-space-8)">
<h1>Помощник по сопровождению договоров</h1>
<p class="kt-ai-hero-sub" style="max-width:600px;margin:0 auto">
Задайте вопрос о создании заявок, согласовании договоров или поиске решений — получите понятные шаги с инструкциями
</p>
<div class="search-box" style="margin-top:var(--kt-ai-space-6)">
<input type="text" class="search-input" id="searchInput" placeholder="Например: как создать заявку в портале?">
<span class="search-icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.35-4.35"></path>
</svg>
</span>
</div>
</section>
<div class="category-filter" id="categoryFilter">
<span class="kt-ai-chip filter-chip" data-category="all" data-active="true">Все вопросы</span>
<span class="kt-ai-chip filter-chip" data-category="create">Создание заявки</span>
<span class="kt-ai-chip filter-chip" data-category="approve">Согласование</span>
<span class="kt-ai-chip filter-chip" data-category="find">Поиск решений</span>
<span class="kt-ai-chip filter-chip" data-category="other">Другое</span>
</div>
<div class="tabs" id="tabs" style="display:none">
<div class="tab" data-tab="all" data-active="true">База знаний</div>
<div class="tab" data-tab="my">Мои вопросы</div>
</div>
<div id="emptyState" class="empty-state" style="display:none">
<svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="var(--kt-ai-fg-faint)" stroke-width="1.5" style="margin-bottom:var(--kt-ai-space-4)">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.35-4.35"></path>
</svg>
<h3 style="color:var(--kt-ai-fg);margin-bottom:var(--kt-ai-space-2)">Ничего не найдено</h3>
<p>Попробуйте изменить поисковый запрос или категорию</p>
</div>
<div class="qa-grid" id="qaGrid"></div>
<form class="add-question-form kt-ai-card" id="addQuestionForm" style="padding:var(--kt-ai-space-6)">
<h2 style="margin-bottom:var(--kt-ai-space-4)">Новый вопрос</h2>
<div class="kt-ai-field" style="margin-bottom:var(--kt-ai-space-4)">
<label for="questionTitle">Ваш вопрос</label>
<input type="text" class="kt-ai-input" id="questionTitle" required placeholder="Кратко сформулируйте вопрос">
</div>
<div class="kt-ai-field" style="margin-bottom:var(--kt-ai-space-4)">
<label for="questionCategory">Категория</label>
<select class="kt-ai-select" id="questionCategory">
<option value="create">Создание заявки</option>
<option value="approve">Согласование</option>
<option value="find">Поиск решений</option>
<option value="other">Другое</option>
</select>
</div>
<div class="kt-ai-field" style="margin-bottom:var(--kt-ai-space-4)">
<label for="questionDetails">Подробности (необязательно)</label>
<textarea class="kt-ai-textarea" id="questionDetails" rows="4" placeholder="Опишите вашу ситуацию подробнее"></textarea>
</div>
<div style="display:flex;gap:var(--kt-ai-space-3)">
<button type="submit" class="kt-ai-btn" data-variant="primary">Отправить вопрос</button>
<button type="button" class="kt-ai-btn" data-variant="ghost" id="btnCancelAdd">Отмена</button>
</div>
</form>
<div class="my-questions-list" id="myQuestionsList" style="display:none"></div>
</main>
<footer class="kt-ai-wrap kt-ai-pagefoot">
<span>© 2026 Казахтелеком — Помощник по договорам</span>
<span class="kt-ai-spacer"></span>
<span style="color:var(--kt-ai-fg-muted)">База знаний для сотрудников</span>
</footer>
<div class="toast" id="toast"></div>
<script>
// === Демо-данные: база знаний ===
const DEMO_DATA = [
{
id: 1,
category: 'create',
question: 'Как создать заявку в портале?',
answer: '<ol class="step-list"><li>Войдите в портал по ссылке <a href="#" class="link-hint">portal.kazakhtelecom.kz</a></li><li>Нажмите кнопку «Создать заявку» в верхнем меню</li><li>Заполните обязательные поля: тип договора, контрагент, сумма</li><li>Прикрепите скан-копии документов</li><li>Нажмите «Отправить на согласование»</li></ol><p class="link-hint" style="margin-top:var(--kt-ai-space-3)">📄 <a href="#">Полная инструкция (PDF, 2.4 МБ)</a></p>',
link: 'portal.kazakhtelecom.kz/new'
},
{
id: 2,
category: 'create',
question: 'Какие документы нужны для создания заявки?',
answer: '<ol class="step-list"><li>Устав контрагента (действующая редакция)</li><li>Свидетельство о регистрации (ОГРН)</li><li>Приказ о назначении руководителя</li><li>Доверенность (если подписывает не руководитель)</li><li>Коммерческое предложение или счёт</li></ol><p class="link-hint" style="margin-top:var(--kt-ai-space-3)">📄 <a href="#">Чек-лист документов (PDF)</a></p>',
link: null
},
{
id: 3,
category: 'approve',
question: 'Кого добавить в согласование?',
answer: '<ol class="step-list"><li>Руководитель вашего департамента (обязательно)</li><li>Юридический департамент — для договоров свыше 1 млн ₸</li><li>Финансовый департамент — если есть оплата</li><li>Департамент безопасности — для доступа к инфраструктуре</li></ol><p style="margin-top:var(--kt-ai-space-3);color:var(--kt-ai-fg-muted)">Маршрут согласования формируется автоматически по сумме и типу договора.</p>',
link: null
},
{
id: 4,
category: 'approve',
question: 'Сколько времени занимает согласование?',
answer: '<p>Нормативные сроки:</p><ul class="step-list"><li>До 500 тыс. ₸ — 3 рабочих дня</li><li>От 500 тыс. до 5 млн ₸ — 5 рабочих дней</li><li>Свыше 5 млн ₸ — 10 рабочих дней</li></ul><p class="link-hint" style="margin-top:var(--kt-ai-space-3)">⏱ <a href="#">Отследить статус заявки</a></p>',
link: 'portal.kazakhtelecom.kz/status'
},
{
id: 5,
category: 'find',
question: 'Где найти решение по договору?',
answer: '<ol class="step-list"><li>Откройте портал в разделе «Мои заявки»</li><li>Найдите нужный договор по номеру или названию</li><li>Кликните на строку заявки</li><li>Перейдите на вкладку «Решения»</li><li>Скачайте файл с подписью и печатью</li></ol><p class="link-hint" style="margin-top:var(--kt-ai-space-3)">📂 <a href="#">Перейти к моим заявкам</a></p>',
link: 'portal.kazakhtelecom.kz/my'
},
{
id: 6,
category: 'find',
question: 'Как посмотреть историю изменений договора?',
answer: '<ol class="step-list"><li>Откройте карточку договора</li><li>Нажмите вкладку «История» вверху</li><li>Увидите все изменения с датами и авторами</li><li>Можно скачать любую версию документа</li></ol>',
link: null
},
{
id: 7,
category: 'other',
question: 'Что делать, если заявка возвращена на доработку?',
answer: '<ol class="step-list"><li>Откройте уведомление о возврате</li><li>Прочитайте комментарий согласующего</li><li>Исправьте замечания в заявке</li><li>Нажмите «Отправить повторно»</li></ol><p style="margin-top:var(--kt-ai-space-3);color:var(--kt-ai-fg-muted)">Заявка останется в том же маршруте согласования, срок обнулится.</p>',
link: null
},
{
id: 8,
category: 'other',
question: 'Как отозвать заявку на согласовании?',
answer: '<ol class="step-list"><li>Найдите заявку в разделе «Мои заявки»</li><li>Убедитесь, что статус «На согласовании»</li><li>Нажмите кнопку «Отозвать»</li><li>Укажите причину отзыва (обязательно)</li><li>Подтвердите отзыв</li></ol><p style="margin-top:var(--kt-ai-space-3);color:var(--kt-ai-fg-muted)">После отзыва заявка перейдёт в статус «Черновик».</p>',
link: null
}
];
// === Состояние приложения ===
let state = {
currentTab: 'all',
currentCategory: 'all',
searchQuery: '',
myQuestions: JSON.parse(localStorage.getItem('myQuestions') || '[]')
};
// === Инициализация ===
document.addEventListener('DOMContentLoaded', () => {
renderQA();
setupEventListeners();
});
// === Рендеринг карточек ===
function renderQA() {
const grid = document.getElementById('qaGrid');
const emptyState = document.getElementById('emptyState');
let data = DEMO_DATA;
// Фильтр по категории
if (state.currentCategory !== 'all') {
data = data.filter(q => q.category === state.currentCategory);
}
// Поиск
if (state.searchQuery) {
const query = state.searchQuery.toLowerCase();
data = data.filter(q =>
q.question.toLowerCase().includes(query) ||
q.answer.toLowerCase().includes(query)
);
}
if (data.length === 0) {
grid.innerHTML = '';
emptyState.style.display = 'block';
return;
}
emptyState.style.display = 'none';
grid.innerHTML = data.map(q => `
<div class="kt-ai-card qa-card" data-id="${q.id}" data-expanded="false" onclick="toggleCard(${q.id})">
<div style="display:flex;justify-content:space-between;align-items:flex-start;gap:var(--kt-ai-space-3)">
<h3 style="margin:0;color:var(--kt-ai-fg)">${q.question}</h3>
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="var(--kt-ai-fg-muted)" stroke-width="2" style="flex-shrink:0;transition:transform 0.3s" class="chevron">
<path d="m6 9 6 6 6-6"></path>
</svg>
</div>
<div class="qa-answer">
${q.answer}
</div>
</div>
`).join('');
}
// === Рендеринг моих вопросов ===
function renderMyQuestions() {
const list = document.getElementById('myQuestionsList');
if (state.myQuestions.length === 0) {
list.innerHTML = '<div class="empty-state"><p style="color:var(--kt-ai-fg-muted)">Вы ещё не задали ни одного вопроса</p></div>';
return;
}
list.innerHTML = state.myQuestions.map((q, idx) => `
<div class="my-question-item">
<div>
<strong style="color:var(--kt-ai-fg)">${q.title}</strong>
<span class="kt-ai-chip" style="margin-left:var(--kt-ai-space-2)" data-tone="gray">${getCategoryName(q.category)}</span>
${q.details ? `<p style="color:var(--kt-ai-fg-muted);font-size:var(--kt-ai-text-sm);margin-top:var(--kt-ai-space-1)">${q.details}</p>` : ''}
</div>
<span class="kt-ai-chip" data-tone="orange">На рассмотрении</span>
</div>
`).join('');
}
function getCategoryName(cat) {
const names = { create: 'Создание', approve: 'Согласование', find: 'Поиск', other: 'Другое' };
return names[cat] || cat;
}
// === Переключение карточки ===
function toggleCard(id) {
const cards = document.querySelectorAll('.qa-card');
cards.forEach(card => {
if (parseInt(card.dataset.id) !== id) {
card.dataset.expanded = 'false';
} else {
card.dataset.expanded = card.dataset.expanded === 'true' ? 'false' : 'true';
}
});
}
// === Обработчики событий ===
function setupEventListeners() {
// Поиск
document.getElementById('searchInput').addEventListener('input', (e) => {
state.searchQuery = e.target.value;
renderQA();
});
// Фильтры категорий
document.querySelectorAll('.filter-chip').forEach(chip => {
chip.addEventListener('click', () => {
document.querySelectorAll('.filter-chip').forEach(c => c.dataset.active = 'false');
chip.dataset.active = 'true';
state.currentCategory = chip.dataset.category;
renderQA();
});
});
// Кнопка "Задать вопрос"
document.getElementById('btnAddQuestion').addEventListener('click', () => {
document.getElementById('addQuestionForm').dataset.visible = 'true';
document.getElementById('qaGrid').style.display = 'none';
document.getElementById('tabs').style.display = 'none';
});
// Отмена добавления
document.getElementById('btnCancelAdd').addEventListener('click', () => {
document.getElementById('addQuestionForm').dataset.visible = 'false';
document.getElementById('qaGrid').style.display = 'grid';
document.getElementById('tabs').style.display = 'flex';
});
// Отправка формы
document.getElementById('addQuestionForm').addEventListener('submit', (e) => {
e.preventDefault();
const title = document.getElementById('questionTitle').value;
const category = document.getElementById('questionCategory').value;
const details = document.getElementById('questionDetails').value;
state.myQuestions.push({ title, category, details, date: new Date().toISOString() });
localStorage.setItem('myQuestions', JSON.stringify(state.myQuestions));
document.getElementById('addQuestionForm').reset();
document.getElementById('addQuestionForm').dataset.visible = 'false';
document.getElementById('qaGrid').style.display = 'grid';
document.getElementById('tabs').style.display = 'flex';
showToast('Вопрос отправлен! Мы ответим в течение 2 рабочих дней');
renderMyQuestions();
});
// Кнопка "Мои вопросы"
document.getElementById('btnMyQuestions').addEventListener('click', () => {
state.currentTab = state.currentTab === 'my' ? 'all' : 'my';
updateTabs();
});
// Табы
document.querySelectorAll('.tab').forEach(tab => {
tab.addEventListener('click', () => {
state.currentTab = tab.dataset.tab;
updateTabs();
});
});
}
function updateTabs() {
const tabs = document.querySelectorAll('.tab');
tabs.forEach(t => t.dataset.active = t.dataset.tab === state.currentTab ? 'true' : 'false');
if (state.currentTab === 'all') {
document.getElementById('qaGrid').style.display = 'grid';
document.getElementById('myQuestionsList').style.display = 'none';
document.getElementById('categoryFilter').style.display = 'flex';
document.getElementById('searchInput').parentElement.style.display = 'block';
} else {
document.getElementById('qaGrid').style.display = 'none';
document.getElementById('myQuestionsList').style.display = 'block';
document.getElementById('categoryFilter').style.display = 'none';
document.getElementById('searchInput').parentElement.style.display = 'none';
renderMyQuestions();
}
}
function showToast(message) {
const toast = document.getElementById('toast');
toast.textContent = message;
toast.dataset.visible = 'true';
setTimeout(() => {
toast.dataset.visible = 'false';
}, 4000);
}
// Сделать функцию доступной глобально
window.toggleCard = toggleCard;
</script>
</body>
</html>