⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 approve.jsp

📁 tomcat最新安装程序
💻 JSP
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="cn.com.aheadsoft.util.StringFormat" %>
<%@ page import="cn.com.aheadsoft.recordset.PersonInfoRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.TaskAppFlowRecordSet" %>
<%@ page import="cn.com.aheadsoft.recordset.TaskAppTransferRecordSet" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css">
<title>立项审批</title>
<% 
	TaskAppFlowRecordSet appFlowRs=(TaskAppFlowRecordSet) request.getAttribute("AppFlow");
	TaskAppTransferRecordSet transferRecordset=(TaskAppTransferRecordSet) request.getAttribute("Transfer");
	PersonInfoRecordSet person=(PersonInfoRecordSet) request.getAttribute("PersonInfo");
	String  approve=(String) request.getAttribute("Approve");
	String approveMind="";
	String preAtID="";
	String approver="";
	String actionID="";
	if(approve.equals("reApprove")) 
	{ 
		transferRecordset.next();
		approver=transferRecordset.getAT_ApproverID();
		actionID=transferRecordset.getAT_ActionID();
		transferRecordset.next();
		approveMind=StringFormat.Source2GB(transferRecordset.getAT_ApproveMind());
		preAtID=transferRecordset.getAT_ID();		
	}
		else transferRecordset.next();
			
	String detailID=request.getParameter("DetailID");
	String atID=request.getParameter("AT_ID");
	String isLast=request.getParameter("IsLast");
%>
<script>
<!--

  var person = new Array();
	<%
		if(person != null && person.size() > 0) {
			int i = 0;
            while(person.next()) {
				out.println("person["+String.valueOf(i)+"]=new Array();");
				out.println("person["+String.valueOf(i)+"][0]='"+StringFormat.Source2GB(person.getI_Name())+"';");
				out.println("person["+String.valueOf(i)+"][1]='"+person.getUser_ID()+"';");
				out.println("person["+String.valueOf(i)+"][2]='"+person.getUI_RoleID()+"';");
				i++;
			}
		}
	%>   
	action = new Array();
	<%	
	   int j=0;
		while(appFlowRs.next()){
			out.println("action["+String.valueOf(j)+"]=new Array();");
			out.println("action["+String.valueOf(j)+"][0]='"+appFlowRs.getFA_ID()+"';");
			out.println("action["+String.valueOf(j)+"][1]='"+appFlowRs.getFA_Roles()+"';");
			j++;
		}
	%> 
	function selectAction() {	
		isNav = (navigator.appName.indexOf("Netscape") != -1) ? true : false;
		isIE = (navigator.appName.indexOf("Microsoft") != -1) ? true : false;
		len=document.Approve.Next_ActorID.options.length;
		if(len>0){
			for(i=len-1;i>=0;i--)
			document.Approve.Next_ActorID.remove(i);
		}
		index=document.Approve.AT_ActionID.selectedIndex;
		values=document.Approve.AT_ActionID.options[index].value;
		for(i=0;i<action.length;i++) {
			if(action[i][0]==values) {
				for(j=0;j<person.length;j++)
				{
					if(action[i][1].indexOf("#"+person[j][2]+"#")!=-1)
					{
						optionnew=document.createElement("option");
						optionnew.text=person[j][0];
						optionnew.value=person[j][1];
						if(person[j][1]=="<%=approver%>")
						{
							optionnew.selected=true;
						}		
						if(isIE) {
							document.Approve.Next_ActorID.add(optionnew);
						}else {
							document.Approve.Next_ActorID.appendChild(optionnew);
						}
					}
				}
			}
		}
	}

	function openWin(url) {
		window.open(url,'','toolbar=no,scrollbars=no,location=no,menubar=no,resizable=1,left=10,top=20,width=770,height=450');
	}
	function selectApp(){
	  if(document.Approve.Type.selectedIndex==0) 
	  {
		document.Approve.Approve_Mind.value='同意';
		<% if(isLast.equals("0")) {%>showAction();<%}%>
	  }
		else if(document.Approve.Type.selectedIndex==1) {	
				<% if(isLast.equals("0")) {%>hiddenAction();<%}%>
				document.Approve.Approve_Mind.value='否决';
			  }
			  else if(document.Approve.Type.selectedIndex==2) {	
				<% if(isLast.equals("0")) {%>hiddenAction();<%}%>
				document.Approve.Approve_Mind.value='电话联系';
			  }	
	}
	function showAction(){
	document.all.nextActor.style.display=""; 
	document.all.nextAction.style.display=""; 
	}
	function hiddenAction(){
	document.all.nextActor.style.display="none"; 
	document.all.nextAction.style.display="none"; 	
	}
	function atSubmit(obj) {
		var FlagPass = true;
		var err="";	
		if(document.Approve.Approve_Mind.value=="") 
		{
			err+='请填写审批意见!';
			FlagPass=false;
		}
		else if(document.Approve.Approve_Mind.value.replace(/[^\x00-\xff]/g,"**").length>250)
		{
        	err+='审批意见不能超过250个字符(125个汉字)!';
			FlagPass=false;		
		}
		if(FlagPass==false) alert(err);
		if(FlagPass){
			if(document.Approve.Type.selectedIndex==1)
			{
		 		return confirm('确认要否决吗?');
			}
		}
		return FlagPass;
	}
	function disableAction(){
	    if(!atSubmit()) return false;
	    document.Approve.submit();
	    document.all.ImageButton.onClick="";
	    return true;
	}	
