Подправил интерфейс реестра, вывод на печать, добавил уборку станка из сменки
All checks were successful
Deploy MES Core / deploy (push) Successful in 12s
All checks were successful
Deploy MES Core / deploy (push) Successful in 12s
This commit is contained in:
@@ -509,7 +509,7 @@ class RegistryView(LoginRequiredMixin, ListView):
|
||||
it.fact_bar_class = 'bg-success' if it.status in ['done', 'partial'] else 'bg-warning'
|
||||
context['items'] = items
|
||||
|
||||
work_qs = WorkItem.objects.select_related('deal', 'entity', 'entity__planned_material', 'operation', 'machine', 'workshop')
|
||||
work_qs = WorkItem.objects.select_related('deal', 'deal__company', 'entity', 'entity__planned_material', 'operation', 'machine', 'workshop')
|
||||
|
||||
m_ids = [int(i) for i in self.request.GET.getlist('m_ids') if str(i).isdigit()]
|
||||
if m_ids:
|
||||
@@ -881,8 +881,9 @@ class WorkItemUpdateView(LoginRequiredMixin, View):
|
||||
wi.quantity_reported = qty_reported
|
||||
changed_fields.append('quantity_reported')
|
||||
|
||||
if machine_id is not None and role in ['admin', 'technologist', 'master']:
|
||||
wi.machine_id = machine_id
|
||||
if role in ['admin', 'technologist', 'master'] and 'machine_id' in request.POST:
|
||||
# Пустое значение из селекта «— без станка —» должно очищать привязку станка.
|
||||
wi.machine_id = (int(machine_id) if machine_id is not None else None)
|
||||
changed_fields.append('machine')
|
||||
|
||||
if date_raw and role in ['admin', 'technologist']:
|
||||
|
||||
Reference in New Issue
Block a user