From f381d692dd63a309d464d21e670e8b10106d0145 Mon Sep 17 00:00:00 2001 From: lokses Date: Wed, 7 Oct 2026 16:57:59 +0300 Subject: [PATCH] =?UTF-8?q?it=5Fmanager:=20=D0=BE=D0=B4=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=20=D0=BF=D0=B5=D1=87=D0=B0?= =?UTF-8?q?=D1=82=D0=B8=20=D1=8D=D1=82=D0=B8=D0=BA=D0=B5=D1=82=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=BF=D0=BE=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D1=83.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- static/assets/js/it-manager.js | 7 +++---- templates/pages/it-equipment-labels.html | 5 ++--- templates/pages/it-manager.html | 10 +++------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/static/assets/js/it-manager.js b/static/assets/js/it-manager.js index 8c43c66..997921f 100644 --- a/static/assets/js/it-manager.js +++ b/static/assets/js/it-manager.js @@ -151,13 +151,12 @@ function itBulkClearSelection() { itBulkUpdate(); } -function itEquipmentOpenLabels(codes) { +function itEquipmentOpenLabels() { var checked = Array.prototype.slice.call(document.querySelectorAll('.it-equip-check:checked')); if (!checked.length) return; var ids = checked.map(function (cb) { return cb.value; }); - var mode = codes || 'both'; - var url = '/it-manager/equipment/labels/?ids=' + encodeURIComponent(ids.join(',')) + - '&codes=' + encodeURIComponent(mode); + // Печать строго по сохранённому шаблону (все блоки из layout) + var url = '/it-manager/equipment/labels/?ids=' + encodeURIComponent(ids.join(',')); window.open(url, '_blank', 'noopener'); } diff --git a/templates/pages/it-equipment-labels.html b/templates/pages/it-equipment-labels.html index d4bdc1a..b987ce7 100644 --- a/templates/pages/it-equipment-labels.html +++ b/templates/pages/it-equipment-labels.html @@ -72,10 +72,9 @@ {% trans "Этикеток" %}: {{ labels|length }} · - {% if codes == 'qr' %}QR{% elif codes == 'ean' %}EAN-13{% else %}QR + EAN-13{% endif %} · - {{ template_width_mm }}×{{ template_height_mm }} {% trans "мм" %} + {% trans "по шаблону" %} {{ template_width_mm }}×{{ template_height_mm }} {% trans "мм" %} - {% trans "Шаблон" %} + {% trans "Редактировать шаблон" %} {% trans "К оборудованию" %}
diff --git a/templates/pages/it-manager.html b/templates/pages/it-manager.html index 10ac3f4..224fa0f 100644 --- a/templates/pages/it-manager.html +++ b/templates/pages/it-manager.html @@ -216,13 +216,7 @@ {% include "partials/it-equipment-assign-fields.html" with widget_id="bulk-assign" selected_target="" selected_location_id=None selected_employee_id=None require_target=True allow_empty=False %} - - - {% trans "Шаблон этикетки" %} + onclick="itEquipmentOpenLabels()">{% trans "Печать этикетки" %}
@@ -291,6 +285,8 @@ hx-get="/it-manager/?tab=equipment" hx-target="#main-content" hx-push-url="true" hx-indicator="#loader" class="btn btn-ghost" style="margin-bottom:0.05rem;">{% trans "Сбросить" %} {% endif %} + {% trans "Шаблон этикетки" %}