分析报告bug

This commit is contained in:
caoqianming 2021-03-07 16:59:24 +08:00
parent 1d9b54a255
commit f21dd82c96
2 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,9 @@
$('#reportjy').val($('#jydiv').text())
function reportsubmit() {
var data = $('#reportff').serializeJSON();
var year = $('#year').combobox('getValue');
var month = $('#month').combobox('getValue');
var part = $('#part').combobox('getValue');
$.ajax({
type: "POST",
url: 'api/report?a=add&year='+year+'&month='+month+'&part='+part,

View File

@ -8057,6 +8057,7 @@ def apireport(req):
objs = objs.filter(part__partid=part)
else:
objs = objs.filter(part=User.objects.get(userid=userid).usecomp)
print(objs)
if objs.exists():
return JsonResponse({'code': 1, 'data': objs.values('id', 'cause', 'suggest')[0]})
else: