123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- <%@ page language="java" pageEncoding="UTF-8"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
- <%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
- <%
- String path = request.getContextPath();
- %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="pragma" content="no-cache" />
- <meta http-equiv="cache-control" content="no-cache" />
- <meta http-equiv="expires" content="0" />
- <meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
- <meta http-equiv="description" content="This is my page" />
- <link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
- <script type="text/javascript" src="<%=path %>/js/popup.js"></script>
- <script language="javascript">
- function goodsNoTejiaDel(goodsId)
- {
- if(confirm('您确定删除吗?'))
- {
- window.location.href="<%=path %>/goodsNoTejiaDel.action?goodsId="+goodsId;
- }
- }
-
- function goodsNoTejiaAdd()
- {
- var url="<%=path %>/toAddGoods.action";
- //var n="";
- //var w="480px";
- //var h="500px";
- //var s="resizable:no;help:no;status:no;scroll:yes";
- //openWin(url,n,w,h,s);
- window.location.href=url;
- }
-
- function over(picPath)
- {
- if (picPath=="")picPath="/images/default.jpg";
- x = event.clientX;
- y = event.clientY;
- document.all.tip.style.display = "block";
- document.all.tip.style.top = y;
- document.all.tip.style.left = x+10;
- document.all.photo.src = ".."+picPath;
- }
- function out()
- {
- document.all.tip.style.display = "none";
- }
- function xiangqin(goodsId)
- {
- var pop=new Popup({ contentType:1,isReloadOnClose:false,width:800,height:600});
- pop.setContent("contentUrl","<%=path %>/goodsDetailHou.action?goodsId="+goodsId);
- pop.setContent("title","商品详细介绍");
- pop.build();
- pop.show();
- }
- </script>
- </head>
- <body leftmargin="2" topmargin="2"
- background='<%=path %>/images/allbg.gif'>
- <div >
- <form action="<%=path%>/goodsManaNoTejia.action" name="formAdd" method="post">
- <div class="layui-inline" style=" width: 98%;margin: 10px auto;">
- 商品名称:
- <input class="" name="serName" id="serName" value ="${serName}" style="width: 340px;"/>
- <input type="submit" value="查询" style="width: 80px;"/>
- </div>
- </form>
- </div>
- <pg:pager url="goodsManaNoTejia.action" items="${itemSize}"
- maxPageItems="${pageItem}" maxIndexPages="${pageItem}"
- isOffset="${true}" export="offset,currentPageNumber=pageNumber"
- scope="request">
-
- <pg:param name="serName" value="${serName}"/>
-
- <table width="98%" border="0" cellpadding="2" cellspacing="1"
- bgcolor="#D1DDAA" align="center" style="margin-top: 8px">
- <tr bgcolor="#E7E7E7">
- <td height="14" colspan="7" background="<%=path %>/images/tbg.gif">
- 商品管理
- </td>
- </tr>
- <tr align="center" bgcolor="#FAFAF1" height="22">
- <td >商品名称</td>
-
- <td width="100px">分类</td>
- <td width="80px">商品图片</td>
- <td width="120px">价格</td>
- <td width="120px">库存</td>
- <td width="60px">状态</td>
- <td width="200px">操作</td>
- </tr>
- <c:forEach items="${goodsList}" var="goods">
- <tr align='center' bgcolor="#FFFFFF" height="22">
- <td bgcolor="#FFFFFF" align="center">
- ${goods.goodsName}
- </td>
-
- <td bgcolor="#FFFFFF" align="center">
- ${goods.goodsCatelogName}
- </td>
- <td bgcolor="#FFFFFF" align="center">
- <div onmouseover="over('<%=path %>/${goods.goodsPic}')"
- onmouseout="out()" style="cursor: hand;">
- 查看图片
- </div>
- </td>
- <td bgcolor="#FFFFFF" align="center">
- ${goods.goodsShichangjia}
- </td>
- <td bgcolor="#FFFFFF" align="center">
- ${goods.kucun} <c:if test="${goods.kucun<=50}">
- <font color="red"> 【 库存不足 】</font>
- </c:if>
- </td>
- <td bgcolor="#FFFFFF" align="center">
- <c:if test="${goods.goodsDel==0}">
- 下架
- </c:if>
- <c:if test="${goods.goodsDel==1}">
- 上架
- </c:if>
- </td>
-
- <td bgcolor="#FFFFFF" align="center">
-
- <a href="<%=path %>/toUpdate.action?goodsId=${goods.goodsId}"
- class="pn-loperator">编辑</a>
-
- <a href="#" onclick="goodsNoTejiaDel(${goods.goodsId})"
- class="pn-loperator">删除</a>
-
-
- <c:if test="${goods.goodsDel==0}">
- <a
- href="<%=path %>/updateDel.action?goodsId=${goods.goodsId}&del=1"
- class="pn-loperator">上架</a>
- </c:if>
- <c:if test="${goods.goodsDel==1}">
- <a
- href="<%=path %>/updateDel.action?goodsId=${goods.goodsId}&del=0"
- class="pn-loperator">下架</a>
- </c:if>
-
-
-
-
- <c:if test="${goods.tj==0}">
- <a
- href="<%=path %>/updateTj.action?goodsId=${goods.goodsId}&tj=1"
- class="pn-loperator">主打</a>
- </c:if>
-
- <c:if test="${goods.tj==1}">
- <a
- href="<%=path %>/updateTj.action?goodsId=${goods.goodsId}&tj=0"
- class="pn-loperator">取消主打</a>
- </c:if>
-
- </td>
- </tr>
- </c:forEach>
- </table>
- <jsp:include page="/pagination_tag.jsp" flush="true" />
- <pg:index>
- </pg:index>
- </pg:pager>
- <table width='98%' border='0'
- style="margin-top: 8px; margin-left: 5px;">
- <tr>
- <td>
- <input type="button" value="添加" style="width: 80px;"
- onclick="goodsNoTejiaAdd()" />
- </td>
- </tr>
- </table>
- <div id="tip"
- style="position: absolute; display: none; border: 0px; width: 80px; height: 80px;">
- <table id="tipTable" border="0" bgcolor="#ffffee">
- <tr align="center">
- <td>
- <img id="photo" src="" height="80" width="80" />
- </td>
- </tr>
- </table>
- </div>
- </body>
- </html>
|