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

📄 purchratify.jsp

📁 (Java+SQL)-大型企业JAVA的ERP系统
💻 JSP
字号:
<jsp:useBean id="Purch" class="src.wuyang.Purch" scope="page"/>
<jsp:useBean id="customer" class="src.wuyang.Customer" scope="page"/>
<jsp:useBean id="employee" class="src.wuyang.Employee" scope="page"/>
<jsp:useBean id="PurchProduct" class="src.wuyang.PurchProduct" scope="page"/>
<jsp:useBean id="product" class="src.wuyang.Production" scope="page"/>
<jsp:useBean id="account" class="src.wuyang.Account" scope="page"/>
<jsp:useBean id="global" class="src.com.MyGlobal" scope="session"/>
<jsp:setProperty name="Purch" property="*" />

<% if (global.isLogined == false) {
%>
<jsp:forward page="../pub/DBErr.jsp" > 
	<jsp:param name="rtcode" value="-4" />
</jsp:forward>
<%	}
%>

<%!String str;%>
<% 
 	String purchId = request.getParameter("purchId");
	String type=request.getParameter("type");
	 	
 	if (request.getParameter("update")!=null){
 	        int mode = Integer.parseInt(request.getParameter("mode"));
		int agree = Integer.parseInt(request.getParameter("agree"));
		Purch.setComment(request.getParameter("comment"));
		Purch.setPurchId(purchId);
		account.load(global.loginName);
		int rtcode = Purch.updateRatifier(mode,agree,account.getEmployeeId());

		if(rtcode>=0){
		    if (type.equals("1"))
		    	str="DeptRatifier.jsp";
		    if (type.equals("2"))
	   	    	str="ManagerRatifier.jsp";	
		    if (type.equals("4"))
	   	    	str="ManagerRatifier1.jsp";	
		    if (type.equals("6"))
	   	    	str="ManagerRatifier2.jsp";	
	   	}else
	   		str="../pub/DBErr.jsp?rtcode=" + rtcode;
   	
   	response.sendRedirect(str);
   } 
%>
<html>
<link rel="stylesheet" href="css.css" type="text/css">

<script language="javascript">
	function getUrl(){
		document.form1.action="PurchRatify.jsp?agree=1&update=ok";
		document.form1.submit();
	}
	
	function getUrl2(){
		document.form1.action="PurchRatify.jsp?agree=0&update=ok";
		document.form1.submit();
	}		
	function getUrl4(){
		document.form1.action="PurchRatify.jsp?agree=6&update=ok";
		document.form1.submit();
	}
</script>
<body bgcolor=#949b93><table width="100%" border="1" height="90%" bordercolorlight="#616860" bordercolordark="#CCCCCC" bgcolor="#4c7171" cellpadding="0" cellspacing="0">
  <tr> 
    <td valign="top"><br>
<form name="form1" method="post">
        <blockquote> <span class="textb">
          <input type="hidden" name="purchId" value="<%=purchId%>">
          <input type="hidden" name="type" value="<%=type%>">
          <input type="hidden" name="mode" value="<%=type%>">
          批注:</span> 
          <textarea name="comment"> </textarea> 
<p>
<input type="button" value="同意" onclick="getUrl()">
<input type="button" value="不同意" onclick="getUrl2()">
<%	if (type.equals("4")) { %>
<input type="button" value="转总经理" onclick="getUrl4()">
<%	}%>
<input type="button"  value="返回" onclick="history.back()"></blockquote>
</form>
<jsp:include page="PurchDetail.jsp" flush="true">
<jsp:param name="purchId" value="<%=purchId%>"/>
</jsp:include>
    </td>
</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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