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

📄 insertsaleinventory.jsp

📁 (Java+SQL)-大型企业JAVA的ERP系统
💻 JSP
字号:
<%@ taglib prefix="list" uri="/jsp/tld/WuYangTag.tld" %>
<jsp:useBean id="inventory" class="src.wuyang.Inventory" scope="page"/>
<jsp:useBean id="slipProduct" class="src.wuyang.SlipProduct" scope="page"/>
<jsp:useBean id="slip" class="src.wuyang.SalesSlip" scope="page"/>
<jsp:useBean id="product" class="src.wuyang.Production" scope="page"/>
<jsp:useBean id="locationState" class="src.wuyang.LocationState" scope="page"/>
<jsp:useBean id="countList" class="src.wuyang.CountList" scope="page"/>
<jsp:useBean id="wearHouse" class="src.wuyang.Wearhouse" scope="page"/>
<jsp:useBean id="changePlan" class="src.wuyang.ChangePlan" 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" type="text/css">
</head>
<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>
      <span class="Text"><br>
      </span>
      <blockquote> <span class="Text"> <b class="textb"> 
        <script language="JavaScript">
function VerifyInput(e)
{
	if(isEmpty(e.wearhouseId.value))
	{    
		alert("请输入仓库编码");
		e.wearhouseId.focus();  
		return false;
	} 
	if(isEmpty(e.locationId.value))
	{    
		alert("请输入货位编码");
		e.locatoinId.focus();  
		return false;
	} 
}

</script>
        <%
	String slipId = request.getParameter("slipId");	
	String productId = request.getParameter("productId");
	String curMarkId = request.getParameter("curMarkId"); 
	String pack[] = {"带包装","净水"};

	if (request.getParameter("insert")!=null){   	//修改仓库记录
%>
        <jsp:setProperty name="inventory" property="*"/>
        <%
		inventory.setReceiptType(0);   
		inventory.setStatu(0);   
    		inventory.setGlobal(global);  
	
		int rtcode = inventory.insert();

		if(rtcode < 0) {	
%>
        <jsp:forward page="../pub/DBErr.jsp" > 
        <jsp:param name="rtcode" value="<%=rtcode%>" />
        </jsp:forward>
        <%  
		}  

		slip.load(slipId);
		if (slip.getFormat()==0) {		//修改计划(计划内)
			changePlan.setQuantityFinish(inventory.getQuantity());
			changePlan.setProductId(inventory.getProductId());
			changePlan.setDeptId(slip.getDeptId());
			
			changePlan.process();
		}
	}
        inventory.setGlobal(global);  
	product.load(productId);
	slipProduct.load(slipId,productId);
	int rowCount = countList.query("markId="+curMarkId,"");

	int actCounting = 0;
	float actQuantity=0;

	for (int i = rowCount;(i>0)&&(countList.next()>0);i--) {
	    	actCounting += 1;
		actQuantity += countList.getQuantity(); 
	}
    	
%>
        销售申请单编码:<%=slipProduct.getSlipId()%> <br>
        产品编码:<%=product.getProductId()%> <br>
        产品名称:<%=product.getProductName()%> <br>
        规格/型号:<%=product.getProductDesc()%> <br>
        单位:<%=product.getUnit()%> <br>
        包装:<%=pack[slipProduct.getPack()]%> <br>
        应收/发数量:<%=slipProduct.doubleFormat(slipProduct.getQuantity(),2)%> <br>
        已收/发数量:<%=slipProduct.doubleFormat(slipProduct.getActQuantity(),2)%> <br>
        <%if(actQuantity > 0){%>
        唛单编号:<%=curMarkId%> <br>
        唛单数量:<%=slipProduct.doubleFormat(actQuantity,2)%> <br>
        件数:<%=slipProduct.doubleFormat(actCounting,0)%> 
        <%}%>
        </b> </span> 
        <p>	
		
          
        <table border="1" bordercolorlight="#000000" bordercolordark="#CCCCCC" width="702" cellpadding="0" cellspacing="0">
          <tr bgcolor="#949b93"> 
            <td class="text" height="18" width="68"> 
              <div align="center"><b>仓库名称 </b></div>
            </td>
            <td class="text" height="18" width="65"> 
              <div align="center"><b>货位编码 </b></div>
            </td>
            <td class="text" height="18" width="76"> 
              <div align="center"><b>库存数量 </b></div>
            </td>
            <td class="text" height="18" width="51"> 
              <div align="center"><b>库存件数 </b></div>
            </td>
            <td class="text" height="18" width="82"> 
              <div align="center"><b>实收/发数量 </b></div>
            </td>
            <td class="text" height="18" width="58"> 
              <div align="center"><b>实收/发件数 </b></div>
            </td>
            <td class="text" height="18" width="154"> 
              <div align="center"><b>批号 </b></div>
            </td>
            <td class="text" height="18" width="70"> 
              <div align="center"><b>送货单号 </b></div>
            </td>
            <td class="text" height="18" width="58"> 
              <div align="center"><b><b>&nbsp;</b></b></div>
            </td>
          </tr>
          <%
	int num = locationState.query("productId='"+productId+"'","");
	
	for (int i=0;i<num;i++) {
		locationState.next();
		wearHouse.load(locationState.getWearhouseId());
%>
          <tr> 
            <form method="POST"   onsubmit="return VerifyInput(this);">
              <input type="hidden" name="receiptId" value="<%=slipProduct.getSlipId()%>"/>
              <input type="hidden" name="productId" value="<%=slipProduct.getProductId()%>"/>
              <input type="hidden" name="markId" value="<%=curMarkId%>">
              <input type="hidden" name="wearhouseId" value="<%=locationState.getWearhouseId()%>"/>
              <input type="hidden" name="locationId" value="<%=locationState.getLocationId()%>"/>
              <td class="textb" width="68"><%=wearHouse.getWearhouseName()%></td>
              <td class="textb" width="65"><%=locationState.getLocationId()%></td>
              <td class="textb" width="76"><div align="right"><%=locationState.doubleFormat(locationState.getQuantity(),2)%></div></td>
              <td class="textb" width="51"><div align="right"><%=locationState.doubleFormat(locationState.getCounting(),0)%></div></td>
              <td class="textb" width="82"> 
                <input type="text" name="quantity" value="<%=locationState.doubleFormat(actQuantity,2)%>"/ size="12" maxlength="12">
              </td>
              <td class="textb" width="58"> 
                <input type="text" name="counting" value="<%=locationState.doubleFormat(actCounting,0)%>"/ size="8" maxlength="8">
              </td>
              <td class="textb" width="154"> 
                <input type="text" name="groupId">
              </td>
              <td class="textb" width="70"> 
                <input type="text" name="huodanNo" size="10" maxlength="10">
              </td>
              <td class="textb" width="58"> 
                <input type="submit" name="insert" value="出库" />
              </td>
            </form>
          </tr>
          <%	
	}
%>
        </table>
<form method="post" action="SalesReceiptList.jsp?slipId=<%=slipId%>">
<input type="submit" name="back" value="返回">
</form>
</blockquote>
</td>
</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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