📄 produit_add.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<jsp:directive.page import="com.captainli.dboperation.BigclassDA"/>
<jsp:directive.page import="com.captainli.bean.BigclassBean"/>
<jsp:directive.page import="com.captainli.dboperation.UnitDA"/>
<jsp:directive.page import="com.captainli.struts.form.ProduitForm"/>
<jsp:directive.page import="com.captainli.bean.UnitBean"/>
<%
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 'produit_add.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;
}
-->
</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) {
p_sc_id.innerHTML=http_request.responseText;
} else {
alert('您请求的页面发现错误');
}
}
}
</script>
<script type="text/javascript" language="javascript">
function F_super(){
var pbcid = document.getElementById("p_bc_id").value;
createRequest("../utilPages/selectSmallclass_ajax.jsp?sc_bc_id="+pbcid); //实现级联下拉列表
}
</script>
<script type="text/javascript" language="javascript">
function check(){
if(form1.p_bc_id.value == "0"){
window.alert("请选择药品的大类!");
form1.p_bc_id.focus();
return false;
}
if(form1.p_sc_id.value == "0"){
window.alert("请选择药品的小类");
form1.p_sc_id.focus();
return false;
}
if(form1.p_name.value == ""){
window.alert("请输入药品的全名(中文名)!");
form1.p_name.focus();
return false;
}
if(form1.p_unit.value == "0"){
window.alert("请选择药品基本的计量单位!");
form1.p_unit.focus();
return false;
}
}
</script>
</head>
<%
ArrayList arry = new BigclassDA().selectBigClass();//大类
ArrayList arrunit = new UnitDA().selectUnit();
%>
<body>
<form name="form1" method="post" action="../produit.do?method=addProduit">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/system/r_1.gif" alt="" /></td>
<td width="100%" background="../images/system/r_0.gif"><table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td> 药品资料添加(带*号的为必填项)</td>
<td align="right"> </td>
</tr>
</table></td>
<td><img src="../images/system/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td><table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<tr>
<td align="right" height="30">所属药品大类:</td>
<td class="category">
<select name="p_bc_id" id="p_bc_id" onChange="F_super()">
<option value="0">--请选择药品大类--</option><%
for(int i = 0;i < arry.size();i++){
BigclassBean bean = (BigclassBean)arry.get(i);
%>
<option value="<%= bean.getBc_id() %>"><%= bean.getBc_name() %></option>
<%} %>
</select> <font color="#ff0000">*</font></td>
</tr>
<tr>
<td align="right" height="30">所属药品小类:</td>
<td class="category" id="p_sc_id">
<select name="p_sc_id" id="p_sc_id">
<option>--请选择药品小类--</option>
</select> <font color="#ff0000">*</font>
</td>
</tr>
<tr>
<td width="20%" height="30" align="right">药品全名:</td>
<td width="80%" class="category"><input name="p_name" type="text" id="p_name" style="width:200px;" onBlur="javascript:document.form1.p_pinyin.value=pinyin(this.value);">
<font color="#ff0000">*</font></td>
</tr>
<tr>
<td align="right" height="30">拼音码:</td>
<td class="category"><input name="p_pinyin" type="text" id="p_pinyin" style="width:200px" readonly="readonly">
<font color="#ff0000">*</font></td>
</tr>
<tr>
<td align="right" height="30">化学名:</td>
<td class="category"><input name="p_chaname" type="text" id="p_chaname" style="width:200px;"></td>
</tr>
<tr>
<td align="right" height="30">英文名:</td>
<td class="category"><input name="p_engname" type="text" id="p_engname" style="width:200px;"></td>
</tr>
<tr>
<td align="right" height="30">规格:</td>
<td class="category"><input name="p_spe" type="text" id="p_spe" style="width:200px"></td>
</tr>
<tr>
<td align="right" height="30">生产许可证号:</td>
<td class="category"><input name="p_pro" type="text" id="p_pro" style="width:200px"></td>
</tr>
<tr>
<td align="right" height="30">生产厂家:</td>
<td class="category"><input name="p_fac" type="text" id="p_fac" style="width:200px;"></td>
</tr>
<tr>
<td align="right" height="30">基本单位:</td>
<td class="category"><select name="p_unit" id="p_unit">
<option value="0">--请选择基本计量单位--</option><%
for(int i = 0;i < arrunit.size();i++){
UnitBean bean = (UnitBean)arrunit.get(i);
%>
<option value="<%= bean.getU_name() %>"><%= bean.getU_name() %></option><%} %>
</select> <font color="#ff0000">*</font> <input type="button" value="添加计量单位" onClick="window.location.href='unit_add.jsp'" class="button"></td>
</tr>
<tr>
<td align="right" height="30">批准文号:</td>
<td class="category"><div style="position:relative;">
<span style="margin-left:100px;width:18px;overflow:hidden;"><select style="width:118px;margin-left:-100px;" onChange="this.parentNode.nextSibling.value=this.value">
<option value=""></option>
<option value="国药准字">国药准字</option>
<option value="国药试字">国药试字</option>
<option value="(年号)卫药准字">(年号)卫药准字</option>
<option value="(年号)卫药试字">(年号)卫药试字</option>
<option value="国药准字()">国药准字()</option>
<option value="国药试字()">国药试字()</option>
<option value="国药准字XF">国药准字XF</option>
<option value="ZZ 国药准字ZF">ZZ 国药准字ZF</option>
<option value="国药准字SF">国药准字SF</option>
</select></span><input name="p_appnum" id="p_appnum" style="width:100px;position:absolute;left:0px;">
</div></td>
</tr>
<tr>
<td align="right" height="30">有效期(月):</td>
<td class="category"><input name="p_validitym" type="text" id="p_validitym" style="width:200px"></td>
</tr>
<tr>
<td align="right" height="30">有效期(天):</td>
<td class="category"><input name="p_validityd" type="text" id="p_validityd" style="width:200px"></td>
</tr>
<tr>
<td align="right" height="30">储藏条件:</td>
<td class="category"><input name="p_storage" type="text" id="p_storage" style="width:200px"></td>
</tr>
<tr>
<td align="right" height="30">产品备注:</td>
<td class="category"><textarea name="p_note" cols="60" rows="3" id="p_note"></textarea>
</td>
</tr>
<tr>
<td height="30"> </td>
<td class="category"><input type="submit" value=" 确认添加 " onClick="return check()" class="button">
<input type="reset" value=" 重新填写 " class="button">
<input type="button" value=" 放弃添加返回 " onClick="window.history.go(-1)" class="button">
</td>
</tr>
</table></td>
<td></td>
</tr>
<tr>
<td><img src="../images/system/r_4.gif" alt="" /></td>
<td></td>
<td><img src="../images/system/r_3.gif" alt="" /></td>
</tr>
</table>
</form>
</body>
</html>
<script language="vbscript">
function vbChr(c)
vbChr = chr(c)
end function
function vbAsc(n)
vbAsc = asc(n)
end function
</script>
<script language="javascript">
var py1=new Array(20319,
20317,
20304,
20295,
20292,
20283,
20265,
20257,
20242,
20230,
20051,
20036,
20032,
20026,
20002,
19990,
19986,
19982,
19976,
19805,
19784,
19775,
19774,
19763,
19756,
19751,
19746,
19741,
19739,
19728,
19725,
19715,
19540,
19531,
19525,
19515,
19500,
19484,
19479,
19467,
19289,
19288,
19281,
19275,
19270,
19263,
19261,
19249,
19243,
19242,
19238,
19235,
19227,
19224,
19218,
19212,
19038,
19023,
19018,
19006,
19003,
18996,
18977,
18961,
18952,
18783,
18774,
18773,
18763,
18756,
18741,
18735,
18731,
18722,
18710,
18697,
18696,
18526,
18518,
18501,
18490,
18478,
18463,
18448,
18447,
18446,
18239,
18237,
18231,
18220,
18211,
18201,
18184,
18183,
18181,
18012,
17997,
17988,
17970,
17964,
17961,
17950,
17947,
17931,
17928,
17922,
17759,
17752,
17733,
17730,
17721,
17703,
17701,
17697,
17692,
17683,
17676,
17496,
17487,
17482,
17468,
17454,
17433,
17427,
17417,
17202,
17185,
16983,
16970,
16942,
16915,
16733,
16708,
16706,
16689,
16664,
16657,
16647,
16474,
16470,
16465,
16459,
16452,
16448,
16433,
16429,
16427,
16423,
16419,
16412,
16407,
16403,
16401,
16393,
16220,
16216,
16212,
16205,
16202,
16187,
16180,
16171,
16169,
16158,
16155,
15959,
15958,
15944,
15933,
15920,
15915,
15903,
15889,
15878,
15707,
15701,
15667,
15661,
15659,
15652,
15681,
15640,
15631,
15625,
15454,
15448,
15436,
15435,
15419,
15416,
15408,
15394,
15385,
15377,
15375,
15369,
15363,
15362,
15183,
15180,
15165,
15158,
15153,
15150,
15149,
15144,
15143,
15141,
15140,
15139,
15128,
15121,
15119,
15117,
15110,
15109,
14941,
14937,
14933,
14929,
14928,
14926,
14930,
14922,
14921,
14914,
14908,
14902,
14894,
14889,
14882,
14873,
14871,
14857,
14678,
14674,
14670,
14668,
14663,
14654,
14645,
14630,
14594,
14429,
14407,
14399,
14384,
14379,
14368,
14355,
14353,
14345,
14170,
14159,
14151,
14149,
14145,
14140,
14137,
14135,
14125,
14123,
14122,
14112,
14109,
14099,
14097,
14094,
14092,
14090,
14087,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -