feat: упростить создание заказов и рефакторинг единиц измерения

- Добавить inline-редактирование цен в списке товаров
- Оптимизировать карточки товаров в POS-терминале
- Рефакторинг моделей единиц измерения
- Миграция unit -> base_unit в SalesUnit
- Улучшить UI форм создания/редактирования товаров

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-17 03:34:43 +03:00
parent 928b340486
commit 2f1f0621e6
24 changed files with 1079 additions and 227 deletions

View File

@@ -16,7 +16,7 @@
<div class="pos-container">
<div class="row g-3" style="height: 100%;">
<!-- Products Grid (Left side - 8/12) -->
<div class="col-12 col-md-8" style="display: flex; flex-direction: column; height: 100%;">
<div class="col-12 col-md-7" style="display: flex; flex-direction: column; height: 100%;">
<!-- Search Box -->
<div class="mb-3">
<div class="input-group">
@@ -39,7 +39,7 @@
</div>
<!-- Right Panel (4/12) - Fixed -->
<div class="col-12 col-md-4">
<div class="col-12 col-md-5">
<div class="right-panel-fixed d-flex flex-column">
<!-- Информация о складе (всегда показываем блок для фиксированной позиции) -->
<div class="card mb-2">
@@ -67,11 +67,8 @@
<h6 class="mb-0">Корзина</h6>
<div class="d-flex gap-1 align-items-center">
<button class="btn btn-outline-primary btn-sm d-flex align-items-center" id="customerSelectBtn">
<i class="bi bi-person me-1"></i>
<div class="d-flex flex-column align-items-start lh-1">
<small class="text-muted" style="font-size: 0.65rem;">Клиент</small>
<span id="customerSelectBtnText" class="fw-semibold">Выбрать</span>
</div>
<i class="bi bi-person"></i>
<span id="customerSelectBtnText">Выбрать клиента</span>
</button>
<a href="#" id="customerProfileLink" class="btn btn-sm btn-outline-secondary" title="Открыть анкету клиента" target="_blank" style="display: none;">
<i class="bi bi-box-arrow-up-right"></i>
@@ -633,11 +630,8 @@
<!-- Цена -->
<div class="mb-3">
<label for="unitModalPrice" class="form-label">Цена за единицу</label>
<div class="input-group">
<span class="input-group-text"></span>
<input type="number" class="form-control" id="unitModalPrice"
<input type="number" class="form-control" id="unitModalPrice"
value="0" min="0" step="0.01">
</div>
<div id="priceOverrideIndicator" class="text-warning small mt-1" style="display: none;">
<i class="bi bi-exclamation-triangle"></i> Цена изменена
</div>