📄 money_find.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<jsp:directive.page import="java.text.SimpleDateFormat"/>
<jsp:directive.page import="com.captainli.struts.form.BankForm"/>
<jsp:directive.page import="com.captainli.dboperation.BankDA"/>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'money_find.jsp' starting page</title>
<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="../css/sys.css">
<style type="text/css">
<!--
body {
margin-left: 5px;
margin-top: 5px;
margin-right: 5px;
margin-bottom: 5px;
background-color: #FFFFFF;
}
a:link {
color: #1A438E;
text-decoration: underline;
}
a:visited {
text-decoration: underline;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: underline;
}
.style1 { color: #1A438E;
font-size: 12px;
}
.style2 { color:#FF0000;
font-size: 12px;
}
-->
</style>
<script type="text/javascript" language="javascript">
var http_request = false;
function createRequestone(url) {
//初始化对象并发出XMLHttpRequest请求
http_request = false;
if (window.XMLHttpRequest) { // Mozilla或其他除IE以外的浏览器
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType("text/xml");
}
} else if (window.ActiveXObject) { // IE浏览器
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert("不能创建XMLHTTP实例!");
return false;
}
http_request.onreadystatechange = alertContentsone; //指定响应方法
//发出HTTP请求
http_request.open("GET", url, true);
http_request.setRequestHeader("If-Modified-Since","0");
http_request.send(null);
}
function alertContentsone() { //处理服务器返回的信息
if (http_request.readyState == 4) {
if (http_request.status == 200) {
mmbcid.innerHTML=http_request.responseText;
} else {
alert('您请求的页面发现错误');
}
}
}
</script>
<script type="text/javascript" language="javascript">
var http_request = false;
function createRequest(url) {
//初始化对象并发出XMLHttpRequest请求
http_request = false;
if (window.XMLHttpRequest) { // Mozilla或其他除IE以外的浏览器
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType("text/xml");
}
} else if (window.ActiveXObject) { // IE浏览器
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert("不能创建XMLHTTP实例!");
return false;
}
http_request.onreadystatechange = alertContents; //指定响应方法
//发出HTTP请求
http_request.open("GET", url, true);
http_request.setRequestHeader("If-Modified-Since","0");
http_request.send(null);
}
function alertContents() { //处理服务器返回的信息
if (http_request.readyState == 4) {
if (http_request.status == 200) {
mmscid.innerHTML=http_request.responseText;
} else {
alert('您请求的页面发现错误');
}
}
}
</script>
<script type="text/javascript" language="javascript">
function loadCalendar(obj){//日期选择
//var rtn = window.open("../utilPages/calendar.jsp","","directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=350,height=170,top=180,left=550");
var rtn = window.showModalDialog("../utilPages/calendar.jsp","","dialogWidth:350px;dialogHeight:185px;status:no;help:no;scrolling=no;scrollbars=no");
if(rtn!=null)
obj.value=rtn;
return;
}
function subtime(){
var start = document.getElementById("startdate").value;
var end = document.getElementById("enddate").value;
if(start == ""){
window.alert("请输入查询开始日期!");
return false;
}
if(end == ""){
window.alert("请输入查询结束日期!");
return false;
}
document.getElementById("moneyfindframe").src = "money_find_frame.jsp?start_time="+start+"&end_time="+end+"";
}
function hongchong(){
document.getElementById("moneyfindframe").src = "money_findhongchong_frame.jsp";
}
</script>
<script type="text/javascript" language="javascript">
function subone(){
var mbctype = document.getElementById("m_mbc_type").value;
var mbid = document.getElementById("m_b_id").value;
var mmbcid = document.getElementById("m_mbc_id").value;
var mmscid = document.getElementById("m_msc_id").value;
createRequestone("../utilPages/money_find_selectBigclass.jsp?mbc_type="+mbctype);
document.getElementById("moneyfindframe").src = "money_find_frame.jsp?m_mbc_type="+mbctype+"&m_b_id="+mbid+"&m_mbc_id="+mmbcid+"&m_msc_id="+mmscid+"";
}
</script>
<script type="text/javascript" language="javascript">
function subsan(){
var mbctype = document.getElementById("m_mbc_type").value;
var mbid = document.getElementById("m_b_id").value;
var mmbcid = document.getElementById("m_mbc_id").value;
var mmscid = document.getElementById("m_msc_id").value;
createRequest("../utilPages/money_find_selectSmallClass.jsp?m_mbc_id="+mmbcid);
document.getElementById("moneyfindframe").src = "money_find_frame.jsp?m_mbc_type="+mbctype+"&m_b_id="+mbid+"&m_mbc_id="+mmbcid+"&m_msc_id="+mmscid+"";
}
function subbank(){
var mbctype = document.getElementById("m_mbc_type").value;
var mbid = document.getElementById("m_b_id").value;
var mmbcid = document.getElementById("m_mbc_id").value;
var mmscid = document.getElementById("m_msc_id").value;
document.getElementById("moneyfindframe").src = "money_find_frame.jsp?m_mbc_type="+mbctype+"&m_b_id="+mbid+"&m_mbc_id="+mmbcid+"&m_msc_id="+mmscid+"";
}
function subfour(){
var mbctype = document.getElementById("m_mbc_type").value;
var mbid = document.getElementById("m_b_id").value;
var mmbcid = document.getElementById("m_mbc_id").value;
var mmscid = document.getElementById("m_msc_id").value;
document.getElementById("moneyfindframe").src = "money_find_frame.jsp?m_mbc_type="+mbctype+"&m_b_id="+mbid+"&m_mbc_id="+mmbcid+"&m_msc_id="+mmscid+"";
}
</script>
</head>
<% //日期
String start_time = "";
String end_time = "";
//获得系统时间
Calendar cal=Calendar.getInstance();
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
String m_time=sdf.format(cal.getTime());
String nian = m_time.substring(0, 4);
String yue = m_time.substring(5, 7);
String ri = m_time.substring(8, 10);
if(yue.equals("01")){
String start_nian = String.valueOf(Integer.parseInt(nian) - 1);
String start_yue = "12";
String start_ri = "01";
start_time = start_nian + "-" + start_yue + "-" + start_ri;
end_time = m_time;
}else if(ri.equals("01")){
String start_nian = nian;
String start_yue = String.valueOf(Integer.parseInt(yue) - 1);
String start_ri = "01";
start_time = start_nian + "-" + start_yue + "-" + start_ri;
end_time = m_time;
}else{
String start_nian = nian;
String start_yue = yue;
String start_ri = "01";
start_time = start_nian + "-" + start_yue + "-" + start_ri;
end_time = m_time;
}
%>
<% //银行下拉列表
ArrayList arryBank = new BankDA().showBank();
%>
<body>
<form name="form1" method="post" action="">
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="100" height="21"><img src="../images/system/print.jpg" width="36" height="34" align="absmiddle" style="cursor:hand;" onClick="preview();"></td>
<td width="203" align="center"> </td>
<td width="170" align="right" id="mmbctype"><select id="m_mbc_type" name="m_mbc_type" onChange="subone()">
<option value="0">--所有帐务类型--</option>
<option value="1">收入</option>
<option value="2">支出</option>
</select></td>
<td width="170" align="right"><select name="m_b_id" id="m_b_id" onChange="subbank()">
<option value="0">--所有银行帐务--</option>
<% for(int i = 0;i < arryBank.size();i++){
BankForm form = (BankForm)arryBank.get(i);
%>
<option value="<%= form.getB_id() %>"><%= form.getB_name() %></option>
<%} %>
</select></td>
<td width="170" align="right" id="mmbcid"><select name="m_mbc_id" id="m_mbc_id">
<option value="0">--所有帐务大类--</option>
</select></td>
<td width="170" align="right" id="mmscid"><select name="m_msc_id" id="m_msc_id">
<option value="0">--所有帐务小类--</option>
</select></td>
</tr>
<tr>
<td width="100" align="left"><input name="Submit" type="button" class="button" value=" 冲红单据查询 " onclick="hongchong()"></td>
<td colspan="5" align="right">
开始日期:
<input name="startdate" id="startdate" readonly value="<%= start_time %>" style="width:100px">
<img src="../images/system/date.gif" width="19" height="19" align="absmiddle" style="cursor:hand;" onClick="loadCalendar(form1.startdate)"> 结束日期:
<input name="enddate" id="enddate" readonly value="<%= end_time %>" style="width:100px">
<img src="../images/system/date.gif" width="19" height="19" align="absmiddle" style="cursor:hand;" onClick="loadCalendar(form1.enddate)">
<input type="button" value=" 查询 " class="button" onclick="return subtime()">
</td>
</tr>
</table>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top"><iframe scrolling='no' width="100%" height="100%" frameborder="0" name="moneyfindframe" id="moneyfindframe" src="money_find_frame.jsp"></iframe></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -