feat: 检验撤回test_date在count_notok时直接置空
This commit is contained in:
parent
458385c0f6
commit
0473be4d30
|
@ -268,8 +268,10 @@ class MIOItemViewSet(ListModelMixin, BulkCreateModelMixin, BulkDestroyModelMixin
|
|||
raise ParseError('该明细还未检验')
|
||||
if ins.count_notok > 0:
|
||||
InmService.update_mb_item(ins, 1, 'count_notok', mio.type, mio.belong_dept)
|
||||
ins.test_date = None
|
||||
ins.save()
|
||||
elif ins.count_notok == 0:
|
||||
pass
|
||||
ins.test_date = None
|
||||
ins.save()
|
||||
return Response()
|
||||
|
||||
@action(methods=['post'], detail=True, perms_map={'post': 'mioitem.test'}, serializer_class=MIOItemPurInTestSerializer)
|
||||
|
|
Loading…
Reference in New Issue