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

📄 contractproductinsert.jsp

📁 (Java+SQL)-大型企业JAVA的ERP系统
💻 JSP
字号:
<jsp:useBean id="account" class="src.wuyang.Account" scope="page"/>
<jsp:useBean id="ContractProduct" class="src.wuyang.ContractProduct" 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>
<%	}
%>


<%! String contractId;%> 
<%! int productNum;%>
<%
	contractId = request.getParameter("contractId");
	
	productNum=ContractProduct.query("contractId='"+contractId+"'","");
%>
<html>
<head>
<link rel="stylesheet" href="../pub/style.css">
</head>
<body>

<table border="1">
  <tr bgcolor="#9cc1c1">
       <td>合同编号   :</td>
       <td>产品编号   : </td>
	   <td>产品名称 </td>
       <td>英文名称 </td>
       <td>规格/型号 </td>
       <td>数量   : </td>
       <td>单价   : </td>
       <td>买卖标记0 卖1 买   :</td>
	   <td>总金额   </td>
       <td>&nbsp;</td>
       <td>&nbsp;&nbsp; </td>
       </tr>
<%
float totalPrice=0;
ContractProduct.next();
for(int i=0;i<productNum;i++) 
    {
%>
    <form method="post" name="contractProduct" action="UpdateContractProduct.jsp?contractId=<%= contractId %>&pageName=<%=request.getParameter("pageName")%>" onsubmit="return VerifyInput(this);" >
     <input type="hidden"  name="contractId" value="<%= contractId %>" >
    <tr>	 
    <td><%=contractId %></td>
    <td>
        <input type="hidden"  name="productId" value="<%=ContractProduct.getProductId()%>" > <%=ContractProduct.getProductId()%>
    </td>
<%     	product.load(ContractProduct.getProductId());
%>
     <td><%=product.getProductName()%></td>
     <td><%=product.getProductEName()%></td>
     <td><%=product.getProductDesc()%></td>
    <td >
        <input type="text"  name="unitPrice" value="<%=ContractProduct.getUnitPrice()%>" size="12" maxlength="12" >
    </td>
    <td >
        <input type="text"  name="quantity" value="<%=ContractProduct.getQuantity()%>" size="12" maxlength="12">
    </td>
    <td >
<%   float subPrice=ContractProduct.getUnitPrice()*ContractProduct.getQuantity();
%>
     <%=subPrice%>
    </td>
    
    <td>
     <input type="submit" name="update"  value="修改"  />
    </td>
    <td>
      <input type="submit" name="delete" value="删除" />
    </td>
   </tr>
  </form>
<%
    ContractProduct.next();
    totalPrice = totalPrice + subPrice;
    }
%>
    <form method="post" name="contractProduct0" action="UpdateContractProduct.jsp?contractId=<%= contractId %>&pageName=<%=request.getParameter("pageName")%>" onsubmit="return VerifyInput(this);" >
     <input type="hidden"  name="contractId" value="<%= contractId %>" >
    <tr>	 
    <td><%=contractId %></td>
    <td>
        <input type="text"  name="productId" value="" size="10" maxlength="10" >
    </td>
    <td>
    </td>
    <td>
    </td>
    <td>
    </td>
    <td>
        <input type="text"  name="unitPrice" value="" size="12" maxlength="12" >
    </td>
    <td>
        <input type="text"  name="quantity" value="" size="12" maxlength="12" >
    </td>
    <td><%=totalPrice%></td>
    <td>
     <input type="submit" name="insert" value="增加" >
    </td>
    <td>&nbsp;
    </td>
   </form>
  </table>
    <form method="post" name="contractProduct0" action="ContractInstalmentInsert.jsp?contractId=<%= contractId %>" >
     <input type="submit" name="return" value="下一步" >
    </form>
</body>
</html>

⌨️ 快捷键说明

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