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

📄 updateware.jsp~6~

📁 销售管理系统 随着我国国民经济的持续发展
💻 JSP~6~
字号:
<%@page contentType="text/html; charset=gb2312"%>
<%@page import="com.domain.WareVO"%>
<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<%@page import="com.domain.WareKindVO"%>
<%@page import="com.dao.WareKindDao"%>
<%@page import="com.domain.UnitVO"%>
<%@page import="com.dao.UnitDao"%>
<%@page import="com.domain.ClientVO"%>
<%@page import="com.dao.ClientDao"%>
<%WareKindDao wareKind=new WareKindDao();%>
<%UnitDao unit=new UnitDao();%>
<%ClientDao client=new ClientDao();%>
<%List wareKindList=wareKind.kindSelect();%>
<%List unitList=unit.unitSelect();%>
<%List clientList=client.clientList();%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet" type="text/css">
<title>修改产品详细信息</title>
<style type="text/css">
<!--
.style2 {
	font-size: 12px;
	font-weight: bold;
	color: #FF0000;
}
-->
</style>
</head>
<script language="JavaScript">

function insert(){
if(document.form.name.value==""){
window.alert("请输入产品名称");
return false;
}
if(document.form.kind.value==""){
window.alert("请选择产品类型");
return false;
}
if(document.form.business.value==""){
window.alert("请选择厂商");
return false;
}
if(document.form.account.value==""){
window.alert("请输入数量");
return false;
}
if(isNaN(document.form.account.value)){
window.alert("产品数量只能为数字");
return false;
}
if(document.form.unit.value==""){
window.alert("请选择计量单位");
return false;
}
if(document.form.money.value==""){
window.alert("请输入单价");
return false;
}
if(isNaN(document.form.money.value)){
window.alert("产品单价只能为数字");
return false;
}
if(document.form.remark.value==""){
window.alert("请输入备注信息");
return false;
}
return true;
}
</script>
<body>
<%WareVO ware=(WareVO)request.getAttribute("ware");%>
<table width="80%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#004C86"  class="tableBorder_r">
  <tr align="left" valign="top">
    <td height="20%" colspan="3">
    <jsp:include page="../top.jsp"/>
    </td>
  </tr>
  <tr>
    <td width="192" height="80%" scope="row" background="picture/left.jpg">
    <jsp:include page="../ba.jsp"/>    </td>
    <td width="635" height="80%" scope="row">
      <div align="center">
        <p>&nbsp;</p>

		 <form name="form" method="post" action="wareservlet?method=2&id=<%=ware.getId()%>" onsubmit="return insert()">
          <table width="78%"  border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#819BBC" bordercolorlight="#FFFFFF">
               <tr bgcolor="#EFF6FE">
              <td width="16%" height="28" colspan="4"><div align="center"><strong>修改商品详细信息</strong></div></td>

            </tr>

		    <tr>
              <td width="16%" height="28" bgcolor="#EFF6FE"><div align="center">编号名称</div></td>
              <td width="34%"><div align="center"><%=ware.getNumber()%></div></td>
              <td width="16%" bgcolor="#EFF6FE"><div align="center">产品名称</div></td>
              <td width="34%"><div align="center"><input name="name" type="text" value="<%=ware.getName()%>" size="15">
              </div></td>
            </tr>
            <tr>
              <td height="28" bgcolor="#EFF6FE"><div align="center">产品类型</div></td>
              <td><div align="center">
              <select name="kind">

                    <%
                    for(int i=0;i<wareKindList.size();i++){
                  WareKindVO typevo=(WareKindVO)wareKindList.get(i); %>
                    <option value="<%=typevo.getKind_name()%>"
                      <%if(ware.getKind().equals(typevo.getKind_name())){out.println("selected");}%>><%=typevo.getKind_name()%></option>
                    <%}%>
                </select>

              </div></td>
              <td bgcolor="#EFF6FE"><div align="center">生产厂商</div></td>
              <td><div align="center">
              <select name="business">
                      <option value="">请选择</option>
                      <%
                      for(int i=0;i<clientList.size();i++){
                  ClientVO clientvo=(ClientVO)clientList.get(i); %>
                      <option value="<%=clientvo.getClient_name()%>" <%if(ware.getBusiness().equals(clientvo.getClient_name())){out.println("selected");}%>><%=clientvo.getClient_name()%></option>
                       <%}%>
                </select>
              </div></td>
            </tr>
            <tr>
              <td height="28" bgcolor="#EFF6FE"><div align="center">产品数量</div></td>
              <td><div align="center"><input name="account" type="text" value="<%=ware.getAccount()%>" size="15">
              </div></td>
              <td bgcolor="#EFF6FE"><div align="center">计量单位</div></td>
              <td><div align="center">
                <select name="unit">
                      <option value="">请选择</option>
                      <%for(int i=0;i<unitList.size();i++){
                  UnitVO unitvo=(UnitVO)unitList.get(i); %>
                      <option value="<%=unitvo.getUnit_name()%>"><%=unitvo.getUnit_name()%></option>
                       <%}%>
                </select>

              </div></td>
            </tr>
            <tr>
              <td height="28" bgcolor="#EFF6FE"><div align="center">进货单价</div></td>
              <td><div align="center"><input name="money" type="text" value="<%=ware.getMoney()%>" size="15">
              </div></td>
              <td bgcolor="#EFF6FE"><div align="center">备注信息</div></td>
              <td><div align="center"><input name="remark" type="text" value="<%=ware.getRemark()%>" size="15">
              </div></td>
            </tr>
          </table>
          <p>&nbsp;</p>
          <div align="center">
            <input type="submit" name="Submit3" value="提交">
            &nbsp;
		    <input type="reset" name="Submit3" value="重置">
		    &nbsp;
		    <input type="button" name="Submit3" value="返回" onclick="javascript:history.back();">
          </div>
		 </form>

      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>      <p>&nbsp;</p>

      <p>&nbsp;</p>
    <p>&nbsp;</p>  </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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