📄 editproduct.jsp
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.doone.data.DataTable,
java.util.Date,
com.doone.data.DacClient,
java.text.SimpleDateFormat,
com.doone.fj1w.common.SystemConfig,
com.doone.fj1w.fjmgr.config.ArticleBean,
com.doone.fj1w.fjmgr.config.ProductBean,
com.doone.uurm.*,
java.util.Iterator"%>
<%request.setCharacterEncoding("GBK");%>
<%String sPurvICode="NGB007009";%>
<%
WebAuth auth = WebAuth.getInstance(request);
if ( ! auth.IsAuthed() ) {
out.write("<script language=\"javascript\">self.parent.location.replace(\"" + request.getContextPath() + "/view/login/login.jsp" + "\");</script>");
return;
}
else if ( ! auth.CheckPurv(sPurvICode) ) {
out.write("<script language=javascript src=\"../../common/script/RightForbidden.js\"></script>");
return;
}
%>
<html>
<head>
<title>编辑产品</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="../../common/style/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="../../common/script/ChangeStyle.js"></script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="OuterTable">
<tr>
<td class="InnerHead" colspan="7">
<jsp:include page="../../common/inc_top.jsp" >
<jsp:param name="purvCode" value="<%=sPurvICode%>"/>
</jsp:include>
</td>
</tr>
</table>
<%
String[] id = request.getParameterValues("id");
ProductBean pb = new ProductBean();
//ArticleBean ab = new ArticleBean();
DataTable[] productlist = pb.getProductsById(new DacClient(),id);
String[] productName = new String[productlist.length];
String upproductId[] = new String[productlist.length];
//String upproductName[] = new String[productlist.length];
String bssproductcode[] = new String[productlist.length];
String cityCode[] = new String[productlist.length];
for(int j=0;j<productlist.length;j++){
for(int i=0;i<productlist[j].getRows().getCount();i++) {
bssproductcode[j] = productlist[j].getRow(i).getString("Bssproductcode");
productName[j] = productlist[j].getRow(i).getString("ProductName");
upproductId[j] = productlist[j].getRow(i).getString("UpproductId");
cityCode[j] = productlist[j].getRow(i).getString("CityCode");
}
}
DataTable temp = pb.getAllProductByCity(new DacClient(),auth.getCityCode());//所以的产品类型
%>
<form method="post" action="<%=request.getContextPath()%>/editProduct" name="EditProductList">
<%
for(int i=0;i<id.length;i++){
out.println("<input type=\"hidden\" name=\"PRODUCTID\" value=\""+id[i]+"\"/>");
}
%>
<table width="100%" border="1" cellpadding="1" cellspacing="1" class="OuterTable">
<tr>
<td class="OuterHead" colspan="9">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td nowrap="nowrap" style="text-align:left">
<span id="ItemTitle"><font face="webdings">8</font>编辑产品</span>
</td>
<td align="right" nowrap><span id="ItemTitle"> </span>
</td>
</tr>
</table>
</td>
</tr>
<tr class="InnerMain">
<td class="InnerHead" style="text-align:right" nowrap>
产品名称(产品ID)
</td>
<td class="InnerMain">
<select name="PRODUCT">
<%
for(int i=0;i<productName.length;i++){
out.println("<option value=\""+id[i]+"\">"+productName[i]+"("+id[i]+")</option>");
}
%>
</select>
</td>
</tr>
<tr class="InnerMain">
<td class="InnerHead" style="text-align:right" nowrap>
修改产品类型
</td>
<td class="InnerMain">
<select name="UPPROTUCT">
<%
for(int k=0;k<temp.getRows().getCount();k++) {
%>
<option value="<%=temp.getRow(k).getString("ProductId")%>">
<%=temp.getRow(k).getString("ProductName")%>
</option>
<%
}
%>
</select>
</td>
</tr>
<tr class="InnerMain">
<td class="InnerHead" style="text-align:right" width="171" nowrap>
产品状态
</td>
<td class="InnerMain" width="585">
<input name="STATE" type="radio" value="E" checked> 在用</input>
<input name="STATE" type="radio" value="D">禁用</input>
</td>
</tr>
<tr class="InnerMain"><td colspan="8" class="body_td" bgcolor="#e0e0e0"><img src="../../common/images/spacer.gif"/></td></tr>
<tr>
<td class="OuterFoot" colspan="9">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td nowrap="nowrap" style="text-align:left"><span id="ItemTitle"></span></td>
<td align="right" nowrap>
<input type="submit" name="Submit" class="button" value="确定编辑?" style="width:80" >
<input type="button" class="button" value="关闭" style="width:36" onclick="self.close()">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -