ghbdtn/index.html

97 lines
3.6 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>Sap</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="app">
<header class="header">
<h1>📊 Sap</h1>
<div class="stats" id="stats"></div>
</header>
<div class="toolbar">
<input type="text" id="search" placeholder="🔍 Поиск..." class="search">
<button class="btn btn-primary" onclick="openForm()">+ Добавить</button>
<button class="btn btn-outline" onclick="exportCsv()">📥 Выгрузить Excel</button>
</div>
<div class="table-wrap">
<table id="table">
<thead>
<tr>
<th>Город</th>
<th>Сумма</th>
<th>Дата</th>
<th>Раздел для файла</th>
<th>ФИО</th>
<th>Раздел для документов</th>
<th>Платёж</th>
<th></th>
</tr>
</thead>
<tbody id="tbody"></tbody>
</table>
</div>
<div class="empty" id="empty" style="display:none">Нет записей</div>
<div class="modal-overlay" id="modal" style="display:none">
<div class="modal">
<h2 id="formTitle">Новая запись</h2>
<form id="form" onsubmit="saveItem(event)">
<input type="hidden" id="editId">
<div class="field">
<label>Город</label>
<input name="city" required placeholder="Город">
</div>
<div class="field">
<label>Сумма</label>
<input name="summa" type="number" step="0.01" required placeholder="0.00">
</div>
<div class="field">
<label>Дата</label>
<input name="date" type="date" required>
</div>
<div class="field">
<label>Раздел для файла 📎</label>
<input name="fileSection" required placeholder="Название раздела">
<input type="file" name="fileAttachment" accept=".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif">
<div class="file-preview" id="previewFile"></div>
</div>
<div class="field">
<label>ФИО</label>
<input name="fio" required placeholder="ФИО">
</div>
<div class="field">
<label>Раздел для документов 📎</label>
<input name="docSection" required placeholder="Название раздела">
<input type="file" name="docAttachment" accept=".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif">
<div class="file-preview" id="previewDoc"></div>
</div>
<div class="field">
<label>Платёж 📎</label>
<select name="payment" required>
<option value="">— Выберите —</option>
<option value="оплачено">💰 Оплачено</option>
<option value="в ожидании">⏳ В ожидании</option>
<option value="не оплачено">❌ Не оплачено</option>
</select>
<input type="file" name="paymentAttachment" accept=".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif">
<div class="file-preview" id="previewPayment"></div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Сохранить</button>
<button type="button" class="btn btn-outline" onclick="closeForm()">Отмена</button>
</div>
</form>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>