From f21dd82c966a00f052e4e5880aecd39754b6b21d Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sun, 7 Mar 2021 16:59:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E6=9E=90=E6=8A=A5=E5=91=8Abug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- safesite/templates/reportedit.html | 3 +++ safesite/views.py | 1 + 2 files changed, 4 insertions(+) diff --git a/safesite/templates/reportedit.html b/safesite/templates/reportedit.html index 22243781..77402c8d 100644 --- a/safesite/templates/reportedit.html +++ b/safesite/templates/reportedit.html @@ -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, diff --git a/safesite/views.py b/safesite/views.py index 65e42d82..3ea0a261 100644 --- a/safesite/views.py +++ b/safesite/views.py @@ -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: