?? statistic.jsp
字號:
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@page contentType="text/html; charset=GBK"%>
<html:html>
<head>
<title>商品統計</title>
<script language="JavaScript" type="text/javascript" >
function doDifferent(obj)
{
if(obj =='search'){
if (statisticForm.timeFrom.value =="" || statisticForm.timeTo.value =="")
{
alert("請選擇(輸入)查詢時間范圍!");
return false;
}
else if(statisticForm.timeFrom.value > statisticForm.timeTo.value )
{
alert(" 開始日期不能大于截止日期!");
return false;
}
}
document.statisticForm.event.value= obj;
document.statisticForm.submit();
}
</script></head>
<body>
<%@include file="manageMenu.jsp"%>
<html:form action="/statisticAction.do" method="POST">
<html:hidden property="event" value="save"/>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableprintable">
<tr align="center">
<td align="center" class="tdbg1"> 時期范圍:
<html:text name="statisticForm" property="timeFrom" size="10"/>
<button pattern="date" target="timeFrom">…</button>
至
<html:text name="statisticForm" property="timeTo" size="10"/>
<button pattern="date" target="timeTo">…</button>
</td>
<td align="center" class="tdbg1">
<html:button property="button1" value="統計" onclick="return doDifferent('search');" styleClass="button"/>
</td>
</tr>
</table>
<logic:equal name="statisticForm" property="event" value="search">
<table width="100%" border="0">
<tr>
<td bgcolor="#EEEEEE">
<div align="center">
<table border="1">
<tr>
<td>商品名稱</td>
<td>銷售數量</td>
<td>總金額</td>
</tr>
<logic:iterate id="item" name="statisticForm" property="statisticVOList">
<tr>
<td>
<bean:write name="item" property="productName"/>
</td>
<td>
<bean:write name="item" property="quantity" format="####"/>
</td>
<td>
<bean:write name="item" property="totalPrice" format="####.##"/>
</td>
</tr>
</logic:iterate>
</table>
</div>
</td>
</tr>
</table>
</logic:equal>
</html:form>
</body>
</html:html>
<script language="javascript" src="/shopping/js/calendar.js"></script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -