meal.jsp
来自「JavaEE订餐项目的功能:用户登录、用户注册、添加订餐信息、查询订餐、结算、权」· JSP 代码 · 共 99 行
JSP
99 行
<%@ page language="java" pageEncoding="gbk"%>
<%@ 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://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title>JSP for MealForm form</title>
<%
String path = request.getContextPath();
%>
</head>
<body>
<h1>订餐系统-添加订餐信息</h1>
<html:form action="/meal?methodName=save">
订餐类型 :
<html:select property="mealType">
<html:options property="id" labelProperty="name" collection="MealTypeList"/>
</html:select>
<html:errors property="mealType"/><br/>
订餐数量 : <html:text property="num"/><html:errors property="num"/><br/>
订餐备注 : <html:text property="detail"/><html:errors property="detail"/><br/>
<html:submit>订餐</html:submit>
</html:form>
<hr>
<form action="<%=path %>/meal.do?methodName=update" method="post">
<table>
<tr>
<th>订餐时间</th><th>订餐人</th><th>订餐类型</th><th>订餐数量</th><th>订餐价格</th><th>总计</th><th>备注</th><th>结算</th>
</tr>
<logic:iterate id="m" name="MealList">
<tr>
<td>
${m.orderTime }
</td>
<td>
${m.fullName }
</td>
<td>
${m.mealTypeName }
</td>
<td>
${m.num }
</td>
<td>
${m.price }
</td>
<td>
${m.total }
</td>
<td>
${m.detail }
</td>
<td>
<c:if test="${(m.pay==1)}">
<input type="checkbox" value="${m.id }" name="ids" disabled="disabled">
</c:if>
<c:if test="${(m.pay==0)}">
<input type="checkbox" value="${m.id }" name="ids" >
</c:if>
</td>
</tr>
</logic:iterate>
</table>
<c:if test="${(SystemMember.privillege=='0')}">
<input type="submit" value="结算" disabled="disabled">
</c:if>
<c:if test="${(SystemMember.privillege=='1')}">
<input type="submit" value="结算" >
</c:if>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?