goods_add.jsp
上传用户:sami52198
上传日期:2010-02-11
资源大小:5174k
文件大小:9k
源码类别:

电子政务应用

开发平台:

MultiPlatform

  1. <%@ page contentType="text/html;charset=gb2312"%>
  2. <%@ page errorPage="../pub/error.jsp"%>
  3. <%@ page import="java.util.*" %>
  4. <%@ include file="../pub/control.jsp"%>
  5. <%@ include file="../include/config.jsp"%>
  6. <%@ include file="../include/head.jsp"%>
  7. <html>
  8. <head>
  9. <title>新增商品维护</title>
  10. <link rel="stylesheet" href="../../../../css/style.css" type="text/css">
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  12. <script language="javascript" src="../../js/shop.js"></script>
  13. <script language="javascript" src="../../../../js/JsInclude.js"></script>
  14. <script language="javascript">
  15. function sub()
  16.  {     
  17.      if(goodsadd())
  18.       {
  19.          document.form1.par.value="add";     
  20.          document.form1.submit();      
  21.       }   
  22.     
  23.  }
  24. </script>
  25. <script language="javascript">
  26. var arrayboardID=new Array();
  27. var arrayboardName=new Array();
  28. var arrayboardParentID=new Array();
  29. <%
  30. Vector type_vct = manageclass.getShopAllSubClass();
  31. for(int i=0; i<type_vct.size(); i++)
  32. {
  33.     Vector atype_vct =(Vector)type_vct.get(i);
  34.     %>
  35.     arrayboardID[<%=i%>]=<%=atype_vct.get(0)%>; arrayboardName[<%=i%>]='<%=atype_vct.get(1)%>'; arrayboardParentID[<%=i%>]='<%=atype_vct.get(2)%>';
  36.     <%
  37. }
  38. %>
  39. function changeBoardParent()
  40. {
  41. /**
  42. *@设置一级拦目
  43. */    
  44.    setBoard(document.form1.parentid.value);
  45. }
  46. function setBoard(parentid)
  47. {
  48. /**
  49. *@设置二级拦目
  50. */
  51. document.form1.catalog_id.options.length=0;
  52. var count=0;
  53. document.form1.catalog_id.add(document.createElement('OPTION'));
  54. document.form1.catalog_id.options[count].text="请选择子类";
  55. document.form1.catalog_id.options[count].value="all";
  56. count++; 
  57. if(parentid!="all"){
  58. for(var i=0; i<arrayboardParentID.length; ++i)
  59. {
  60.     if(arrayboardParentID[i]==parentid)
  61.     {
  62.          document.form1.catalog_id.add(document.createElement('OPTION'));
  63.          document.form1.catalog_id.options[count].text=arrayboardName[i];
  64.          document.form1.catalog_id.options[count].value=arrayboardID[i];
  65.          count++;
  66.     }
  67. }
  68.     }   
  69. }
  70. //-->
  71. </script>
  72. </head>
  73. <%
  74.        String par = request.getParameter("par");
  75.        String aid = session.getAttribute("aid").toString();
  76.        if(par!=null&&par.equals("add"))
  77.         {
  78.            managegoods.createGoods(aid);
  79.            response.sendRedirect("manage_goods.jsp");   
  80.         }
  81.         
  82. %>
  83. <body bgcolor="#eff3f7" topmargin="0"  leftmargin="0">
  84. </SCRIPT>
  85. <form name="form1" method="post"> 
  86. <input type="hidden" name="par">
  87. <br>
  88. <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
  89. <tr> <td align="left" valign="middle" height="2"></td></tr> 
  90. <tr> 
  91. <td align="left" valign="top"> 
  92. <table align=center border=1 bordercolor=#095ab5 
  93.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  94.                   id=submenu1 width="90%">
  95.                 <tr valign=center BGCOLOR="#D0ECF9"> 
  96.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="8"><B><FONT SIZE="2">&nbsp;</FONT></B></td>
  97.                 </tr>
  98.                 <tbody>
  99.                   <tr valign=center> 
  100.                     <td align=left height=25 valign=MIDDLE 
  101.                         width="20%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;商品名称:</font></td>
  102.                     <td align=left height=25 valign=MIDDLE 
  103.                         colspan=7><font color="#000000">&nbsp;&nbsp;<input type="text" name="name" /></font></td>
  104.                   </tr>  
  105.                                      
  106.                   <tr valign=center> 
  107.                     <td align=left height=25 valign=MIDDLE 
  108.                         width="20%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;商品类型:</font></td>
  109.                     <td align=left height=25 valign=MIDDLE 
  110.                         colspan=3><font color="#000000">&nbsp;
  111.                         <select name="parentid" onChange=changeBoardParent()>
  112.                         <option value="all">请选择大类</option>
  113. <%
  114.    Vector shop_class = manageclass.getShopClass();
  115.     if(shop_class!=null && shop_class.size()>0)
  116.      {
  117.           for(int i=0;i<shop_class.size();i++)
  118.            {
  119.              Vector t_vct = (Vector)shop_class.get(i);
  120.              %>
  121.               <option value="<%=t_vct.get(0)%>"><%=t_vct.get(1)%></option>
  122.              <% 
  123.            }
  124.      }
  125. %> 
  126.                         </select>
  127.                         <select name="catalog_id">
  128.                         <option value="all">请选择子类</option>
  129.                         </select>
  130.                         </font></td>
  131.                     <td align=left height=25 valign=MIDDLE 
  132.                         width="20%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;厂商:</font></td>
  133.                     <td align=left height=25 valign=MIDDLE 
  134.                         colspan=3><font color="#000000">&nbsp;
  135.                          <input type="text" name="manufacturer" />
  136.                         </font>
  137.                         </td>                          
  138.                   </tr>     
  139.                   <tr valign=center> 
  140.                     <td align=left height=25 valign=MIDDLE 
  141.                         width="20%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;市场价格:</font></td>
  142.                     <td align=left height=25 valign=MIDDLE 
  143.                         colspan=3><font color="#000000">&nbsp;
  144.                          <input type="text" name="market_price" />
  145.                         </font>
  146.                         </td>
  147.                     <td align=left height=25 valign=MIDDLE 
  148.                         width="20%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;非会员价格:</font></td>
  149.                     <td align=left height=25 valign=MIDDLE 
  150.                         colspan=3><font color="#000000">&nbsp;
  151.                          <input type="text" name="price" />
  152.                         </font>
  153.                         </td>                         
  154.                   </tr>                                    
  155.                   <tr valign=center> 
  156.                     <td align=left height=25 valign=MIDDLE 
  157.                         width="20%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;会员价格:</font></td>
  158.                     <td align=left height=25 valign=MIDDLE 
  159.                         colspan=3><font color="#000000">&nbsp;
  160.                          <input type="text" name="member_price" />
  161.                         </font>
  162.                         </td>
  163.                     <td align=left height=25 valign=MIDDLE 
  164.                         width="20%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;成本价格:</font></td>
  165.                     <td align=left height=25 valign=MIDDLE 
  166.                         colspan=3><font color="#000000">&nbsp;
  167.                          <input type="text" name="cost_price" />
  168.                         </font>
  169.                         </td>                         
  170.                   </tr>                     
  171.                   <tr valign=center> 
  172.                     <td align=left height=25 valign=MIDDLE 
  173.                         width="20%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;商品关键字:</font></td>
  174.                     <td align=left height=25 valign=MIDDLE 
  175.                         colspan=7><font color="#000000">&nbsp;
  176.                           <textarea name="keywords" cols="60" rows="6"></textarea>
  177.                         </font></td>
  178.                   </tr>  
  179.                   <tr valign=center> 
  180.                     <td align=left height=25 valign=MIDDLE 
  181.                         width="20%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;简单介绍:</font></td>
  182.                     <td align=left height=25 valign=MIDDLE 
  183.                         colspan=7><font color="#000000">&nbsp;
  184.                           <textarea name="brief" cols="60" rows="6"></textarea>
  185.                         </font></td>
  186.                   </tr>                   
  187.                   <tr valign=center> 
  188.                     <td align=left height=25 valign=MIDDLE 
  189.                         width="20%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;详细介绍:</font></td>
  190.                     <td align=left height=25 valign=MIDDLE 
  191.                         colspan=7><font color="#000000">&nbsp;
  192.                           <textarea name="product_intr" cols="60" rows="15"></textarea>
  193.                         </font>
  194.                     </td>
  195.                   </tr>                                  
  196.                </tbody>   
  197.               </table>
  198.               <br> 
  199.               <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  200.               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  201.               <input type="button" name="button_1" value="新增" onclick="sub()"></p></td></tr> 
  202. </table></td></tr> <tr> <td align="left" valign="top" background="../../../image/line_hor.jpg" height="1"> 
  203. </td></tr> </table>
  204. </form>
  205. </body>
  206. </html>