feat: handover_revert尝试支持全部撤回
This commit is contained in:
parent
a6d53471fc
commit
c4cde1c5ea
|
@ -918,12 +918,12 @@ def handover_submit(handover:Handover, user: User, now: Union[datetime.datetime,
|
||||||
def handover_revert(handover:Handover):
|
def handover_revert(handover:Handover):
|
||||||
if handover.submit_time is None:
|
if handover.submit_time is None:
|
||||||
raise ParseError('该交接单未提交!')
|
raise ParseError('该交接单未提交!')
|
||||||
handover_type = handover.type
|
# handover_type = handover.type
|
||||||
handover_mtype = handover.mtype
|
# handover_mtype = handover.mtype
|
||||||
if handover_type in [Handover.H_NORMAL, Handover.H_REPAIR] and handover_mtype == Handover.H_NORMAL:
|
# if handover_type in [Handover.H_NORMAL, Handover.H_REPAIR] and handover_mtype == Handover.H_NORMAL:
|
||||||
pass
|
# pass
|
||||||
else:
|
# else:
|
||||||
raise ParseError('该交接单不支持撤销!')
|
# raise ParseError('该交接单不支持撤销!')
|
||||||
handoverb_qs = Handoverb.objects.filter(handover=handover)
|
handoverb_qs = Handoverb.objects.filter(handover=handover)
|
||||||
material = handover.material
|
material = handover.material
|
||||||
for item in handoverb_qs:
|
for item in handoverb_qs:
|
||||||
|
|
Loading…
Reference in New Issue