search bug
This commit is contained in:
parent
c5be9fdea2
commit
cdc6199a48
|
@ -43,5 +43,13 @@ app.conf.update(
|
|||
'schedule': timedelta(minutes=1),
|
||||
#'args': (5, 6)
|
||||
},
|
||||
'updatetzzs-task':{
|
||||
'task': 'safesite.tasks.updateTzzs',
|
||||
'schedule': crontab(hour=4, minute=30, day_of_week=1),
|
||||
},
|
||||
'updateaqzs-task':{
|
||||
'task': 'safesite.tasks.updateAqzs',
|
||||
'schedule': crontab(hour=4, minute=30, day_of_week=1),
|
||||
},
|
||||
}
|
||||
)
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
<div style="margin-top:4px"><label>检查表名:</label><input id="checktabtitle" name="checktabtitle" style="width:300px" /></div>
|
||||
<div style="margin-top:4px"><label>任务名称:</label><input id="checktaskname" name="checktaskname" style="width:300px"/></div>
|
||||
<div style="margin-top:4px"><label>检查人:</label><input name="checkername" style="width:300px" class="easyui-textbox"/></div>
|
||||
</form>
|
||||
</div>
|
||||
<div id='southdiv' data-options="region:'south'" style="height:44px;text-align:center;padding:4px">
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<table class='detailtable' style="text-align:center;">
|
||||
<tr>
|
||||
<td style="font-weight: bold;">检查人员:</td>
|
||||
<td>{{checkname__username}}</td>
|
||||
<td>{{checkname__username}}/{{checkname__name}}</td>
|
||||
<td style="font-weight: bold;">检查频率:</td>
|
||||
{{if checktask__tasktype==1}}
|
||||
<td>每天一次</td>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<div style="margin-top:4px"><label>检查类型</label><input name='jclx' id="sjclx" style="width:300px;" /></div>
|
||||
<div style="margin-top:4px"><label>隐患评估</label><input name='yhpg' id="syhpg" style="width:300px;" /></div>
|
||||
<div style="margin-top:4px"><label>发现部门</label><input id="sfxbm" name="fxbm" style="width:300px;" /></div>
|
||||
<!-- <div style="margin-top:4px"><label>发现人</label><input id="sfxr" name="fxr" style="width:300px" /></div> -->
|
||||
<div style="margin-top:4px"><label>发现人</label><input name="fxrname" style="width:300px" class="easyui-textbox"/></div>
|
||||
<div style="margin-top:4px"><label>整改部门</label><input id="szgbm" name="zgbm" style="width:300px" /></div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -1979,6 +1979,7 @@ def troublehandle(req):
|
|||
jssj = req.GET.get('jssj')
|
||||
yhqy = req.GET.get('yhqy')
|
||||
zgbm = req.GET.get('zgbm')
|
||||
fxrname = req.GET.get('fxrname',None)
|
||||
if yhzt != '' and yhzt != None:
|
||||
a = a.filter(yhzt=yhzt)
|
||||
if yhlx:
|
||||
|
@ -2006,6 +2007,8 @@ def troublehandle(req):
|
|||
parts = Partment.objects.filter(
|
||||
partlink__contains=','+str(zgbm)+',') | Partment.objects.filter(partid=zgbm)
|
||||
a = a.filter(Q(zgbm__in=parts) | Q(fxbm__in=parts, zgbm=None))
|
||||
if fxrname:
|
||||
a = a.filter(fxr__name=fxrname)
|
||||
total = a.count()
|
||||
startnum, endnum = fenye(req)
|
||||
obj = a.order_by('-fxsj')[startnum:endnum].values('troubleid', 'fxr__userid', 'fxr__name', 'yhms', 'yhzt', 'fxsj', 'tbsj', 'yhlb__dickeyname',
|
||||
|
@ -8258,7 +8261,7 @@ def checkprojects(req):
|
|||
jssj = req.GET.get('jssj')#结束时间
|
||||
checktabtitle = req.GET.get('checktabtitle')#检查表名
|
||||
checktaskname = req.GET.get('checktaskname')#任务名称
|
||||
|
||||
checkername = req.GET.get('checkername', None)
|
||||
if qssj:
|
||||
a = a.filter(starttime__gte=qssj)
|
||||
if jssj:
|
||||
|
@ -8267,6 +8270,8 @@ def checkprojects(req):
|
|||
a = a.filter(checktask__checktype__id=checktabtitle)
|
||||
if checktaskname:
|
||||
a = a.filter(checktask__id=checktaskname)
|
||||
if checkername:
|
||||
a = a.filter(checkname__name=checkername)
|
||||
total = a.count()
|
||||
|
||||
startnum, endnum = fenye(req)
|
||||
|
|
Loading…
Reference in New Issue