{% extends "base.html" %} {% block body_class %}handler-edit-page{% endblock %} {% block content %} {% if not modal %}

Обработка товара

Изменения сохраняются при следующих загрузках XLSX и попадают в журнал.

Вернуться к списку
{% include "_defect_nav.html" %} {% endif %} {% if msg %}
{{ msg }}
{% endif %} {% if error %}
{{ error }}
{% endif %}
{% set image_code = product_image_code(event.external_unit_key) %}{% include "_product_image.html" %}Фото нового товара для ориентира

{{ event.external_name }}

{% if modal %}Полная карточка{% endif %} {{ processing_labels[event.completion_status] }}
Ключ: {{ event.external_unit_key or 'не распознан' }} · источник: {{ 'приложение' if event.source_origin == 'local_app' else 'строка Google ' ~ event.source_row }}
{% if event.source_warehouse %}
Склад при регистрации: {{ event.source_warehouse }}
{% endif %}
Себестоимость: {{ '%.2f'|format(event.unit_cost) ~ ' руб.' if event.unit_cost is not none else 'не указана' }} · Поставщик: {{ event.supplier_name or 'не указан' }}
Связь: {{ match_labels[event.match_status] }}
Текущий менеджер остатка: {{ event.current_manager or '—' }}
{% if event.processor or event.processed_at %}
История: {{ event.processor or 'обработчик не указан' }}{% if event.processed_at %}, {{ event.processed_at.strftime('%d.%m.%Y %H:%M') }}{% endif %}
{% endif %} {% if event.manual_override_fields %}
Ручные поля: {{ event.manual_override_fields|join(', ') }}
{% endif %}
{% macro option_select(name, label, current, required=false) -%} {%- endmacro %} {% if can_edit_handler %}
{% if modal %}{% endif %}
Что заполняет сотрудник Для завершения нужны четыре поля со звёздочкой. Автор и время фиксируются сами. Неполную работу можно сохранить черновиком.
{% if can_manage_handler %}{% else %}{% endif %} {{ option_select('condition_name', 'Состояние', event.condition_name, true) }} {{ option_select('defect_type', 'Вид брака', event.defect_type, true) }} {{ option_select('work_type', 'Вид работы / результат', event.work_type, true) }} {{ option_select('factory_packaging', 'Заводская упаковка', event.factory_packaging) }} {{ option_select('completeness', 'Комплектация', event.completeness) }}
Дополнительные поля по ситуации

Заполняются, только если они относятся к товару и его дефекту.

{{ option_select('instruction_name', 'Инструкция', event.instruction_name) }} {{ option_select('manufacturer_warranty', 'ГТ производителя', event.manufacturer_warranty) }} {{ option_select('si_presence', 'Наличие СИ', event.si_presence) }} {{ option_select('missing_ukz_act', 'Акт об отсутствии УКЗ', event.missing_ukz_act) }} {{ option_select('ukz_condition', 'Состояние УКЗ', event.ukz_condition) }} {{ option_select('from_processing_cell', 'Товар из ячейки обработки', event.from_processing_cell) }}
{% if modal %}{% else %}Отмена{% endif %}

Фотографии осмотра

JPEG, PNG или WebP, до 8 МБ. На телефоне можно сразу открыть камеру.

{{ photos|length }} / 12
{% if photos %}
{% for photo in photos %}
Фото дефекта {{ loop.index }}
{{ photo.filename }}
{% endfor %}
{% endif %}
{% if event.workflow_status == 'draft' and event.source_origin == 'local_app' %}
Удаление черновика

Карточка исчезнет из работы, но в базе останется запись, кто и когда его удалил.

{% endif %} {% else %}
Карточка доступна только для просмотра или принадлежит другому обработчику.
{% endif %} {% if edit_history and not modal %}
Журнал изменений
{% for row in edit_history %}{% endfor %}
КогдаКтоИзменённые поля
{{ row.edited_at.strftime('%d.%m.%Y %H:%M') }}{{ row.edited_by_name }}{{ row.changed_fields|join(', ') }}
{% endif %} {% if unit_history and not modal %}
Предыдущие обработки этого экземпляра ({{ unit_history|length }})
{% for row in unit_history %}{% endfor %}
ДатаОбработчикСостояниеДефектРаботаСклад
{{ (row.completed_at or row.processed_at).strftime('%d.%m.%Y %H:%M') if (row.completed_at or row.processed_at) else 'Черновик' }}{{ row.processor or '—' }}{{ row.condition_name or '—' }}{{ row.defect_type or row.defect_description or '—' }}{{ row.work_type or '—' }}{{ row.source_warehouse or '—' }}Открыть
{% endif %} {% if modal %}{% endif %} {% endblock %}