?? mate_jfree.jsp
字號:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312" errorPage="error.jsp"%>
<jsp:directive.page import="common.*,imis_mate.common.*,imis_mate.DAO.*,imis_mate.bean.*"/>
<jsp:directive.page import="java.text.SimpleDateFormat"/>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
MaterialTypeDAO mate = (MaterialTypeDAO) DAOFactory.getInstance().getMaterialTypeDAO();
ArrayList list = mate.searchMaterialType(new MaterialTypeBean());
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'mate_JFree.jsp' starting page</title>
<script language="JavaScript" src="/Imis/imis_mate/js/checkdata.js"></script>
<link rel="stylesheet" type="text/css" href="/Imis/imis_mate/css/style.css">
<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="styles.css">
-->
<%Date date = new Date();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
String today = format.format(date); %>
</head>
<script type="text/javascript">
function piepie(){
if(checkTwoDate()){
<%-- form1.action="/Imis/servlet/Elec_JFreeChart?displayType=pie";--%>
form1.action = "/Imis/servlet/Mate_JFreeChartServlet?pattern=jfreePag&&displayType=pie"}
}
function barbar(){
if(checkTwoDate()){
<%-- form1.action="/Imis/servlet/Elec_JFreeChart?displayType=bar";--%>
form1.action = "/Imis/servlet/Mate_JFreeChartServlet?pattern=jfreePag&&displayType=bar"}
}
function tabletable(){
if(checkTwoDate()){
<%-- form1.action="/Imis/servlet/Elec_JFreeChart?displayType=line";--%>
form1.action = "/Imis/servlet/Mate_JFreeChartServlet?pattern=jfreePag&&displayType=line"}
}
function checkTwoDate() {
var startDate = document.form1.startDate.value;
var endDate = document.form1.endDate.value;
if( startDate > endDate ) {
alert("起始日期不能大于終止日期!");
return false;
}
return true;
}
function buyJfreePag() {
//采購統計
form2.action = "/Imis/servlet/Mate_JFreeChartServlet?pattern=buyJfreePag"
}
function outJfreePag() {
//領用統計
form2.action = "/Imis/servlet/Mate_JFreeChartServlet?pattern=outJfreePag";
}
</script>
<body BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 scrolling="auto" background="/Imis/imis_mate/images/bg_main.png">
<form name="form2" method="post" action="">
<table width="100%" border="0">
<tr>
<td height="20" valign="left" align="left" colspan="4" background="/Imis/imis_mate/images/bg_main2.png" class="tubiao"><font color="black">采購信息統計</font></td>
</tr>
<tr>
<td width="12%"><input type="submit" name="Submit3" value="采 購 統 計" onclick="buyJfreePag()" class="anniu"/></td>
<td width="88%"><input type="submit" name="Submit2" value="領 用 統 計" onclick="outJfreePag()" class="anniu"/></td>
<%-- <td width="73%"><input type="submit" name="Submit2" value="變 更 入 庫" onclick="BuyInsertPag()" class="anniu"/></td>--%>
</tr>
</table>
</form>
<form name="form1" action="" method="post">
<table class="ziti" width="100%">
<tr>
<td width="26%" align="right">物品類型:</td>
<td width="27%">
<select name="materialTypeNo" id="userId" class="text1">
<option value="all">全部類型</option>
<c:forEach items="<%=list %>" var="mateType">
<option value="${mateType.materialTypeNo}">${mateType.materialTypeName}</option>
</c:forEach>
</select>
</td>
<td width="17%"></td>
<td width="30%"></td>
</tr>
<tr>
<td align="right">
起始時間:
</td>
<td>
<input name="startDate" id="startDate" size="10" maxlength="10"
type="text" class="text1" readonly="readonly"
onMouseDown="javascript:setday(form1.startDate);" value="<%=today%>"/>
<%-- <Script class="text1">DateBox("startDate")</Script>--%>
</td>
</tr>
<tr>
<td align="right">
截止時間:
</td>
<td>
<input name="endDate" id="endDate" size="10" maxlength="10"
type="text" class="text1" readonly="readonly"
onMouseDown="javascript:setday(form1.endDate);" value="<%=today%>"/>
<%-- <Script class="text1">DateBox("endDate")</Script>--%>
</td>
</tr>
<tr>
<%-- <td align="right">采購部門:</td>--%>
<%-- <td>--%>
<%-- <select name="applyDep" id="applyDep" class="text1">--%>
<%-- <% --%>
<%-- --%>
<%-- int deptId = 0;--%>
<%-- String deptName = null;--%>
<%-- DepartmentsBean describe = new DepartmentsBean();--%>
<%-- ArrayList list3 = describe.getDepts();--%>
<%-- Iterator itr = list3.iterator();--%>
<%-- while (itr.hasNext()) {--%>
<%-- Hashtable ht = (Hashtable) itr.next(); --%>
<%-- deptId = Integer.parseInt(ht.get("deptId").toString());--%>
<%-- deptName = ht.get("deptName").toString(); --%>
<%-- --%>
<%-- %>--%>
<%-- <option value=<%=deptId%>><%=deptName%></option>--%>
<%-- <%--%>
<%-- }--%>
<%-- %>--%>
<%-- --%>
<%-- </select>--%>
<%-- </td>--%>
<td align="right">查詢類型:</td>
<td>
<select name="type" id="type" class="text1">
<option value="1">數量</option>
<option value="2">價格</option>
</select>
</td>
</tr>
<tr>
<td></td>
<td colspan="3">
<input type="submit" name="Submit" value="餅圖顯示" onclick="piepie()" class="anniu"/>
<input type="submit" name="Submit" value="柱狀圖顯示" onclick="barbar()" class="anniu"/>
<input type="submit" name="Submit" value="趨勢圖顯示" onclick="tabletable()" class="anniu"/>
</td>
</tr>
</table>
</form>
<c:if test="${requestScope.graphURL!=null}">
<table>
<tr>
<td> <img src="${requestScope.graphURL }" width=500 height=300 border=0 ></td>
</tr>
</table>
</c:if>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -