📄 stock_inquiry.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<jsp:directive.page import="com.captainli.dboperation.WarehouseDA"/>
<jsp:directive.page import="com.captainli.bean.WarehouseBean"/>
<jsp:directive.page import="com.captainli.dboperation.BigclassDA"/>
<jsp:directive.page import="com.captainli.bean.BigclassBean"/>
<%
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 'stock_inquiry.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 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) {
xiaolei.innerHTML=http_request.responseText;
} else {
alert('您请求的页面发现错误');
}
}
}
</script>
<script type="text/javascript" language="javascript">
function cangku(){
var pwid = document.getElementById("p_w_id").value;
var pbcid = document.getElementById("p_bc_id").value;
var pscid = document.getElementById("p_sc_id").value;
document.getElementById("stockinquiryframe").src="stock_inquiry_frame.jsp?p_w_id="+pwid+"&p_bc_id="+pbcid+"&p_sc_id="+pscid+"";
}
function F_super(){
var pbcid = document.getElementById("p_bc_id").value;
createRequest("../utilPages/stock_inquiry_class_ajax.jsp?sc_bc_id="+pbcid); //实现级联下拉列表
var pwid = document.getElementById("p_w_id").value;
var pscid = document.getElementById("p_sc_id").value;
document.getElementById("stockinquiryframe").src="stock_inquiry_frame.jsp?p_w_id="+pwid+"&p_bc_id="+pbcid+"&p_sc_id="+pscid+"";
}
function xiao(){
var pwid = document.getElementById("p_w_id").value;
var pbcid = document.getElementById("p_bc_id").value;
var pscid = document.getElementById("p_sc_id").value;
document.getElementById("stockinquiryframe").src="stock_inquiry_frame.jsp?p_w_id="+pwid+"&p_bc_id="+pbcid+"&p_sc_id="+pscid+"";
}
function sel(){
var j = document.getElementById("p_name").value;
if(form1.p_name.value == ""){
alert("请输入要查询药品的名称或者拼音码!");
form1.p_name.focus();
return false;
}
document.getElementById("stockinquiryframe").src="stock_inquiry_frame.jsp?p_name="+j;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<%
//获得仓库信息
ArrayList arryWar = new WarehouseDA().selectWarehouse();
//药品大类
ArrayList arryBig = new BigclassDA().selectBigClass();
%>
<body>
<form name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="4%"><img src="../images/system/print.jpg" width="36" height="34"></td>
<td width="6%"> </td>
<td width="20%" align="right">搜索:</td>
<td width="16%" align="center"> <select name="p_w_id" id="p_w_id" style="width:150px; " onchange="cangku()">
<option value="0">--请选择查询仓库--</option><%
for(int i = 0;i < arryWar.size();i++){
WarehouseBean bean = (WarehouseBean)arryWar.get(i);
%><option value="<%= bean.getU_id() %>"><%= bean.getU_name() %></option><%} %></select></td>
<td width="16%" align="center"><select name="p_bc_id" id="p_bc_id" onChange="F_super()" style="width:150px; ">
<option value="0">--所有药品大类--</option><%
for(int i = 0;i < arryBig.size();i++){
BigclassBean bean = (BigclassBean)arryBig.get(i);
%>
<option value="<%= bean.getBc_id() %>"><%= bean.getBc_name() %></option>
<%} %>
</select></td>
<td width="16%" align="center" id="xiaolei"><select name="p_sc_id" id="p_sc_id" style="width:150px; ">
<option value="0">--所有药品小类--</option>
</select></td>
<td width="17%" align="left"><input type="text" name="p_name" id="p_name" style="width:98%; "></td>
<td width="5%" align="right"><input name="Submit" type="button" class="button" value=" 查询 " onclick="return sel()"></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="stockinquiryframe" id="stockinquiryframe" src="stock_inquiry_frame.jsp"></iframe></td>
</tr>
</table></form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -