作业许可导出问题

This commit is contained in:
caoqianming 2020-12-15 17:37:14 +08:00
parent 167268be50
commit 889bf29dab
2 changed files with 7 additions and 2 deletions

View File

@ -166,7 +166,7 @@
}
function exportzyexcel() {
var querydata = $('#searchzyff').serializeJSON();
let url = 'api/operation?a=exportexcel'+parseParams(querydata)
let url = 'api/operation?a=exportexcel&'+ parseParams(querydata)
window.open(url);
}
function gbzy(){

View File

@ -5420,7 +5420,12 @@ def apioperation(req):
userid = req.session['userid']
usecomp = User.objects.get(userid=userid).usecomp
a = Operation.objects.filter(
usecomp=usecomp, deletemark=1).order_by('-submittime')
usecomp=usecomp, deletemark=1)
if req.GET.get('qssj', None):
a = a.filter(kssj__gte=req.GET.get('qssj'))
if req.GET.get('jssj', None):
a = a.filter(jssj__lte=req.GET.get('jssj'))
a = a.order_by('-submittime')
res = exportxlsx('zy', a)
return res
elif a == 'listtodo':