📄 foodtypeinfo.jsp
字号:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
<html:html>
<head>
<link rel="stylesheet" type="text/css" href="manage/style_css/manage_style.css">
<script>
function changebgColor(who){
if(who.style.backgroundColor==''){
who.style.backgroundColor='#dde8ff';
}else{
who.style.backgroundColor='';
}
}
function to_preEdit(id1,id2){
var tr1=document.getElementById(id1);
var tr2=document.getElementById(id2);
if(tr2.style.display=='none'){
tr2.style.display='block';
tr1.style.display='none';
}
}
function to_edit(id,fstname,fbtid){
window.document.fm.action="editFoodType.do?fstid="+id+"&fstname="+fstname+"&fbtid="+fbtid;
window.document.fm.submit();
}
function button_addsmalltype(){
window.document.fm.action="addFoodSmallType.do";
window.document.fm.submit();
}
function button_preAddSmalltype(){
var smalltypetable=document.getElementById("smalltype");
if(smalltypetable.style.display=='none'){
smalltypetable.style.display='block';
}
}
function checkAll(who){
var fstids=document.getElementsByName("fstids");
for(var i=0;i<fstids.length;i++){
fstids[i].checked=who.checked;
}
}
</script>
</head>
<body>
<form action="" method="post" name="fm">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="50" valign="bottom" class="font_style_title"><img src="enterprise/image/client.gif"/>餐饮类型管理:</td>
</tr>
<tr>
<td><hr/></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="bg_style_title">
<td width="50" height="30" align="center"> </td>
<td width="200">小分类名称</td>
<td width="230">所属大分类</td>
<td colspan="3" align="center">操作</td>
</tr>
<logic:iterate id="foodsmalltype" name="FoodSmallType" indexId="index" length="<%=request.getAttribute("PageSize").toString() %>" offset="<%=request.getAttribute("PageStartRow").toString() %>">
<tr id="d${index+1}" class="font_style_normal" onmouseover="changebgColor(this)" onmouseout="changebgColor(this)">
<td height="25" align="center"> <input type="checkbox" name="fstids" value="${foodsmalltype.fstId }" /> </td>
<td>${foodsmalltype.fstName }</td>
<td>${foodsmalltype.foodBigType.fbtName }</td>
<td align="right"><a href="javascript:void()" onclick="to_preEdit('d${index+1}','c${index+1}');" class="menu_font_style">编辑</a></td>
<td width="10" align="center"> </td>
<td align="left"><a href="#" class="menu_font_style">删除</a></td>
</tr>
<tr id="c${index+1}" style="display: none;" class="font_style_normal" onmouseover="changebgColor(this)" onmouseout="changebgColor(this)">
<td height="25" align="center"><input type="checkbox" name="eids2" value="${foodsmalltype.fstId }" /></td>
<td><input type="text" name="fst${index+1}" value="${foodsmalltype.fstName }" class="text_style"></td>
<td>
<select name="fbt${index+1}">
<logic:iterate id="foodbigtype" name="FoodBigType">
<option value="${foodbigtype.fbtId }">${foodbigtype.fbtName }</option>
</logic:iterate>
</select> </td>
<td align="right"><a href="javascript:to_edit('${foodsmalltype.fstId}','fst${index+1}','fbt${index+1}');" class="menu_font_style">确定</a></td>
<td width="10" align="center"></td>
<td align="left"><a href="findAllFoodType.do" class="menu_font_style">取消</a></td>
</tr>
</logic:iterate>
<tr class="font_style_normal">
<td height="40" colspan="3">全选:
<input type="checkbox" name="checkbox2" value="checkbox" onclick="checkAll(this);"/> <input type="button" name="Submit" value="删除所选记录"/>
<input type="button" name="Submit3" value="添加小分类" onclick="button_preAddSmalltype();"/>
</td>
<td height="40" colspan="3" align="right">
| <a href="findAllFoodType.do?page=1" class="menu_font_style">首页</a>
| <a href="findAllFoodType.do?page=<%=request.getAttribute("BackPage") %>" class="menu_font_style">上一页</a>
| <a href="findAllFoodType.do?page=<%=request.getAttribute("NextPage") %>" class="menu_font_style">下一页</a>
| <a href="findAllFoodType.do?page=<%=request.getAttribute("TotalPage") %>" class="menu_font_style">尾页</a> |
</td>
</tr>
</table>
<table id="smalltype" style="display: none;" class="font_style_normal" width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="200" height="30" align="right">小分类名称:</td>
<td width="172"><input type="text" name="smalltype" class="text_style"/></td>
<td width="100">所属大分类:</td>
<td width="100">
<select name="bigtypeid">
<logic:iterate id="foodbigtype" name="FoodBigType">
<option value="${foodbigtype.fbtId }">${foodbigtype.fbtName }</option>
</logic:iterate>
</select>
</td>
<td><input type="button" name="Submit5" value="添加" onclick="button_addsmalltype();"/></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -