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

电子政务应用

开发平台:

MultiPlatform

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