📄 produit_update.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<jsp:directive.page import="com.captainli.dboperation.ProduitDA"/>
<jsp:directive.page import="com.captainli.struts.form.ProduitForm"/>
<jsp:directive.page import="com.captainli.bean.BigclassBean"/>
<jsp:directive.page import="com.captainli.dboperation.BigclassDA"/>
<jsp:directive.page import="com.captainli.dboperation.SmallclassDA"/>
<jsp:directive.page import="com.captainli.bean.SmallclassBean"/>
<jsp:directive.page import="com.captainli.dboperation.UnitDA"/>
<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_update.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: #666666}
-->
</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) {
pscid.innerHTML=http_request.responseText;
} else {
alert('您请求的页面发现错误');
}
}
}
</script>
<script type="text/javascript" language="javascript">
function F_super(){
var pbcid = document.getElementById("p_bc_id").value;
//window.alert(pbcid);
createRequest("../utilPages/selectSmallclass_ajax.jsp?sc_bc_id="+pbcid); //实现级联下拉列表
}
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_pinyin.value == ""){
window.alert("请药品拼音自动获得!");
form1.p_pinyin.focus();
return false;
}
if(form1.p_unit.value == "0"){
window.alert("请选择药品基本的计量单位!");
form1.p_unit.focus();
return false;
}
}
</script>
</head>
<%
int p_id = Integer.parseInt(request.getParameter("pid"));//得到产品ID
ArrayList arrunit = new UnitDA().selectUnit();//计量单位
%>
<%
ArrayList arryBigclass = new BigclassDA().selectBigClass();//大类
ProduitForm form = new ProduitDA().showProduitById(p_id);//得到产品对象
ArrayList arrySmallclass = new SmallclassDA().selectSmallClassByID(form.getP_bc_id());//所属于大类下面所有的小类
%>
<body>
<form name="form1" method="post" action="../produit.do?method=updateProduit&pid=<%= p_id %>">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="../images/system/r_1.gif" alt="" width="6" height="27" /></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="" width="6" height="27" /></td>
</tr>
<tr>
<td></td>
<td><table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
<tr>
<td width="25%" height="30" align="right">所属药品大类:</td>
<td width="75%" class="category">
<select name="p_bc_id" id="p_bc_id" onChange="F_super()">
<option value="0">--请选择药品大类--</option><%
for(int i = 0;i < arryBigclass.size();i++){
BigclassBean bean = (BigclassBean)arryBigclass.get(i);
%>
<option value="<%= bean.getBc_id() %>" <%if(form.getP_bc_id() == bean.getBc_id()){ %>selected="selected"<%} %>><%= bean.getBc_name() %></option>
<%} %>
</select> <font color="#ff0000">*</font>
</td>
</tr>
<tr>
<td height="30" align="right">所属药品小类:</td>
<td class="category" id="pscid"><select name="p_sc_id" id="p_sc_id">
<option value="0">--请选择药品小类--</option><%
for(int i = 0;i < arrySmallclass.size();i++){
SmallclassBean bean = (SmallclassBean)arrySmallclass.get(i);
%>
<option value="<%= bean.getSc_id() %>" <%if(form.getP_sc_id() == bean.getSc_id()){ %>selected="selected"<%} %>><%= bean.getSc_name() %></option>
<%} %>
</select> <font color="#ff0000">*</font></td>
</tr>
<tr>
<td height="30" align="right">药品全名:</td>
<td class="category"><input name="p_name" type="text" id="p_name" value="<%= form.getP_name() %>" style="width:200px" onBlur="javascript:document.form1.p_pinyin.value=pinyin(this.value);">
<FONT color=#ff0000>*</FONT> <font color="#666666">(药品名不能为空)</font></td>
</tr>
<tr>
<td height="30" align="right">拼音码:</td>
<td class="category"><input name="p_pinyin" type="text" id="p_pinyin" value="<%= form.getP_pinyin() %>" readonly="readonly" style="width:200px">
<FONT color=#ff0000>*</FONT> <span class="style1">(药品拼音码自动生成)</span></td>
</tr>
<tr>
<td height="30" align="right">化学名:</td>
<td class="category"><input name="p_chaname" type="text" id="p_chaname" value="<%= form.getP_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" value="<%= form.getP_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" value="<%= form.getP_pro() %>" style="width:200px"></td>
</tr>
<tr>
<td align="right" height="30">生产学科证号:</td>
<td class="category"><input name="p_pro" type="text" id="p_pro" value="<%= form.getP_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" value="<%= form.getP_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() %>"<%if(form.getP_unit().equals(bean.getU_name())){ %>selected="selected"<%} %>><%= 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"><input name="p_appnum" type="text" id="l_mail6" value="<%= form.getP_appnum() %>" style="width:200px"></td>
</tr>
<tr>
<td align="right" height="30">有效期(月):</td>
<td class="category"><input name="p_validitym" type="text" id="p_validitym" value="<%= form.getP_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" value="<%= form.getP_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" value="<%= form.getP_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"><%= form.getP_note() %></textarea></td>
</tr>
<tr>
<td height="30"> </td>
<td class="category">
<input name="submit" type="submit" class="button" onClick="return check()" value=" 确认修改 ">
<input name="reset" type="reset" class="button" value=" 重置 ">
<input name="button" type="button" class="button" onClick="window.history.go(-1)" value=" 放弃修改返回 ">
</td>
</tr>
</table></td>
<td></td>
</tr>
<tr>
<td><img src="../images/system/r_4.gif" alt="" width="6" height="6" /></td>
<td></td>
<td><img src="../images/system/r_3.gif" alt="" width="6" height="6" /></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,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -