我的特种证书

This commit is contained in:
caoqianming 2021-01-13 20:39:40 +08:00
parent 0a1dd39db2
commit f4c66fdff1
2 changed files with 11 additions and 12 deletions

View File

@ -90,11 +90,11 @@
</div> </div>
<div style="margin-bottom:5px"> <div style="margin-bottom:5px">
<input name="yhlx" id="yhlx" style="width:480px" editable="false" data-options=" <input name="yhlx" id="yhlx" style="width:480px" editable="false" data-options="
label:'隐患类', label:'隐患类',
method: 'get', method: 'get',
valueField:'value', valueField:'value',
textField:'text', textField:'text',
groupField:'group' groupField:'group',
" "
required=true /></div> required=true /></div>
<div style="margin-bottom:5px"> <div style="margin-bottom:5px">
@ -412,7 +412,7 @@
$("#pg,#zpzgr,#fxcs").show(); $("#pg,#zpzgr,#fxcs").show();
$(".pgb").show(); $(".pgb").show();
$("#yhpg").combobox({ url: 'getdickey?dicclass=19&a=combobox', }); $("#yhpg").combobox({ url: 'getdickey?dicclass=19&a=combobox', });
$("#yhlx").combobox({ url: 'getdicclass?dicid=15', onSelect: function (node) { $('#yhlb').combobox({ url: 'getdickey?dicclass=' + node.value + '&a=combobox', }); } }); $("#yhlx").combobox({ url: 'getdicclass?dicid=15', onSelect: function (node) { $('#yhlb').combotree({ url: 'getdickey?dicclass=' + node.value + '&a=combobox', }); } });
$("#zgbm").combotree({ url: 'parthandle?a=tree3', onSelect: function (node) { $('#zgr').combobox({ url: 'getuser?partid=' + node.id + '&a=combobox', }); } }); $("#zgbm").combotree({ url: 'parthandle?a=tree3', onSelect: function (node) { $('#zgr').combobox({ url: 'getuser?partid=' + node.id + '&a=combobox', }); } });
$('#checkboxid1').attr("disabled", "disabled"); $('#checkboxid1').attr("disabled", "disabled");
} else { $("#pg,#zpzgr,#fxcs").hide(); $("#zgr").textbox('clear'); $("#zgqx").datetimebox('clear'); $('#checkboxid1').removeAttr("disabled"); } } else { $("#pg,#zpzgr,#fxcs").hide(); $("#zgr").textbox('clear'); $("#zgqx").datetimebox('clear'); $('#checkboxid1').removeAttr("disabled"); }
@ -423,7 +423,7 @@
$("#pg,#fxcs,#zghxq").show(); $("#pg,#fxcs,#zghxq").show();
$(".pgb").hide(); $(".pgb").hide();
$("#yhpg").combobox({ url: 'getdickey?dicclass=19&a=combobox', }); $("#yhpg").combobox({ url: 'getdickey?dicclass=19&a=combobox', });
$("#yhlx").combobox({ url: 'getdicclass?dicid=15', onSelect: function (node) { $('#yhlb').combobox({ url: 'getdickey?dicclass=' + node.value + '&a=combobox', }); } }); $("#yhlx").combobox({ url: 'getdicclass?dicid=15', onSelect: function (node) { $('#yhlb').combotree({ url: 'getdickey?dicclass=' + node.value + '&a=combobox', }); } });
$('#checkboxid').attr("disabled", "disabled"); $('#checkboxid').attr("disabled", "disabled");
$('#yyfx').textbox({required:true,prompt:''}); $('#yyfx').textbox({required:true,prompt:''});
$('#zgcs').textbox({required:true,prompt:''}); $('#zgcs').textbox({required:true,prompt:''});

View File

@ -4135,15 +4135,14 @@ def apisocert(req):
return HttpResponse(transjson(total, a), content_type="application/json") return HttpResponse(transjson(total, a), content_type="application/json")
elif a == 'listself': elif a == 'listself':
userid = req.session['userid'] userid = req.session['userid']
userprofile = Userprofile.objects.filter(user__userid=userid) # userprofile = Userprofile.objects.filter(user__userid=userid)
if userprofile.exists(): # if userprofile.exists():
cardnum = userprofile[0].cardnum # cardnum = userprofile[0].cardnum
else: # else:
return JsonResponse({'code':0,'msg':'信息不全'}) # return JsonResponse({'code':0,'msg':'信息不全'})
a = Socertificate.objects.filter( a = Socertificate.objects.filter(user__userid=userid).order_by('id') # 无deletemark
cardnum=cardnum).order_by('id') # 无deletemark
total = a.count() total = a.count()
if req.GET.get('sort'): if req.GET.get('sort', None):
a = a.order_by(req.GET.get('sort')) a = a.order_by(req.GET.get('sort'))
a = a.values('id', 'realname', 'gender', 'zylb', 'czxm', 'fzjg', a = a.values('id', 'realname', 'gender', 'zylb', 'czxm', 'fzjg',
'ccfzrq', 'yfsrq', 'yxqkssj', 'yxqjssj', 'sjfssj', 'zszt', 'url', 'cardnum') 'ccfzrq', 'yfsrq', 'yxqkssj', 'yxqjssj', 'sjfssj', 'zszt', 'url', 'cardnum')