fix: move inspection action buttons above barcode input; split checked_at into date/time rows

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-05-19 14:53:00 +03:00
parent 73ce68b071
commit 062d6de913
2 changed files with 14 additions and 9 deletions

View File

@@ -312,6 +312,11 @@ createApp({
const d = new Date(dateStr);
return d.toLocaleTimeString('ru-RU', { hour: '2-digit', minute: '2-digit' });
},
formatDateOnly(dateStr) {
if (!dateStr) return '';
const d = new Date(dateStr);
return d.toLocaleDateString('ru-RU');
},
async loadEquipmentTypes() {
try {
this.equipmentTypes = await fetchJSON('/equipment-types/');

View File

@@ -666,6 +666,13 @@
</div>
</div>
<!-- Кнопки действий -->
<div class="d-flex flex-wrap gap-2 mb-3">
<button class="btn btn-primary" @click="refreshInspectionData">Обновить данные</button>
<button class="btn btn-success" @click="completeInspection">Завершить проверку</button>
<button class="btn btn-secondary" @click="cancelInspection">Отменить</button>
</div>
<!-- Поле для сканирования -->
<div class="mb-3">
<label class="form-label">Сканируйте штрихкод или введите инв. номер</label>
@@ -688,13 +695,6 @@
</div>
</div>
<!-- Кнопки действий -->
<div class="d-flex flex-wrap gap-2 mt-3 mb-4">
<button class="btn btn-primary" @click="refreshInspectionData">Обновить данные</button>
<button class="btn btn-success" @click="completeInspection">Завершить проверку</button>
<button class="btn btn-secondary" @click="cancelInspection">Отменить</button>
</div>
<!-- Таблица проверенного оборудования (в реальном времени) -->
<h5 class="mt-4">Проверенное оборудование</h5>
<div class="table-responsive">
@@ -712,7 +712,7 @@
<td>{{ rec.oborud?.invNumber }}</td>
<td>{{ rec.oborud?.nazvanie }}</td>
<td>{{ getAuditoryName(rec.oborud?.aud_id) }}</td>
<td>{{ formatDate(rec.checked_at) }}</td>
<td><div>{{ formatDateOnly(rec.checked_at) }}</div><div>{{ formatTime(rec.checked_at) }}</div></td>
</tr>
</tbody>
</table>
@@ -735,6 +735,6 @@
<script src="/app/vue.global.prod.js"></script>
<script src="/app/bootstrap.bundle.min.js"></script>
<script src="/app/app.js?v=3" defer></script>
<script src="/app/app.js?v=4" defer></script>
</body>
</html>