Открыл админу изделия, доработал списание
All checks were successful
Deploy MES Core / deploy (push) Successful in 10s
All checks were successful
Deploy MES Core / deploy (push) Successful in 10s
This commit is contained in:
@@ -91,6 +91,7 @@
|
||||
<th>Поступление</th>
|
||||
<th>Сделка</th>
|
||||
<th>Единица</th>
|
||||
<th>Размеры</th>
|
||||
<th>Доступно</th>
|
||||
<th data-sort="false">Использовано</th>
|
||||
</tr>
|
||||
@@ -107,6 +108,15 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ s }}</td>
|
||||
<td>
|
||||
{% if s.current_length and s.current_width %}
|
||||
{{ s.current_length|floatformat:"-g" }} × {{ s.current_width|floatformat:"-g" }} мм
|
||||
{% elif s.current_length %}
|
||||
{{ s.current_length|floatformat:"-g" }} мм
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ s.quantity }}</td>
|
||||
<td style="max-width:140px;">
|
||||
<input class="form-control form-control-sm border-secondary" name="consume_{{ s.id }}" placeholder="0" {% if not can_edit %}disabled{% endif %}>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
Здесь настраиваем и обслуживаем генерацию превью DXF (PNG) на сервере.
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card border-secondary mb-3">
|
||||
<div class="card-header border-secondary py-2">
|
||||
<strong>DXF</strong>
|
||||
@@ -70,8 +71,8 @@
|
||||
<button type="submit" class="btn btn-outline-warning" name="action" value="cancel_job">
|
||||
<i class="bi bi-stop-circle me-2"></i>Прервать
|
||||
</button>
|
||||
<button type="submit" class="btn btn-outline-secondary" name="action" value="clear_log">
|
||||
<i class="bi bi-eraser me-2"></i>Очистить лог
|
||||
<button type="submit" class="btn btn-outline-secondary" name="action" value="clear_dxf_job_log">
|
||||
<i class="bi bi-eraser me-2"></i>Очистить лог DXF
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -84,6 +85,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-secondary mb-3">
|
||||
<div class="card-header border-secondary py-2">
|
||||
<strong>Логи</strong>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="small text-muted mb-2">Файл: {{ log_path|default:"—" }}</div>
|
||||
<pre class="border border-secondary rounded p-2 mb-3" style="max-height: 260px; overflow:auto; white-space: pre-wrap;">{{ log_tail|default:"" }}</pre>
|
||||
<form method="post" class="d-flex gap-2">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-outline-secondary" name="action" value="refresh_log">
|
||||
<i class="bi bi-arrow-repeat me-2"></i>Обновить
|
||||
</button>
|
||||
<button type="submit" class="btn btn-outline-secondary" name="action" value="clear_log">
|
||||
<i class="bi bi-eraser me-2"></i>Очистить
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if messages %}
|
||||
<div class="mt-3">
|
||||
{% for message in messages %}
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
<button class="btn btn-sm btn-outline-secondary" onclick="window.print()">
|
||||
Печать
|
||||
</button>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'registry' %}?{{ request.GET.urlencode }}">
|
||||
Назад
|
||||
</a>
|
||||
<button class="btn btn-sm btn-outline-secondary" onclick="window.close()">
|
||||
Закрыть
|
||||
</button>
|
||||
<div class="ms-auto small text-muted">
|
||||
{{ printed_at|date:"d.m.Y H:i" }}
|
||||
</div>
|
||||
|
||||
@@ -268,10 +268,18 @@
|
||||
<label class="form-label small text-muted">Название</label>
|
||||
<input type="text" class="form-control border-secondary" id="categoryName">
|
||||
</div>
|
||||
<div class="mb-0">
|
||||
<div class="mb-3">
|
||||
<label class="form-label small text-muted">ГОСТ</label>
|
||||
<input type="text" class="form-control border-secondary" id="categoryGost">
|
||||
</div>
|
||||
<div class="mb-0">
|
||||
<label class="form-label small text-muted">Форма</label>
|
||||
<select class="form-select border-secondary" id="categoryFormFactor">
|
||||
<option value="sheet">Лист</option>
|
||||
<option value="bar">Прокат/хлыст</option>
|
||||
<option value="other" selected>Прочее</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer border-secondary">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Отмена</button>
|
||||
@@ -584,6 +592,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
id: categoryId.value,
|
||||
name: categoryName.value,
|
||||
gost_standard: categoryGost.value,
|
||||
form_factor: document.getElementById('categoryFormFactor') ? document.getElementById('categoryFormFactor').value : 'other',
|
||||
};
|
||||
const data = await postForm('{% url "material_category_upsert" %}', payload);
|
||||
upsertSelectOption(materialCategory, data.id, data.label);
|
||||
|
||||
@@ -45,10 +45,20 @@
|
||||
<div class="row g-3 mt-1">
|
||||
<div class="col-lg-4">
|
||||
<div class="small text-muted fw-bold mb-1">Списано</div>
|
||||
{% if card.consumed %}
|
||||
{% if card.report.consumptions.all %}
|
||||
<ul class="mb-0">
|
||||
{% for k,v in card.consumed.items %}
|
||||
<li>{{ k }}: {{ v }}</li>
|
||||
{% for c in card.report.consumptions.all %}
|
||||
{% if c.stock_item_id and c.stock_item.material_id %}
|
||||
<li>
|
||||
{{ c.stock_item.material.full_name|default:c.stock_item.material.name }}
|
||||
({% if c.stock_item.current_length and c.stock_item.current_width %}{{ c.stock_item.current_length|floatformat:"-g" }}×{{ c.stock_item.current_width|floatformat:"-g" }}{% elif c.stock_item.current_length %}{{ c.stock_item.current_length|floatformat:"-g" }}{% else %}—{% endif %})
|
||||
{{ c.quantity|floatformat:"-g" }} шт
|
||||
</li>
|
||||
{% elif c.material_id %}
|
||||
<li>{{ c.material }} {{ c.quantity|floatformat:"-g" }} шт</li>
|
||||
{% else %}
|
||||
<li>— {{ c.quantity|floatformat:"-g" }} шт</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
@@ -61,7 +71,7 @@
|
||||
{% if card.produced %}
|
||||
<ul class="mb-0">
|
||||
{% for k,v in card.produced.items %}
|
||||
<li>{{ k }}: {{ v }}</li>
|
||||
<li>{{ k }}: {{ v }} шт</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
@@ -70,11 +80,11 @@
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<div class="small text-muted fw-bold mb-1">ДО</div>
|
||||
<div class="small text-muted fw-bold mb-1">Остаток ДО</div>
|
||||
{% if card.remnants %}
|
||||
<ul class="mb-0">
|
||||
{% for k,v in card.remnants.items %}
|
||||
<li>{{ k }}: {{ v }}</li>
|
||||
<li>{{ k }}: {{ v }} шт</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user