提交 acc7d5b9 authored 作者: 张颂恩's avatar 张颂恩

优化

上级 e24a4d5c
......@@ -5697,11 +5697,11 @@ def do_hexiao(request):
if len(hexiao_id) > 20 :
data['e'] = '一次最多核销20个'
return JsonResponse(data)
agent = Company.objects.get(id=int(agent_id))
hxs = HeXiao_Record.objects.filter(id__in=hexiao_id)
for hx in hxs:
if hx.is_need_agent_writeoff:
if not hx.is_agent_writeoff:
agent = Company.objects.get(id=int(agent_id))
if hx.agent_id != agent.id:
award = hx.award
consumer = hx.consumer
......@@ -5739,11 +5739,11 @@ def do_hexiao(request):
else:
data['award'] = [award.name]
else:
data['e'] = '无核销权限'
data['e'] = data['e'] + f'id:{str(hx.id)}无核销权限;'
else:
data['e'] = '奖品已被核销'
data['e'] = data['e'] + f'id:{str(hx.id)}奖品已被核销;'
else:
data['e'] = '奖品不需要核销'
data['e'] = data['e'] + f'id:{str(hx.id)}奖品不需要核销;'
return JsonResponse(data)
if c:
vs = VoidLabel.objects.filter(label_code=c.label_code)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论