feat: riskacttask 增加查询条件2
This commit is contained in:
parent
590d44bf6f
commit
29eed3b8fd
|
@ -10,15 +10,26 @@
|
||||||
<label>排查部门</label>
|
<label>排查部门</label>
|
||||||
<input id="spcbm" name="pcbm" style="width:180px;"
|
<input id="spcbm" name="pcbm" style="width:180px;"
|
||||||
editable=false />
|
editable=false />
|
||||||
|
<label>排查人</label>
|
||||||
|
<input id="pcr" name="user__name" style="width:180px;" class="easyui-textbox"/>
|
||||||
<label>起始时间</label><input name='qssj' style="width:180px"
|
<label>起始时间</label><input name='qssj' style="width:180px"
|
||||||
class="easyui-datebox" editable=false>
|
class="easyui-datebox" editable=false>
|
||||||
<label>结束时间</label><input name='jssj' style="width:180px"
|
<label>结束时间</label><input name='jssj' style="width:180px"
|
||||||
class="easyui-datebox" editable=false>
|
class="easyui-datebox" editable=false>
|
||||||
<a onclick="searchriskcheck()" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">查询</a>
|
<a onclick="searchriskcheck()" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">查询</a>
|
||||||
|
<a id="checkdetail" onclick="checkdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
function checkdetail(){
|
||||||
|
var row = $('#riskactchecktable').datagrid('getSelected');
|
||||||
|
if (row) {
|
||||||
|
var url = 'html/riskacttask/detail/' + row.id
|
||||||
|
opendg('查看详情',url,1000)
|
||||||
|
}
|
||||||
|
else { $.messager.alert('提示', '请选择一行数据!'); }
|
||||||
|
}
|
||||||
$("#spcbm").combotree({
|
$("#spcbm").combotree({
|
||||||
url: 'parthandle?a=tree',
|
url: 'parthandle?a=tree',
|
||||||
editable: false,
|
editable: false,
|
||||||
|
|
|
@ -10,15 +10,26 @@
|
||||||
<label>排查部门</label>
|
<label>排查部门</label>
|
||||||
<input id="spcbm" name="pcbm" style="width:180px;"
|
<input id="spcbm" name="pcbm" style="width:180px;"
|
||||||
editable=false />
|
editable=false />
|
||||||
|
<label>排查人</label>
|
||||||
|
<input id="pcr" name="user__name" style="width:180px;" class="easyui-textbox"/>
|
||||||
<label>起始时间</label><input name='qssj' style="width:180px"
|
<label>起始时间</label><input name='qssj' style="width:180px"
|
||||||
class="easyui-datebox" editable=false>
|
class="easyui-datebox" editable=false>
|
||||||
<label>结束时间</label><input name='jssj' style="width:180px"
|
<label>结束时间</label><input name='jssj' style="width:180px"
|
||||||
class="easyui-datebox" editable=false>
|
class="easyui-datebox" editable=false>
|
||||||
<a onclick="searchriskcheck()" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">查询</a>
|
<a onclick="searchriskcheck()" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">查询</a>
|
||||||
|
<a id="checkdetail" onclick="checkdetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
function checkdetail(){
|
||||||
|
var row = $('#riskchecktable').datagrid('getSelected');
|
||||||
|
if (row) {
|
||||||
|
var url = 'html/riskacttask/detail/' + row.id
|
||||||
|
opendg('查看详情',url,1000)
|
||||||
|
}
|
||||||
|
else { $.messager.alert('提示', '请选择一行数据!'); }
|
||||||
|
}
|
||||||
$("#spcbm").combotree({
|
$("#spcbm").combotree({
|
||||||
url: 'parthandle?a=tree',
|
url: 'parthandle?a=tree',
|
||||||
editable: false,
|
editable: false,
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
<form id='searchrisktaskff'>
|
<form id='searchrisktaskff'>
|
||||||
<label>执行人</label>
|
<label>执行人</label>
|
||||||
<input id="zxr" name="user__name" style="width:180px;" class="easyui-textbox"/>
|
<input id="zxr" name="user__name" style="width:180px;" class="easyui-textbox"/>
|
||||||
{% comment %} <label>起始时间</label><input name='qssj' style="width:180px"
|
<label>起始时间</label><input name='qssj' style="width:180px"
|
||||||
class="easyui-datebox" editable=false>
|
class="easyui-datebox" editable=false>
|
||||||
<label>结束时间</label><input name='jssj' style="width:180px"
|
<label>结束时间</label><input name='jssj' style="width:180px"
|
||||||
class="easyui-datebox" editable=false> {% endcomment %}
|
class="easyui-datebox" editable=false>
|
||||||
<a onclick="searchrisktask()" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">查询</a>
|
<a onclick="searchrisktask()" class="easyui-linkbutton" data-options="iconCls: 'fa-search',plain:true">查询</a>
|
||||||
<a id="taskdodetail" onclick="taskdodetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
<a id="taskdodetail" onclick="taskdodetail()" class="easyui-linkbutton" data-options="iconCls: 'fa-info-circle',plain:true">查看详情</a>
|
||||||
</form>
|
</form>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
function taskdodetail(){
|
function taskdodetail(){
|
||||||
var row = $('#risktasktable').datagrid('getSelected');
|
var row = $('#risktasktable').datagrid('getSelected');
|
||||||
if (row) {
|
if (row) {
|
||||||
var url = 'html/taskdo/detail/' + row.id
|
var url = 'html/riskacttask/detail/' + row.id
|
||||||
opendg('查看详情',url,1000)
|
opendg('查看详情',url,1000)
|
||||||
}
|
}
|
||||||
else { $.messager.alert('提示', '请选择一行数据!'); }
|
else { $.messager.alert('提示', '请选择一行数据!'); }
|
||||||
|
|
|
@ -8384,6 +8384,10 @@ def apiriskacttask(req):
|
||||||
objs = objs.filter(riskact=req.GET.get('riskact'))
|
objs = objs.filter(riskact=req.GET.get('riskact'))
|
||||||
if req.GET.get('taskset'):
|
if req.GET.get('taskset'):
|
||||||
objs = objs.filter(taskset=req.GET.get('taskset'))
|
objs = objs.filter(taskset=req.GET.get('taskset'))
|
||||||
|
if req.GET.get('qssj'):
|
||||||
|
objs = objs.filter(taskdo_gte=req.GET.get('qssj'))
|
||||||
|
if req.GET.get('jssj'):
|
||||||
|
objs = objs.filter(taskdo__lte=req.GET.get('jssj'))
|
||||||
objs = objs.values('riskact__group__groupname', 'riskact__area__name',
|
objs = objs.values('riskact__group__groupname', 'riskact__area__name',
|
||||||
'riskact__type__dickeyname', 'riskact__id', 'riskact__group__groupid',
|
'riskact__type__dickeyname', 'riskact__id', 'riskact__group__groupid',
|
||||||
'riskact__name', 'riskact__level', 'riskact__tasktype', 'taskadd', 'taskexpire',
|
'riskact__name', 'riskact__level', 'riskact__tasktype', 'taskadd', 'taskexpire',
|
||||||
|
@ -8394,6 +8398,8 @@ def apiriskacttask(req):
|
||||||
return HttpResponse(transjson(total, objs), content_type="application/json")
|
return HttpResponse(transjson(total, objs), content_type="application/json")
|
||||||
elif a == 'listall': # 全厂排查记录
|
elif a == 'listall': # 全厂排查记录
|
||||||
objs = RiskActTask.objects.filter(riskact__usecomp__partid=companyid).exclude(taskdo=None)
|
objs = RiskActTask.objects.filter(riskact__usecomp__partid=companyid).exclude(taskdo=None)
|
||||||
|
if req.GET.get('user__name'):
|
||||||
|
objs = objs.filter(user__name__contains=req.GET.get('user__name'))
|
||||||
if req.GET.get('pcbm'):
|
if req.GET.get('pcbm'):
|
||||||
parts = getparts(req.GET.get('pcbm'))
|
parts = getparts(req.GET.get('pcbm'))
|
||||||
objs = objs.filter(user__ubelongpart__in=parts)
|
objs = objs.filter(user__ubelongpart__in=parts)
|
||||||
|
|
Loading…
Reference in New Issue