diff --git a/apps/wpm/filters.py b/apps/wpm/filters.py index 91a59c68..9bd1a6d0 100644 --- a/apps/wpm/filters.py +++ b/apps/wpm/filters.py @@ -37,6 +37,7 @@ class WMaterialFilter(filters.FilterSet): "material": ["exact", "in"], "material__type": ["exact", "in"], "material__process": ["exact", "in"], + "material__process__name": ["exact", "contains", "in"], "belong_dept": ["exact"], "belong_dept__name": ["exact", "in"], "batch": ["exact"], diff --git a/apps/wpm/views.py b/apps/wpm/views.py index 941aa779..695a5778 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -154,6 +154,8 @@ class MlogViewSet(CustomModelViewSet): @transaction.atomic def perform_update(self, serializer): ins = serializer.instance + if ins.submit_time is not None: + raise ParseError('该日志已提交!') val_old = MlogSerializer(instance=ins).data serializer.save() val_new = MlogSerializer(instance=ins).data