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

📄 insertproductlocation.jsp

📁 (Java+SQL)-大型企业JAVA的ERP系统
💻 JSP
字号:
<%@ taglib prefix="list" uri="/jsp/tld/WuYangTag.tld" %>
<jsp:useBean id="location" class="src.wuyang.ProductLocation" scope="page"/>
<jsp:useBean id="global" class="src.com.MyGlobal" scope="session"/>

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


<html>
<head>
<title>货位编码信息</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language ="javascript" src='../pub/pub.js' type=text/javascript></script>
<link rel="stylesheet" href="css.css">
</head>
<body bgcolor="#949B93" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="1" height="90%" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#616860" bordercolordark="#CCCCCC" bgcolor="#4c7171" >
  <tr> 
    <td valign="top" > 
<script language="JavaScript">
function VerifyInput(e)
{
	if(isEmpty(e.locationId.value))
	{    
		alert("请输入货位编码");
		e.locationId.focus();  
		return false;
	}  
	if(isEmpty(e.locationDesc.value))
	{    
		alert("请输入货位描述");
		e.locationDesc.focus();  
		return false;
	}  
	if(isEmpty(e.wearhouseId.value))
	{    
		alert("请选择仓库");
		e.wearhouseId.focus();  
		return false;
	} 
}
</script>	
<%
String mode = request.getParameter("mode");
System.out.println("*mode="+ mode);

if (request.getParameter("insert")!=null && mode.equals("insert") ){ 
	location.setGlobal(global);	
%>
<jsp:setProperty name="location" property="*" />
<%
	int rtcode = location.insert();

	if(rtcode >= 0) {
%>
<jsp:forward page="InsertProductLocation.jsp" > 
	<jsp:param name="success" value="ok" />
	<jsp:param name="mode" value="ok" />
</jsp:forward>

<% 	
	}else {  
%>
<jsp:forward page="../pub/DBErr.jsp" > 
	<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>
      <%  
	}  
}

%>
      <% 
	if (request.getParameter("success") != null ){	
%>
      <b><span class="textb"> 成功插入记录!!</span></b> 
      <%
	}
%>
      <br>
      <br>
<form method="POST"  onsubmit="return VerifyInput(this);">	
        <blockquote> 
          <table width="300" border="0" cellspacing="0" cellpadding="0">
            <tr> 
              <td class="textb"><b>货位编码:</b></td>
              <td> 
                <input type="text" name="locationId" />
              </td>
            </tr>
            <tr> 
              <td class="textb"><b>货位描述:</b></td>
              <td> 
                <input type="text" name="locationDesc" />
              </td>
            </tr>
            <tr> 
              <td class="textb"><b>仓库名称:</b></td>
              <td> 
                <select name="wearhouseId">
                  <list:wearhouse showType="select"/> 
                </select>
              </td>
            </tr>
            <tr> 
              <td colspan="2"> 
                <div align="center"> <br>
                  <input type="submit" name="insert" value="增加" />
                  <input type="reset" name="reset" value="重置" />
                </div>
              </td>
            </tr>
          </table>
          <p>&nbsp;</p>
          <p>
            <input type="hidden" name="mode" value="insert"/>
            <br>
            <br>
          </p>
          <p>
	<br>
        </blockquote>
</form>
</td>
</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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