diff --git a/safesite/templates/addtrouble.html b/safesite/templates/addtrouble.html index ef6d1417..b28c886a 100644 --- a/safesite/templates/addtrouble.html +++ b/safesite/templates/addtrouble.html @@ -90,11 +90,11 @@
@@ -412,7 +412,7 @@ $("#pg,#zpzgr,#fxcs").show(); $(".pgb").show(); $("#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', }); } }); $('#checkboxid1').attr("disabled", "disabled"); } else { $("#pg,#zpzgr,#fxcs").hide(); $("#zgr").textbox('clear'); $("#zgqx").datetimebox('clear'); $('#checkboxid1').removeAttr("disabled"); } @@ -423,7 +423,7 @@ $("#pg,#fxcs,#zghxq").show(); $(".pgb").hide(); $("#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"); $('#yyfx').textbox({required:true,prompt:''}); $('#zgcs').textbox({required:true,prompt:''}); diff --git a/safesite/views.py b/safesite/views.py index ca42e784..d705ef99 100644 --- a/safesite/views.py +++ b/safesite/views.py @@ -4135,15 +4135,14 @@ def apisocert(req): return HttpResponse(transjson(total, a), content_type="application/json") elif a == 'listself': userid = req.session['userid'] - userprofile = Userprofile.objects.filter(user__userid=userid) - if userprofile.exists(): - cardnum = userprofile[0].cardnum - else: - return JsonResponse({'code':0,'msg':'信息不全'}) - a = Socertificate.objects.filter( - cardnum=cardnum).order_by('id') # 无deletemark + # userprofile = Userprofile.objects.filter(user__userid=userid) + # if userprofile.exists(): + # cardnum = userprofile[0].cardnum + # else: + # return JsonResponse({'code':0,'msg':'信息不全'}) + a = Socertificate.objects.filter(user__userid=userid).order_by('id') # 无deletemark total = a.count() - if req.GET.get('sort'): + if req.GET.get('sort', None): a = a.order_by(req.GET.get('sort')) a = a.values('id', 'realname', 'gender', 'zylb', 'czxm', 'fzjg', 'ccfzrq', 'yfsrq', 'yxqkssj', 'yxqjssj', 'sjfssj', 'zszt', 'url', 'cardnum')