Merge branch 'master' of https://e.coding.net/ctcdevteam/safesite
This commit is contained in:
commit
8685e42241
|
|
@ -510,7 +510,8 @@ def drusers(companyid,path):
|
|||
# obj.usecomp = Partment.objects.get(partid=companyid)
|
||||
# obj.save()
|
||||
# groupdict[groupname] = obj.groupid
|
||||
if User.objects.filter(username = username).count() == 0:
|
||||
users = User.objects.filter(username = username)
|
||||
if not users.exists():
|
||||
a = User()
|
||||
a.name = name
|
||||
a.empid = empid
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@
|
|||
class="easyui-datebox" editable=false></div>
|
||||
<div style="margin-top:6px"><label>结束时间</label><input name='jssj' style="width:300px"
|
||||
class="easyui-datebox" editable=false></div>
|
||||
<div style="margin-top:6px"><label>建议部门</label><input name='jybm' style="width:300px" id="sjybm"
|
||||
class="easyui-combobox" editable=false></div>
|
||||
<div style="margin-top:6px"><label>建议人</label><input name='jyrname' style="width:300px"
|
||||
class="easyui-textbox"></div>
|
||||
</form>
|
||||
</div>
|
||||
<div id='southdiv' data-options="region:'south'" style="height:46px;text-align:center;padding:6px">
|
||||
|
|
@ -50,6 +54,22 @@
|
|||
var option = $('#main').attr('value')
|
||||
$('#jytable').datagrid({url:'api/suggest',queryParams:{a:option}});
|
||||
$("#searchjyff").form('clear');
|
||||
$("#sjybm").combotree({
|
||||
url: 'parthandle?a=tree',
|
||||
editable: false,
|
||||
loadFilter: function (rows) {
|
||||
return convert(rows);
|
||||
},
|
||||
formatter: function (node) {
|
||||
var s = node.text;
|
||||
if (node.children) {
|
||||
s += ' <span style=\'color:blue\'>(' + node.children.length + ')</span>';
|
||||
}
|
||||
return s;
|
||||
},
|
||||
onSelect: function (node) {
|
||||
}
|
||||
});
|
||||
})
|
||||
$('#kjcxjy').combobox({
|
||||
editable:false,
|
||||
|
|
@ -59,6 +79,7 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
function jysearch() {
|
||||
var querydata = $('#searchjyff').serializeJSON();
|
||||
querydata['a'] = 'listsearch'
|
||||
|
|
|
|||
|
|
@ -116,12 +116,16 @@
|
|||
removeLoading();
|
||||
if (data.code == 1) {
|
||||
$.messager.alert('提示', data.msg, 'info', function () {
|
||||
$("#main").panel({ href: 'userhtml', title: '用户' });
|
||||
var tab = $('#tt').tabs('getSelected');
|
||||
tab.panel('refresh');
|
||||
// $("#main").panel({ href: 'userhtml', title: '用户' });
|
||||
});
|
||||
}
|
||||
else if(data.code == 2){
|
||||
$.messager.alert('提示', data.msg + data.info, 'info', function () {
|
||||
$("#main").panel({ href: 'userhtml', title: '用户' });
|
||||
var tab = $('#tt').tabs('getSelected');
|
||||
tab.panel('refresh');
|
||||
// $("#main").panel({ href: 'userhtml', title: '用户' });
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -4702,6 +4702,12 @@ def apisuggest(req):
|
|||
startnum, endnum = fenye(req)
|
||||
a = Suggest.objects.filter(usecomp=Partment.objects.get(
|
||||
partid=companyid)).order_by('-submittime')
|
||||
if req.GET.get('jyrname', None):
|
||||
a = a.filter(jyr__name__contains=req.GET.get('jyrname'))
|
||||
if req.GET.get('jybm'):
|
||||
parts = Partment.objects.filter(partlink__contains=','+req.GET.get(
|
||||
'jybm')+',') | Partment.objects.filter(partid=req.GET.get('jybm'))
|
||||
a = a.filter(jybm__in=parts)
|
||||
total = a.count()
|
||||
startnum, endnum = fenye(req)
|
||||
a = a[startnum:endnum].values('jyid', 'jylb__dickeyname', 'jyr__name', 'jybm__partname', 'dqxz', 'jynr',
|
||||
|
|
@ -4765,6 +4771,12 @@ def apisuggest(req):
|
|||
a = a.filter(submittime__gte=req.GET.get('qssj'))
|
||||
if req.GET.get('jssj'):
|
||||
a = a.filter(submittime__lte=req.GET.get('jssj'))
|
||||
if req.GET.get('jyrname', None):
|
||||
a = a.filter(jyr__name__contains=req.GET.get('jyrname'))
|
||||
if req.GET.get('jybm'):
|
||||
parts = Partment.objects.filter(partlink__contains=','+req.GET.get(
|
||||
'jybm')+',') | Partment.objects.filter(partid=req.GET.get('jybm'))
|
||||
a = a.filter(jybm__in=parts)
|
||||
total = a.count()
|
||||
a = a.order_by('-submittime')[startnum:endnum].values('jyid', 'jylb__dickeyname', 'jyr__name', 'jybm__partname',
|
||||
'dqxz', 'jynr', 'jynum', 'jyzt', 'todouser__userid', 'todouser__name', 'jyqy__name', 'jydd', 'submittime', 'accept')
|
||||
|
|
|
|||
Loading…
Reference in New Issue