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

📄 updatelocationstate.jsp

📁 (Java+SQL)-大型企业JAVA的ERP系统
💻 JSP
字号:
<jsp:useBean id="locationState" class="src.wuyang.LocationState" scope="page"/>
<jsp:useBean id="inventory" class="src.wuyang.Inventory" scope="page"/>
<jsp:useBean id="product" class="src.wuyang.Production" 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>
<link rel="stylesheet" href="css.css" type="text/css">
</head>

<%
	String locationId;	
	locationId = request.getParameter("locationId");	
	String productId = request.getParameter("productId");
	String wearhouseId = request.getParameter("wearhouseId");		
	String mode = request.getParameter("mode");
	String newQuantity = request.getParameter("newQuantity");
	String newCounting = request.getParameter("newCounting");
%>


<%
	locationState.load(locationId,productId);
	float oldQuantity = locationState.getQuantity();
	float oldCounting = locationState.getCounting();	
	locationState.setGlobal(global);     	
%>	
<jsp:setProperty name="locationState" property = "*" />
<%	 
	if(mode!=null){
		int rtcode = locationState.update();    	    
	        
	    inventory.setGlobal(global);
	    inventory.setProductId(productId);     
	    float delQuantity = locationState.getNewQuantity() - oldQuantity;    
	    float delCounting = locationState.getNewCounting() - oldCounting;	    
	    inventory.setQuantity(delQuantity);
	    inventory.setCounting(delCounting);  
	    inventory.setWearhouseId(wearhouseId); 
	    inventory.setLocationId(locationId);   	    
        int flag = inventory.insertAdjust();    
	if(rtcode <= 0) {
%>
<jsp:forward page="../pub/DBErr.jsp" > 
	<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>
<%  }
} 
product.load(productId);    
 %>

<body bgcolor=#949b93><table width="100%" border="1" height="90%" bordercolorlight="#616860" bordercolordark="#CCCCCC" bgcolor="#4c7171" cellpadding="0" cellspacing="0">
  <tr> 
    <td valign="top">
      <blockquote><br>
        <br><form method="post" action="UpdateLocationState.jsp" > 
<input type = "hidden" name="mode" vlue="update">
<input type="hidden" name="locationId" value="<%=locationId%>">
<input type="hidden" name="wearhouseId" value="<%=wearhouseId%>">
          <table width="279">
            <tr> 
              <td class="textb"><b>产品编码</b></td>
              <td> 
                <input type="hidden" name="productId" value="<%=product.getProductId()%>">
                <%= product.getProductId() %></td>
            </tr>
            <br>
            <tr> 
              <td class="textb"><b>产品名称</b></td>
              <td><%= product.getProductName() %></td>
            </tr>
            <br>
            <tr> 
              <td class="textb"><b>盘存数量</b></td>
              <td> 
                <input type = "text" name = "newQuantity" <%if(newQuantity!=null){%>value="<%=newQuantity%>"<%}%>>
              </td>
            </tr>
            <br>
            <tr> 
              <td class="textb"><b>盘存件数</b></td>
              <td> 
                <input type = "text" name = "newCounting" <%if(newCounting!=null){%>value="<%=newCounting%>"<%}%>>
              </td>
            </tr>
          </table>
  <p>
  <input type = "submit" name="check" value = "盘存">

</form>
      </blockquote>
    </td>
  </tr>
</table>
</body>
</html>



⌨️ 快捷键说明

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