From dc106901e36ba5c0b8ff96f5f8c5671e5e3d7848 Mon Sep 17 00:00:00 2001 From: luojian Date: Tue, 31 Jul 2018 11:13:51 +0800 Subject: [PATCH] 2 --- .../BusinessApplication/ApprovalForm.jsp | 62 +++++++++++++++---- .../BusinessApplication/GetApplyName.jsp | 20 ++++++ 2 files changed, 70 insertions(+), 12 deletions(-) create mode 100644 WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/GetApplyName.jsp diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp index 2f1538af7..be30be110 100644 --- a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/ApprovalForm.jsp @@ -261,6 +261,7 @@ function changeFirstChoice(){//根据初审意见,遍历相应的下拉选项 setItemValue(0,0,"firstopinion",""); var firstchoice = getItemValue(0,0,"firstchoice"); + var attribute1=""; if(firstchoice==""){ setItemRequired(0,"InterOpinion1",false); setItemRequired(0,"DistriOpinion1",false); @@ -271,21 +272,23 @@ setItemRequired(0,"InterOpinion1",false); setItemRequired(0,"DistriOpinion1",true); $("#FIRSTOPINION").removeAttr("disabled"); - var obj=document.getElementById('FIRSTOPINION'); +/* var obj=document.getElementById('FIRSTOPINION'); for(var i=0;i<7;i++){ obj.options[i].style.display = "block"; } - obj.options[7].style.display = "none"; + obj.options[7].style.display = "none"; */ + attribute1="1"; } if(firstchoice=="0020"){ setItemRequired(0,"InterOpinion1",true); setItemRequired(0,"DistriOpinion1",false); $("#FIRSTOPINION").removeAttr("disabled"); - var obj=document.getElementById('FIRSTOPINION'); +/* var obj=document.getElementById('FIRSTOPINION'); for(var i=0;i<7;i++){ obj.options[i].style.display = "none"; } - obj.options[7].style.display = "block"; + obj.options[7].style.display = "block"; */ + attribute1="2"; } if(firstchoice=="0030"){ setItemRequired(0,"InterOpinion1",false); @@ -293,12 +296,22 @@ setItemRequired(0,"FIRSTOPINION",false); setItemValue(0,0,"firstopinion",""); $("#FIRSTOPINION").attr("disabled","disabled"); + attribute1=""; } + AsControl.RunJsp('/Tenwa/Lease/Flow/Project/BusinessApplication/GetApplyName.jsp','codeno=disagreeOP&attribute1='+attribute1,function(sReturn){ + if("FALSE"!=allTrim(sReturn)){ + var sReturn = lTrim(sReturn); + sReturn = rTrim(sReturn); + $('#FIRSTOPINION').children().remove(); + $('#FIRSTOPINION').append(sReturn); + } + }); } function changeSecondChoice(){//根据复审意见,遍历相应的下拉选项 setItemValue(0,0,"secondopinion",""); var secondchoice = getItemValue(0,0,"secondchoice"); + var attribute1=""; if(secondchoice==""){ setItemRequired(0,"InterOpinion2",false); //setItemRequired(0,"DistriOpinion2",false); @@ -309,10 +322,11 @@ //setItemRequired(0,"DistriOpinion2",false); $("#SECONDOPINION").removeAttr("disabled"); var obj=document.getElementById('SECONDOPINION'); - for(var i=0;i<7;i++){ + /* for(var i=0;i<7;i++){ obj.options[i].style.display = "none"; } - obj.options[7].style.display = "block"; + obj.options[7].style.display = "block"; */ + attribute1="2"; } if(secondchoice=="0010"){ setItemRequired(0,"A_div_1240",true); @@ -320,10 +334,11 @@ //setItemRequired(0,"DistriOpinion2",true); $("#SECONDOPINION").removeAttr("disabled"); var obj=document.getElementById('SECONDOPINION'); - for(var i=0;i<7;i++){ + /* for(var i=0;i<7;i++){ obj.options[i].style.display = "block"; } - obj.options[7].style.display = "none"; + obj.options[7].style.display = "none"; */ + attribute1="1"; } if(secondchoice=="0030"){ setItemRequired(0,"InterOpinion2",false); @@ -331,18 +346,29 @@ setItemRequired(0,"secondopinion",false); setItemValue(0,0,"secondopinion",""); $("#SECONDOPINION").attr("disabled","disabled"); + attribute1=""; } if(secondchoice=="0040"){ setItemRequired(0,"InterOpinion2",false); //setItemRequired(0,"DistriOpinion2",true); setItemValue(0,0,"secondopinion",""); $("#SECONDOPINION").attr("disabled","disabled"); + attribute1=""; } + AsControl.RunJsp('/Tenwa/Lease/Flow/Project/BusinessApplication/GetApplyName.jsp','codeno=disagreeOP&attribute1='+attribute1,function(sReturn){ + if("FALSE"!=allTrim(sReturn)){ + var sReturn = lTrim(sReturn); + sReturn = rTrim(sReturn); + $('#SECONDOPINION').children().remove(); + $('#SECONDOPINION').append(sReturn); + } + }); } function changeThirdChoice(){//根据信审意见,遍历相应的下拉选项 setItemValue(0,0,"thirdopinion",""); var thirdchoice = getItemValue(0,0,"thirdchoice"); + var attribute1=""; if(thirdchoice==""){ setItemRequired(0,"InterOpinion3",false); //setItemRequired(0,"DistriOpinion3",false); @@ -354,20 +380,22 @@ //setItemRequired(0,"DistriOpinion3",true); $("#THIRDOPINION").removeAttr("disabled"); var obj=document.getElementById('THIRDOPINION'); - for(var i=0;i<7;i++){ +/* for(var i=0;i<7;i++){ obj.options[i].style.display = "block"; } - obj.options[7].style.display = "none"; + obj.options[7].style.display = "none"; */ + attribute1="1"; } if(thirdchoice=="0020"){ setItemRequired(0,"InterOpinion3",true); //setItemRequired(0,"DistriOpinion3",false); $("#THIRDOPINION").removeAttr("disabled"); var obj=document.getElementById('THIRDOPINION'); - for(var i=0;i<7;i++){ + /* for(var i=0;i<7;i++){ obj.options[i].style.display = "none"; } - obj.options[7].style.display = "block"; + obj.options[7].style.display = "block"; */ + attribute1="2"; } if(thirdchoice=="0030"){ setItemRequired(0,"InterOpinion3",false); @@ -375,13 +403,23 @@ setItemRequired(0,"thirdopinion",false); setItemValue(0,0,"thirdopinion",""); $("#THIRDOPINION").attr("disabled","disabled"); + attribute1=""; } if(thirdchoice=="0040"){ setItemRequired(0,"InterOpinion3",false); //setItemRequired(0,"DistriOpinion3",true); setItemValue(0,0,"thirdopinion",""); $("#THIRDOPINION").attr("disabled","disabled"); + attribute1=""; } + AsControl.RunJsp('/Tenwa/Lease/Flow/Project/BusinessApplication/GetApplyName.jsp','codeno=disagreeOP&attribute1='+attribute1,function(sReturn){ + if("FALSE"!=allTrim(sReturn)){ + var sReturn = lTrim(sReturn); + sReturn = rTrim(sReturn); + $('#THIRDOPINION').children().remove(); + $('#THIRDOPINION').append(sReturn); + } + }); } function save(){ diff --git a/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/GetApplyName.jsp b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/GetApplyName.jsp new file mode 100644 index 000000000..9c0cf2bf6 --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/Project/BusinessApplication/GetApplyName.jsp @@ -0,0 +1,20 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/IncludeBeginMDAJAX.jsp"%><% + String codeno = CurPage.getParameter("codeno"); + String attribute1 = CurPage.getParameter("attribute1"); + try{ + String sql = "select c.itemno,c.itemname from code_library c where c.codeno='"+codeno+"' and c.attribute1="+attribute1; + ASResultSet res = Sqlca.getASResultSet(new SqlObject(sql)); + StringBuilder sb = new StringBuilder(); + sb.append(""); + while(res.next()){ + sb.append(""); + } + if(sb.length()>0){ + out.print(sb.toString()); + } + }catch(Exception e){ + e.printStackTrace(); + out.print("FALSE"); + } +%><%@ include file="/IncludeEndAJAX.jsp"%> \ No newline at end of file