<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>车间班组</title>
<style>
/* 整体页面布局和样式 */
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
background-image: url('img.jpg'); /* 添加背景图片 */
background-size: cover; /* 使背景图片覆盖整个页面 */
background-position: center; /* 背景图片居中 */
background-repeat: no-repeat; /* 不重复背景图片 */
}
h1 {
text-align: center;
color: #f6f1f1;
}
form {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
width: 400px;
margin: 0 auto;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
input[type="text"],
input[type="number"],
select {
width: 100%;
padding: 8px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 3px;
}
button {
background-color: #007BFF;
color: #fff;
padding: 10px 15px;
border: none;
border-radius: 3px;
cursor: pointer;
display: block; /* Ensures button is a block element */
margin: 0 auto; /* Centers the button */
}
button:hover {
background-color: #0056b3;
}
/* 结果展示区域样式 */
.result-section {
margin-top: 20px;
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
width: 400px;
margin: 0 auto;
}
h2 {
color: #eae4e4;
}
p {
margin: 5px 0;
}
</style>
</head>
<body>
<h1>车间班组</h1>
<form method="post" action="processWorkshopTeam.jsp">
<label for="team_id">班组 ID</label>
<input type="text" id="team_id" name="team_id" required>
<label for="team_name">班组名称</label>
<input type="text" id="team_name" name="team_name" required>
<label for="workshop_id">所属车间 ID</label>
<input type="text" id="workshop_id" name="workshop_id" required>
<label for="leader_id">班组长 ID</label>
<input type="text" id="leader_id" name="leader_id" required>
<label for="remarks">备注信息</label>
<input type="text" id="remarks" name="remarks">
<button type="submit">提交</button>
</form>
<%-- 结果展示部分 --%>
<%
String teamId = request.getParameter("team_id");
String teamName = request.getParameter("team_name");
String workshopId = request.getParameter("workshop_id");
String leaderId = request.getParameter("leader_id");
String remarks = request.getParameter("remarks");
if (teamId != null) {
%>
<div class="result-section">
<h2>输入结果</h2>
<p><strong>班组 ID:</strong> <%= teamId %></p>
<p><strong>班组名称:</strong> <%= teamName %></p>
<p><strong>所属车间 ID:</strong> <%= workshopId %></p>
<p><strong>班组长 ID:</strong> <%= leaderId %></p>
<p><strong>备注信息:</strong> <%= remarks != null ? remarks : "无" %></p>
</div>
<%
}
%>
</body>
</html>