813 lines
15 KiB
CSS
813 lines
15 KiB
CSS
/**
|
|
* Стили для формы подбора товаров
|
|
*/
|
|
|
|
/* Fullscreen modal for selection dialog */
|
|
.selection-dialog-wrapper .modal-dialog {
|
|
max-width: 100vw !important;
|
|
width: 100vw !important;
|
|
height: 100vh !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.selection-dialog-wrapper .modal-content {
|
|
height: 100vh !important;
|
|
border-radius: 0 !important;
|
|
border: none !important;
|
|
}
|
|
|
|
.selection-dialog-wrapper .modal-body {
|
|
padding: 15px !important;
|
|
overflow: hidden !important;
|
|
flex: 1 !important;
|
|
}
|
|
|
|
/* CRITICAL: Force frappe-control to full width */
|
|
.selection-dialog-wrapper .frappe-control {
|
|
width: 100% !important;
|
|
max-width: none !important;
|
|
}
|
|
|
|
.selection-dialog-wrapper .form-group {
|
|
width: 100% !important;
|
|
max-width: none !important;
|
|
}
|
|
|
|
/* 3-колоночный layout */
|
|
.selection-dialog-content {
|
|
display: flex;
|
|
gap: 20px;
|
|
height: calc(100vh - 130px);
|
|
min-height: 500px;
|
|
}
|
|
|
|
/* Левая колонка: Фильтры */
|
|
.selection-filters {
|
|
flex: 0 0 300px;
|
|
border-right: 1px solid var(--border-color);
|
|
padding-right: 15px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.filter-group {
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.filter-group label {
|
|
font-weight: 600;
|
|
margin-bottom: 5px;
|
|
display: block;
|
|
color: var(--text-color);
|
|
}
|
|
|
|
/* Переключатель "Только в наличии" */
|
|
.selection-stock-toggle {
|
|
padding: 8px 10px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
background-color: var(--bg-light-gray);
|
|
}
|
|
|
|
.stock-toggle-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-weight: 500;
|
|
margin: 0;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.stock-toggle-label input[type="checkbox"] {
|
|
width: 16px;
|
|
height: 16px;
|
|
cursor: pointer;
|
|
accent-color: var(--primary-color);
|
|
}
|
|
|
|
.stock-toggle-label input[type="checkbox"]:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.item-group-tree {
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
padding: 5px;
|
|
}
|
|
|
|
.tree-node {
|
|
padding: 4px 8px;
|
|
cursor: pointer;
|
|
border-radius: var(--border-radius);
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.tree-node:hover {
|
|
background-color: var(--bg-light-gray);
|
|
}
|
|
|
|
.tree-node.active {
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
.tree-node.active .tree-link {
|
|
color: white !important;
|
|
}
|
|
|
|
.tree-link {
|
|
text-decoration: none;
|
|
color: var(--text-color);
|
|
display: block;
|
|
}
|
|
|
|
.tree-link i {
|
|
margin-right: 5px;
|
|
width: 16px;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Средняя колонка: Товары */
|
|
.selection-items-column {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* Тулбар поиска (заменяет панель сортировки) */
|
|
.selection-sort-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 6px 10px;
|
|
background-color: var(--bg-light-gray);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
margin-bottom: 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.selection-search-icon {
|
|
color: var(--text-muted);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.selection-search-input-toolbar {
|
|
flex: 1;
|
|
font-size: 13px;
|
|
height: 30px;
|
|
padding: 4px 8px;
|
|
}
|
|
|
|
/* Ручки resize для панелей */
|
|
.resize-handle {
|
|
flex: 0 0 6px;
|
|
cursor: col-resize;
|
|
background: var(--border-color);
|
|
border-radius: 3px;
|
|
transition: background 0.15s;
|
|
align-self: stretch;
|
|
margin: 0 2px;
|
|
}
|
|
|
|
.resize-handle:hover,
|
|
.selection-resizing .resize-handle {
|
|
background: var(--primary-color);
|
|
}
|
|
|
|
/* Блокировать выделение текста во время drag */
|
|
body.selection-resizing {
|
|
user-select: none;
|
|
cursor: col-resize !important;
|
|
}
|
|
|
|
body.selection-resizing * {
|
|
cursor: col-resize !important;
|
|
}
|
|
|
|
.selection-items-grid {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
overflow-x: auto;
|
|
margin-bottom: 10px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
}
|
|
|
|
.selection-table {
|
|
margin-bottom: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
.selection-table thead th {
|
|
position: sticky;
|
|
top: 0;
|
|
background-color: var(--bg-color);
|
|
z-index: 10;
|
|
border-bottom: 2px solid var(--border-color);
|
|
white-space: nowrap;
|
|
padding: 8px;
|
|
}
|
|
|
|
/* Кликабельные заголовки для сортировки */
|
|
.sortable-header {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
transition: background-color 0.15s;
|
|
}
|
|
|
|
.sortable-header:hover {
|
|
background-color: var(--bg-light-gray) !important;
|
|
}
|
|
|
|
.sortable-header.sort-active {
|
|
background-color: #e8f0fe !important;
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.sortable-header i {
|
|
margin-left: 4px;
|
|
font-size: 11px;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.selection-table tbody tr {
|
|
cursor: pointer;
|
|
transition: background-color 0.1s;
|
|
}
|
|
|
|
.selection-table tbody tr:hover {
|
|
background-color: var(--bg-light-gray);
|
|
}
|
|
|
|
/* Выделение строки при клавиатурной навигации */
|
|
.selection-row-focused {
|
|
background-color: #dbeafe !important;
|
|
outline: 2px solid var(--primary-color);
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
/* Изображения товаров */
|
|
.item-image-cell {
|
|
width: 50px;
|
|
padding: 4px !important;
|
|
text-align: center;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.item-thumbnail {
|
|
width: 44px;
|
|
height: 44px;
|
|
object-fit: cover;
|
|
border-radius: 4px;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.item-thumbnail-placeholder {
|
|
width: 44px;
|
|
height: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
background-color: var(--bg-light-gray);
|
|
color: var(--text-muted);
|
|
font-size: 18px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
/* Поле qty и кнопка в строке товара */
|
|
.action-cell {
|
|
white-space: nowrap;
|
|
width: 140px;
|
|
}
|
|
|
|
.row-action-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.row-qty-input {
|
|
width: 65px !important;
|
|
text-align: center;
|
|
padding: 4px 6px !important;
|
|
}
|
|
|
|
.btn-add-to-cart {
|
|
padding: 4px 8px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
/* Stock indicators */
|
|
.stock-indicator {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 3px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
cursor: pointer;
|
|
transition: opacity 0.15s;
|
|
}
|
|
|
|
.stock-indicator:hover {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.stock-indicator.in-stock {
|
|
background-color: #d4edda;
|
|
color: #155724;
|
|
}
|
|
|
|
.stock-indicator.low-stock {
|
|
background-color: #fff3cd;
|
|
color: #856404;
|
|
}
|
|
|
|
.stock-indicator.out-of-stock {
|
|
background-color: #f8d7da;
|
|
color: #721c24;
|
|
}
|
|
|
|
/* Tooltip остатков по складам */
|
|
.stock-warehouses-tooltip {
|
|
position: fixed;
|
|
z-index: 9999;
|
|
background: white;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
padding: 10px 14px;
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
|
|
font-size: 13px;
|
|
min-width: 220px;
|
|
max-width: 320px;
|
|
}
|
|
|
|
.stock-warehouses-tooltip strong {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
padding-bottom: 6px;
|
|
}
|
|
|
|
.stock-tooltip-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.stock-tooltip-table td {
|
|
padding: 3px 6px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.stock-tooltip-table tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.stock-tooltip-qty {
|
|
text-align: right;
|
|
font-weight: 600;
|
|
padding: 2px 6px !important;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
/* Пагинация */
|
|
.selection-pagination {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 10px;
|
|
background-color: var(--bg-light-gray);
|
|
border-radius: var(--border-radius);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.pagination-info {
|
|
font-size: 13px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Правая колонка: Корзина */
|
|
.selection-cart {
|
|
flex: 0 0 290px;
|
|
border-left: 1px solid var(--border-color);
|
|
padding-left: 15px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.cart-header {
|
|
padding: 10px;
|
|
background-color: var(--bg-light-gray);
|
|
border-radius: var(--border-radius);
|
|
margin-bottom: 10px;
|
|
text-align: center;
|
|
}
|
|
|
|
.cart-count {
|
|
display: inline-block;
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
padding: 2px 8px;
|
|
border-radius: 10px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
min-width: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.cart-items-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
/* Cart item */
|
|
.cart-item {
|
|
padding: 10px;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
margin-bottom: 10px;
|
|
background-color: var(--bg-color);
|
|
transition: box-shadow 0.2s;
|
|
}
|
|
|
|
.cart-item:hover {
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.cart-item-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.cart-item-header strong {
|
|
flex: 1;
|
|
font-size: 13px;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.cart-item-details {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.cart-item-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.cart-field-label {
|
|
font-size: 11px;
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
min-width: 40px;
|
|
margin: 0;
|
|
}
|
|
|
|
.cart-item-qty {
|
|
text-align: center;
|
|
}
|
|
|
|
.cart-item-discount {
|
|
width: 65px !important;
|
|
text-align: center;
|
|
padding: 3px 6px !important;
|
|
}
|
|
|
|
.cart-item-price {
|
|
margin-top: 6px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.cart-item-price strong {
|
|
color: var(--text-color);
|
|
}
|
|
|
|
/* Зачёркнутая цена при скидке */
|
|
.line-through {
|
|
text-decoration: line-through;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
/* Предупреждение превышения остатка */
|
|
.stock-warning {
|
|
margin-top: 5px;
|
|
padding: 3px 8px;
|
|
background-color: #fff3cd;
|
|
color: #856404;
|
|
border-radius: 3px;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.stock-warning i {
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.btn-remove-from-cart {
|
|
padding: 2px 6px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.cart-footer {
|
|
padding: 10px;
|
|
background-color: var(--bg-light-gray);
|
|
border-radius: var(--border-radius);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.cart-total {
|
|
font-size: 16px;
|
|
margin-bottom: 10px;
|
|
text-align: center;
|
|
}
|
|
|
|
.cart-total strong {
|
|
display: block;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.cart-total span {
|
|
color: var(--primary-color);
|
|
font-weight: 600;
|
|
font-size: 18px;
|
|
}
|
|
|
|
/* ── Произвольные фильтры ─────────────────────────────────────────────── */
|
|
|
|
.custom-filter-row {
|
|
display: flex;
|
|
gap: 4px;
|
|
align-items: center;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.cf-field {
|
|
flex: 1.5;
|
|
font-size: 12px;
|
|
padding: 3px 6px;
|
|
height: auto;
|
|
min-width: 0;
|
|
}
|
|
|
|
.cf-operator {
|
|
flex: 1;
|
|
font-size: 12px;
|
|
padding: 3px 6px;
|
|
height: auto;
|
|
min-width: 0;
|
|
}
|
|
|
|
.cf-value {
|
|
flex: 1.5;
|
|
font-size: 12px;
|
|
padding: 3px 6px;
|
|
height: auto;
|
|
min-width: 0;
|
|
}
|
|
|
|
.cf-remove {
|
|
flex-shrink: 0;
|
|
padding: 2px 6px;
|
|
}
|
|
|
|
.btn-add-custom-filter {
|
|
font-size: 12px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* Link-контролы в строках кастомных фильтров */
|
|
.cf-value-link-wrapper {
|
|
flex: 1.5;
|
|
min-width: 0;
|
|
}
|
|
|
|
.cf-value-link-wrapper .frappe-control {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.cf-value-link-wrapper .form-group {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.cf-value-link-wrapper input.form-control {
|
|
font-size: 12px;
|
|
padding: 3px 6px;
|
|
height: auto;
|
|
}
|
|
|
|
/* Link-контролы для склада и прайса в левой панели */
|
|
#selection-warehouse-link .frappe-control,
|
|
#selection-pricelist-link .frappe-control {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
#selection-warehouse-link .form-group,
|
|
#selection-pricelist-link .form-group {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* ── Инфо-панель ──────────────────────────────────────────────────────── */
|
|
|
|
.selection-info-panel {
|
|
flex: 0 0 auto;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: var(--border-radius);
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-shrink: 0;
|
|
margin-top: 8px;
|
|
min-height: 160px;
|
|
}
|
|
|
|
.info-panel-header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
padding: 6px 10px;
|
|
background-color: var(--bg-light-gray);
|
|
border-bottom: 1px solid var(--border-color);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.info-panel-header-text {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.info-panel-header-text strong {
|
|
display: block;
|
|
font-size: 13px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.info-panel-header-text small {
|
|
display: block;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.info-panel-body {
|
|
display: flex;
|
|
padding: 8px;
|
|
gap: 10px;
|
|
}
|
|
|
|
.info-panel-image {
|
|
flex-shrink: 0;
|
|
width: 120px;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
}
|
|
|
|
.info-panel-image img {
|
|
width: 120px;
|
|
height: 120px;
|
|
object-fit: cover;
|
|
border-radius: 4px;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.info-panel-no-image {
|
|
width: 120px;
|
|
height: 120px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
background: var(--bg-light-gray);
|
|
color: var(--text-muted);
|
|
font-size: 36px;
|
|
}
|
|
|
|
.info-panel-content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
min-width: 0;
|
|
}
|
|
|
|
.info-panel-description {
|
|
font-size: 13px;
|
|
max-height: 100px;
|
|
overflow-y: auto;
|
|
margin-bottom: 8px;
|
|
line-height: 1.4;
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.info-panel-stock-table {
|
|
width: 100%;
|
|
font-size: 14px;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.info-panel-stock-table th {
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
padding: 3px 6px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
text-align: left;
|
|
}
|
|
|
|
.info-panel-stock-table td {
|
|
padding: 3px 6px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.info-panel-stock-table tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* Адаптация для разных размеров экрана */
|
|
@media (max-width: 1400px) {
|
|
.selection-filters {
|
|
flex: 0 0 260px;
|
|
}
|
|
|
|
.selection-cart {
|
|
flex: 0 0 255px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 1200px) {
|
|
.selection-dialog-content {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.selection-filters,
|
|
.selection-cart {
|
|
flex: 0 0 auto;
|
|
border: none;
|
|
padding: 0;
|
|
}
|
|
|
|
.selection-filters {
|
|
border-bottom: 1px solid var(--border-color);
|
|
padding-bottom: 15px;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.selection-cart {
|
|
border-top: 1px solid var(--border-color);
|
|
padding-top: 15px;
|
|
margin-top: 15px;
|
|
}
|
|
}
|
|
|
|
/* Общие улучшения */
|
|
.selection-dialog-content .btn-primary {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.selection-dialog-content .form-control:focus {
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 0.2rem rgba(var(--primary-color-rgb), 0.25);
|
|
}
|
|
|
|
/* Scrollbar styling */
|
|
.selection-items-grid::-webkit-scrollbar,
|
|
.cart-items-list::-webkit-scrollbar,
|
|
.item-group-tree::-webkit-scrollbar,
|
|
.selection-filters::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.selection-items-grid::-webkit-scrollbar-track,
|
|
.cart-items-list::-webkit-scrollbar-track,
|
|
.item-group-tree::-webkit-scrollbar-track,
|
|
.selection-filters::-webkit-scrollbar-track {
|
|
background: var(--bg-light-gray);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.selection-items-grid::-webkit-scrollbar-thumb,
|
|
.cart-items-list::-webkit-scrollbar-thumb,
|
|
.item-group-tree::-webkit-scrollbar-thumb,
|
|
.selection-filters::-webkit-scrollbar-thumb {
|
|
background: var(--text-muted);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.selection-items-grid::-webkit-scrollbar-thumb:hover,
|
|
.cart-items-list::-webkit-scrollbar-thumb:hover,
|
|
.item-group-tree::-webkit-scrollbar-thumb:hover,
|
|
.selection-filters::-webkit-scrollbar-thumb:hover {
|
|
background: var(--text-color);
|
|
}
|