-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"   onLoad="<% if(approve.equals("Approve")) {%>selectApp();<%}%><% if(isLast.equals("0")) {%>selectAction();<%}%>" >
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" >
 <tr height="8">
    <td class="trA">&nbsp;您的位置:任务管理 >> 任务立项 >><font class="fontcolor"> 立项审批</font></td>
 </tr>
  <tr height="8">
    <td></td>
  </tr>
  <tr>
    <td align="center" >
	  <table border="0" width="98%"   align="center"  class="collapse">
      <tr><td class="common1" colspan="2" align="right">
		 <input type="button" value="立项信息" onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" onClick="javascript:openWin('/krm/servlet/ApplyDetailServlet?status=q&module=s&AD_ID=<%=detailID%>');">
      </td></tr>
        <tr> 
          <td  colspan="2" class="tdA">立项审批</td>
        </tr>
        <%
				while(transferRecordset.next()) {
		%>
        <tr height="25" > 
          <td width="100"  class="common bgcolor" >&nbsp;<%= StringFormat.Source2GB(transferRecordset.getAT_ActionName()) %></td>
          <td  class="common" > <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr class="common"> 
                <td>&nbsp;&nbsp;<%= StringFormat.Source2GB(transferRecordset.getAT_ApproveMind()) %></td>
              </tr>
              <tr class="common"> 
                <td align="right">&nbsp;<%= StringFormat.Source2GB(transferRecordset.getAT_ApproverName()) %></td>
              </tr>
              <tr class="common"> 
                <td align="right">&nbsp;<%= StringFormat.Source2GB(transferRecordset.getAT_ApproveDate()) %></td>
              </tr>
            </table></td>
        </tr>
				
        <%     }
		%>
		<tr><td colspan="2" class="tdC">&nbsp;</td>
		</tr>
		<tr><td colspan="2" class="common">&nbsp;</td>
		</tr>
        <form action="/krm/servlet/TaskAppTransferServlet" method="post" name="Approve" onsubmit="return atSubmit(this)">
          <tr > 
            <td class="common bgcolor"  width="100">&nbsp;&nbsp;审批:</td>
			<td class="common"> 
              <select name="Type" onChange="selectApp()">
                <option value="1" selected>同意</option>
                <option value="0">否决</option>
                <option value="2">电话联系</option>
              </select>
			  </td>
          </tr>
          <% if(approve.equals("Approve")) {%>
          <tr> 
            <td class="common bgcolor"  width="100" nowrap>&nbsp;&nbsp;审批意见:</td>
			<td class="common"><textarea name="Approve_Mind" rows="5"></textarea></td>
          </tr>
          <% if(isLast.equals("0")) {%>
          <tr height="25" id="nextAction" <% if(isLast.equals("1")) {%> style="display:none" <%}%>>
            <td  nowrap class="common bgcolor"  width="100">&nbsp;&nbsp;下一步:</td>
			<td class="common">
			<select style="font-size:9pt;font-color:#FFFFFF;width:122" name="AT_ActionID" onchange="selectAction();">
                <%
            appFlowRs.beforefirst();
            while(appFlowRs.next()) { 
            %>
                <option value="<%=StringFormat.Source2GB(appFlowRs.getFA_ID())%>"><%= StringFormat.Source2GB(appFlowRs.getFA_Name())%></option>
                <%} %>
            </select>
			</td>
          </tr>
          <tr height="25" id="nextActor" <% if(isLast.equals("1")) {%> style="display:none" <%}%>> 
            <td  nowrap class="common bgcolor" width="100" >&nbsp;&nbsp;<font color=red>下一步处理人:</font></td>
			<td class="common"> 
              <select name="Next_ActorID" >
              </select> 
		    </td>
          </tr>
          <%}%>
          <input type="hidden" name="AT_ID" value="<%=atID%>" >
          <input type="hidden" name="status" value="i">
          <input type="hidden" name="IsLast" value="<%=isLast%>">
          <input type="hidden" name="DetailID" value="<%=detailID%>">
          <%} else {
		  %>
          <tr > 
            <td class="common bgcolor"  width="100" nowrap>&nbsp;&nbsp;审批意见:</td>
			<td class="common"> <textarea name="Approve_Mind" rows="5"><%= approveMind %></textarea></td>
          </tr>
          <tr  id="nextAction" <% if(isLast.equals("1")) {%> style="display:none" <%}%>>
            <td  nowrap class="common bgcolor"  width="100">&nbsp;&nbsp;下一步:</td>
			<td class="common">
			<select style="font-size:9pt;font-color:#FFFFFF;width:122" name="AT_ActionID" onchange="selectAction();">
                <%
            appFlowRs.beforefirst();
            while(appFlowRs.next()) { 
            %>
                <option <% if(actionID.equals(appFlowRs.getFA_ID())){%> selected<%}%> value="<%=StringFormat.Source2GB(appFlowRs.getFA_ID())%>"><%= StringFormat.Source2GB(appFlowRs.getFA_Name())%></option>
                <%} %>
              </select>
			</td>
          </tr>		  
          <tr height="25" id="nextActor" <% if(isLast.equals("1")) {%> style="display:none" <%}%>> 
            <td  nowrap class="common bgcolor" width="100" >&nbsp;&nbsp;<font color=red>下一步处理人:</font> </td>
			<td class="common">
              <select name="Next_ActorID" >
              </select>
              &nbsp; 
			 </td>
            <input type="hidden" name="AT_ID" value="<%=atID%>" >
            <input type="hidden" name="PreAtID" value="<%=preAtID%>" >
            <input type="hidden" name="status" value="u">
            <input type="hidden" name="DetailID" value="<%=detailID%>">
          </tr>
          <%}%>
       <tr > 
		<td align="center"  class="tdC" colspan="2">
        <input name="ImageButton"  onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" type="button" value="提 交"  onClick="return disableAction();">
		&nbsp;<input onmouseover="this.className='button2'" onmouseout="this.className='button1'"  class="button1" type="button" value="返 回"  onClick="history.back(1);">
         </td>
          </tr>
        </form>
      </table>
 </td></tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -