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

电子政务应用

开发平台:

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" src="../../js/shop.js"></script>
  12. <script language="javascript" src="../../../../js/JsInclude.js"></script>
  13. <script language="javascript">
  14. function sub()
  15.  {
  16.     if(recommand())
  17.     {        
  18.         document.form1.par.value="query";     
  19.         document.form1.submit();        
  20.     }    
  21.  }
  22. //tuijianshangping 
  23. function recom()
  24.  {
  25.     document.form1.par.value="recommand";
  26.     document.form1.submit();
  27.  } 
  28. </script>
  29. <script language="javascript">
  30. var arrayboardID=new Array();
  31. var arrayboardName=new Array();
  32. var arrayboardParentID=new Array();
  33. <%
  34. Vector type_vct = manageclass.getShopAllSubClass();
  35. for(int i=0; i<type_vct.size(); i++)
  36. {
  37.     Vector atype_vct =(Vector)type_vct.get(i);
  38.     %>
  39.     arrayboardID[<%=i%>]=<%=atype_vct.get(0)%>; arrayboardName[<%=i%>]='<%=atype_vct.get(1)%>'; arrayboardParentID[<%=i%>]='<%=atype_vct.get(2)%>';
  40.     <%
  41. }
  42. %>
  43. function changeBoardParent()
  44. {
  45. /**
  46. *@设置一级拦目
  47. */    
  48.    setBoard(document.form1.parentid.value);
  49. }
  50. function setBoard(parentid)
  51. {
  52. /**
  53. *@设置二级拦目
  54. */
  55. document.form1.catalog_id.options.length=0;
  56. var count=0;
  57. document.form1.catalog_id.add(document.createElement('OPTION'));
  58. document.form1.catalog_id.options[count].text="请选择子类";
  59. document.form1.catalog_id.options[count].value="all";
  60. count++; 
  61. if(parentid!="all"){
  62. for(var i=0; i<arrayboardParentID.length; ++i)
  63. {
  64.     if(arrayboardParentID[i]==parentid)
  65.     {
  66.          document.form1.catalog_id.add(document.createElement('OPTION'));
  67.          document.form1.catalog_id.options[count].text=arrayboardName[i];
  68.          document.form1.catalog_id.options[count].value=arrayboardID[i];
  69.          count++;
  70.     }
  71. }
  72.     }   
  73. }
  74. //-->
  75. </script>
  76. </head>
  77. <%
  78.        String par = request.getParameter("par");
  79.        String aid = session.getAttribute("aid").toString();
  80.        String manufacturer = managegoods.getManufacturer()==null?"":managegoods.getManufacturer();
  81.        String name = managegoods.getName()==null?"":managegoods.getName();
  82.        String parentid = managegoods.getParentid()==null?"all":managegoods.getParentid();
  83.        String catalog_id = managegoods.getCatalog_id()==null?"all":managegoods.getCatalog_id();
  84.        Vector m_vct =null;
  85.        Vector com_vct = null;
  86.        Vector com1_vct = null;
  87.        if(par!=null&&par.equals("recommand"))
  88.         {
  89.            ManageCommandGoods.updateRecommand();
  90.            com_vct = ManageCommandGoods.getCommandGoodsSList("03");//精品推荐
  91.            com1_vct = ManageCommandGoods.getCommandGoodsSList("04");//特价商品
  92.            m_vct = ManageCommandGoods.getGoodSList(); //取一级分类商品列表               
  93.         }
  94.        if(par!=null&&par.equals("query"))
  95.         {
  96.            com_vct = ManageCommandGoods.getCommandGoodsSList("03");//精品推荐
  97.            com1_vct = ManageCommandGoods.getCommandGoodsSList("04");//精品推荐
  98.            m_vct = ManageCommandGoods.getGoodSList(); //取一级分类商品列表            
  99.         }
  100.          
  101.                
  102. %>
  103. <body bgcolor="#eff3f7" topmargin="0"  leftmargin="0">
  104. </SCRIPT>
  105. <form name="form1" method="post"> 
  106. <input type="hidden" name="par">
  107. <!--input type="hidden" name="id"-->
  108. <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
  109. <tr> <td align="left" valign="middle" height="2"></td></tr> 
  110. <tr> 
  111. <td align="left" valign="top"> 
  112. <table align=center border=1 bordercolor=#095ab5 
  113.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  114.                   id=submenu1 width="90%">
  115.                 <tbody>
  116.                   <tr valign=center> 
  117.                     <td align=left height=25 valign=MIDDLE 
  118.                         width="10%" colspan=3 BGCOLOR="#D0ECF9">
  119.                         <font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;
  120.                         商品名称:
  121.                         </font>
  122.                         </td>                                          
  123.                     <td align=left height=25 valign=MIDDLE width="10%">
  124.                     &nbsp;&nbsp;<font color="#000000">
  125.                     <input type="text" name="name"></name>
  126.                     </font>
  127.                     </td>                        
  128.                    <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1 BGCOLOR="#D0ECF9">
  129.                    厂商
  130.                    </td>     
  131.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3>
  132.                     <input type="text" name="manufacturer"></name>
  133.                     </td>
  134.                   </tr>  
  135.                   
  136.                   <tr valign=center> 
  137.                     <td align=left height=25 valign=MIDDLE 
  138.                         width="10%" colspan=3 BGCOLOR="#D0ECF9">
  139.                         <font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;
  140.                         商品类型:
  141.                         </font>
  142.                         </td>                                          
  143.                     <td align=left height=25 valign=MIDDLE width="10%" colspan=2>
  144.                     &nbsp;&nbsp;<font color="#000000">
  145.                         <select name="parentid" onChange=changeBoardParent()>
  146.                         <option value="all">请选择大类</option>
  147. <%
  148.    Vector shop_class = manageclass.getShopClass();
  149.     if(shop_class!=null && shop_class.size()>0)
  150.      {
  151.           for(int i=0;i<shop_class.size();i++)
  152.            {
  153.              Vector t_vct = (Vector)shop_class.get(i);
  154.              %>
  155.               <option value="<%=t_vct.get(0)%>"><%=t_vct.get(1)%></option>
  156.              <% 
  157.            }
  158.      }
  159. %> 
  160.                         </select>
  161.                         <select name="catalog_id">
  162.                         <option value="all">请选择子类</option>
  163.                         </select>
  164.                     </font>
  165.                     </td> 
  166.                          <td align=left height=25 valign=MIDDLE 
  167.                         width="10%" colspan=3 >
  168.                         <font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;
  169.                         <input type="button" name="button_1" value="查询" onclick="sub()">
  170.                         </font>
  171.                         </td>                      
  172.                   </tr>                    
  173.                 </tbody>                     
  174.               </table>
  175.               </td>
  176.               </tr> 
  177. </table></td></tr> 
  178. <tr>
  179. <td align="left" valign="top" background="../../../image/line_hor.jpg" height="1"> 
  180. </td>
  181. </tr> 
  182. </table>
  183. <br>
  184. <!--table width="100%" border="0" cellspacing="0" cellpadding="0"> 
  185. <tr>
  186. <td align="left" valign="top" background="../../../image/line_hor.jpg" height="1">
  187. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size="4"><b><a href="goods_add.jsp">新增商品</a></b></font>
  188. </td>
  189. </tr> 
  190. </table-->
  191. <br>
  192. <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
  193. <tr> 
  194. <td align="left" valign="top"> 
  195. <table align=center border=1 bordercolor=#095ab5 
  196.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  197.                   id=submenu1 width="90%">
  198.                 <tr valign=center BGCOLOR="#D0ECF9"> 
  199.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="8"><B><FONT SIZE="2">&nbsp;精品推荐</FONT></B></td>
  200.                 </tr>
  201.                 <tbody>
  202.                   <tr valign=center> 
  203.                     <td align=left height=25 valign=MIDDLE 
  204.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;编号</font></td>
  205.                     <td align=left height=25 valign=MIDDLE 
  206.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;商品名称</font></td> 
  207.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>类型</td>                                                 
  208.                     <td align=left height=25 valign=MIDDLE 
  209.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;推荐类型</font></td>                                            
  210.                    
  211.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3>删除</td>
  212.                   </tr>                      
  213.                   
  214.    <%
  215.    if(com_vct!=null&&com_vct.size()>0)
  216.     {
  217.        for(int i=0;i<com_vct.size();i++)
  218.         {         
  219.            Vector t_vct = (Vector)com_vct.get(i);
  220.            %>
  221.                   <tr valign=center> 
  222.                     <td align=left height=25 valign=MIDDLE 
  223.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(0)%></font></td>
  224.                     <td align=left height=25 valign=MIDDLE 
  225.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(1)%></font></td> 
  226.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1><%=t_vct.get(2)%>--><%=t_vct.get(3)%></td>                                                 
  227.                     <td align=left height=25 valign=MIDDLE 
  228.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;精品推荐</font></td>                                            
  229.                  
  230.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3><input type="checkbox" name="recomid1" value="<%=t_vct.get(0)%>" >删除</input></td>
  231.                   </tr>            
  232.            <%
  233.         }
  234.     }
  235. %>           
  236.                   
  237.               </table>
  238.               <br> 
  239.               <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;
  240.               &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;
  241.               </p></td></tr> 
  242. </table>
  243. </td>
  244. </tr> 
  245. <tr> 
  246. <td align="left" valign="top"> 
  247. <table align=center border=1 bordercolor=#095ab5 
  248.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  249.                   id=submenu1 width="90%">
  250.                 <tr valign=center BGCOLOR="#D0ECF9"> 
  251.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="8"><B><FONT SIZE="2">&nbsp;特价商品</FONT></B></td>
  252.                 </tr>
  253.                 <tbody>
  254.                   <tr valign=center> 
  255.                     <td align=left height=25 valign=MIDDLE 
  256.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;编号</font></td>
  257.                     <td align=left height=25 valign=MIDDLE 
  258.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;商品名称</font></td> 
  259.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>类型</td>                                                 
  260.                     <td align=left height=25 valign=MIDDLE 
  261.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;推荐类型</font></td>                                            
  262.                    
  263.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3>删除</td>
  264.                   </tr>                      
  265.                   
  266.    <%
  267.    if(com1_vct!=null&&com1_vct.size()>0)
  268.     {
  269.        for(int i=0;i<com1_vct.size();i++)
  270.         {         
  271.            Vector t_vct = (Vector)com1_vct.get(i);
  272.            %>
  273.                   <tr valign=center> 
  274.                     <td align=left height=25 valign=MIDDLE 
  275.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(0)%></font></td>
  276.                     <td align=left height=25 valign=MIDDLE 
  277.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(1)%></font></td> 
  278.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1><%=t_vct.get(2)%>--><%=t_vct.get(3)%></td>                                                 
  279.                     <td align=left height=25 valign=MIDDLE 
  280.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;特价推荐</font></td>                                            
  281.                     
  282.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3><input type="checkbox" name="recomid1" value="<%=t_vct.get(0)%>" >删除</input></td>
  283.                   </tr>            
  284.            <%
  285.         }
  286.     }
  287. %>           
  288.                   
  289.               </table>
  290.               <br> 
  291.               <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;
  292.               &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;
  293.               </p></td></tr> 
  294. </table>
  295. </td>
  296. </tr> 
  297. <tr> 
  298. <td align="left" valign="top"> 
  299. <table align=center border=1 bordercolor=#095ab5 
  300.                   bordercolordark=#ffffff cellpadding=0 cellspacing=0 
  301.                   id=submenu1 width="90%">
  302.                 <tr valign=center BGCOLOR="#D0ECF9"> 
  303.                   <td align=CENTER height=25 valign=MIDDLE COLSPAN="8"><B><FONT SIZE="2">&nbsp;</FONT></B></td>
  304.                 </tr>
  305.                 <tbody>
  306.                   <tr valign=center> 
  307.                     <td align=left height=25 valign=MIDDLE 
  308.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;编号</font></td>
  309.                     <td align=left height=25 valign=MIDDLE 
  310.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;商品名称</font></td> 
  311.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=1>类型</td>                                                 
  312.                     <td align=left height=25 valign=MIDDLE 
  313.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;推荐类型</font></td>                                            
  314.                    
  315.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3>推荐</td>
  316.                   </tr>                      
  317.                   
  318.    <%
  319.    if(m_vct!=null&&m_vct.size()>0)
  320.     {
  321.        for(int i=0;i<m_vct.size();i++)
  322.         {
  323.            Vector t_vct = (Vector)m_vct.get(i);
  324.            %>
  325.                   <tr valign=center> 
  326.                     <td align=left height=25 valign=MIDDLE 
  327.                         width="5%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(0)%></font></td>
  328.  <td align=left height=25 valign=MIDDLE 
  329.                         width="15%" colspan=1><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;<%=t_vct.get(1)%></font></td>                     
  330.                     <td align=left height=25 valign=MIDDLE 
  331.                         width="15%" colspan=1><font coloER valign=MIDDLE colspan=1><%=t_vct.get(2)%>--><%=t_vct.get(3)%></td>                                                 
  332.                     <td align=left height=25 valign=MIDDLE 
  333.                         width="15%" colspan=1>
  334.                         <font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;
  335.                         <select name="type">
  336.                         <option value="03">精品推荐</option>
  337.                         <option value="04">特价商品</option>
  338.                         </select>
  339.                         </font>
  340.                         </td>    
  341.                     <td width="10%" height=25 align=CENTER valign=MIDDLE colspan=3>
  342.                     <input type="checkbox" name="recomid" value="<%=t_vct.get(0)%>">推荐</input>
  343.                     </td>
  344.                   </tr>            
  345.            <%
  346.         }
  347.     }
  348. %>           
  349.                   
  350.               </table>
  351.               <br> 
  352.               <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;
  353.               <input type="button" value="推荐" onclick="recom()"></input>&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;
  354.               </p></td></tr> 
  355. </table>
  356. </td>
  357. </tr> 
  358. <tr> 
  359. <td align="left" valign="top" background="../../../image/line_hor.jpg" height="1"> 
  360. </td>
  361. </tr> 
  362. </table>
  363. </form>
  364. <script language="javascript">
  365. document.form1.name.value='<%=name%>';
  366. document.form1.manufacturer.value='<%=manufacturer%>';
  367. document.form1.parentid.value='<%=parentid%>';
  368. changeBoardParent();
  369. document.form1.catalog_id.value='<%=catalog_id%>';
  370. </script>
  371. </body>
  372. </html>