goodsManaNoTejia.jsp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <%@ page language="java" pageEncoding="UTF-8"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3. <%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
  4. <%
  5. String path = request.getContextPath();
  6. %>
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9. <head>
  10. <meta http-equiv="pragma" content="no-cache" />
  11. <meta http-equiv="cache-control" content="no-cache" />
  12. <meta http-equiv="expires" content="0" />
  13. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
  14. <meta http-equiv="description" content="This is my page" />
  15. <link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
  16. <script type="text/javascript" src="<%=path %>/js/popup.js"></script>
  17. <script language="javascript">
  18. function goodsNoTejiaDel(goodsId)
  19. {
  20. if(confirm('您确定删除吗?'))
  21. {
  22. window.location.href="<%=path %>/goodsNoTejiaDel.action?goodsId="+goodsId;
  23. }
  24. }
  25. function goodsNoTejiaAdd()
  26. {
  27. var url="<%=path %>/toAddGoods.action";
  28. //var n="";
  29. //var w="480px";
  30. //var h="500px";
  31. //var s="resizable:no;help:no;status:no;scroll:yes";
  32. //openWin(url,n,w,h,s);
  33. window.location.href=url;
  34. }
  35. function over(picPath)
  36. {
  37. if (picPath=="")picPath="/images/default.jpg";
  38. x = event.clientX;
  39. y = event.clientY;
  40. document.all.tip.style.display = "block";
  41. document.all.tip.style.top = y;
  42. document.all.tip.style.left = x+10;
  43. document.all.photo.src = ".."+picPath;
  44. }
  45. function out()
  46. {
  47. document.all.tip.style.display = "none";
  48. }
  49. function xiangqin(goodsId)
  50. {
  51. var pop=new Popup({ contentType:1,isReloadOnClose:false,width:800,height:600});
  52. pop.setContent("contentUrl","<%=path %>/goodsDetailHou.action?goodsId="+goodsId);
  53. pop.setContent("title","商品详细介绍");
  54. pop.build();
  55. pop.show();
  56. }
  57. </script>
  58. </head>
  59. <body leftmargin="2" topmargin="2"
  60. background='<%=path %>/images/allbg.gif'>
  61. <div >
  62. <form action="<%=path%>/goodsManaNoTejia.action" name="formAdd" method="post">
  63. <div class="layui-inline" style=" width: 98%;margin: 10px auto;">
  64. 商品名称:
  65. <input class="" name="serName" id="serName" value ="${serName}" style="width: 340px;"/>
  66. <input type="submit" value="查询" style="width: 80px;"/>
  67. </div>
  68. </form>
  69. </div>
  70. <pg:pager url="goodsManaNoTejia.action" items="${itemSize}"
  71. maxPageItems="${pageItem}" maxIndexPages="${pageItem}"
  72. isOffset="${true}" export="offset,currentPageNumber=pageNumber"
  73. scope="request">
  74. <pg:param name="serName" value="${serName}"/>
  75. <table width="98%" border="0" cellpadding="2" cellspacing="1"
  76. bgcolor="#D1DDAA" align="center" style="margin-top: 8px">
  77. <tr bgcolor="#E7E7E7">
  78. <td height="14" colspan="7" background="<%=path %>/images/tbg.gif">
  79. &nbsp;商品管理&nbsp;
  80. </td>
  81. </tr>
  82. <tr align="center" bgcolor="#FAFAF1" height="22">
  83. <td >商品名称</td>
  84. <td width="100px">分类</td>
  85. <td width="80px">商品图片</td>
  86. <td width="120px">价格</td>
  87. <td width="120px">库存</td>
  88. <td width="60px">状态</td>
  89. <td width="200px">操作</td>
  90. </tr>
  91. <c:forEach items="${goodsList}" var="goods">
  92. <tr align='center' bgcolor="#FFFFFF" height="22">
  93. <td bgcolor="#FFFFFF" align="center">
  94. ${goods.goodsName}
  95. </td>
  96. <td bgcolor="#FFFFFF" align="center">
  97. ${goods.goodsCatelogName}
  98. </td>
  99. <td bgcolor="#FFFFFF" align="center">
  100. <div onmouseover="over('<%=path %>/${goods.goodsPic}')"
  101. onmouseout="out()" style="cursor: hand;">
  102. 查看图片
  103. </div>
  104. </td>
  105. <td bgcolor="#FFFFFF" align="center">
  106. ${goods.goodsShichangjia}
  107. </td>
  108. <td bgcolor="#FFFFFF" align="center">
  109. ${goods.kucun} <c:if test="${goods.kucun<=50}">
  110. <font color="red"> 【 库存不足 】</font>
  111. </c:if>
  112. </td>
  113. <td bgcolor="#FFFFFF" align="center">
  114. <c:if test="${goods.goodsDel==0}">
  115. 下架
  116. </c:if>
  117. <c:if test="${goods.goodsDel==1}">
  118. 上架
  119. </c:if>
  120. </td>
  121. <td bgcolor="#FFFFFF" align="center">
  122. <a href="<%=path %>/toUpdate.action?goodsId=${goods.goodsId}"
  123. class="pn-loperator">编辑</a>
  124. <a href="#" onclick="goodsNoTejiaDel(${goods.goodsId})"
  125. class="pn-loperator">删除</a>
  126. <c:if test="${goods.goodsDel==0}">
  127. <a
  128. href="<%=path %>/updateDel.action?goodsId=${goods.goodsId}&del=1"
  129. class="pn-loperator">上架</a>
  130. </c:if>
  131. <c:if test="${goods.goodsDel==1}">
  132. <a
  133. href="<%=path %>/updateDel.action?goodsId=${goods.goodsId}&del=0"
  134. class="pn-loperator">下架</a>
  135. </c:if>
  136. <c:if test="${goods.tj==0}">
  137. <a
  138. href="<%=path %>/updateTj.action?goodsId=${goods.goodsId}&tj=1"
  139. class="pn-loperator">主打</a>
  140. </c:if>
  141. <c:if test="${goods.tj==1}">
  142. <a
  143. href="<%=path %>/updateTj.action?goodsId=${goods.goodsId}&tj=0"
  144. class="pn-loperator">取消主打</a>
  145. </c:if>
  146. </td>
  147. </tr>
  148. </c:forEach>
  149. </table>
  150. <jsp:include page="/pagination_tag.jsp" flush="true" />
  151. <pg:index>
  152. </pg:index>
  153. </pg:pager>
  154. <table width='98%' border='0'
  155. style="margin-top: 8px; margin-left: 5px;">
  156. <tr>
  157. <td>
  158. <input type="button" value="添加" style="width: 80px;"
  159. onclick="goodsNoTejiaAdd()" />
  160. </td>
  161. </tr>
  162. </table>
  163. <div id="tip"
  164. style="position: absolute; display: none; border: 0px; width: 80px; height: 80px;">
  165. <table id="tipTable" border="0" bgcolor="#ffffee">
  166. <tr align="center">
  167. <td>
  168. <img id="photo" src="" height="80" width="80" />
  169. </td>
  170. </tr>
  171. </table>
  172. </div>
  173. </body>
  174. </html>