<%@ 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: #eeeaea; } 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: #e0d8d8; } p { margin: 5px 0; } </style> </head> <body> <h1>产品批次</h1> <form method="post" action="processProductBatch.jsp"> <label for="batch_id">批次 ID</label> <input type="text" id="batch_id" name="batch_id" required> <label for="batch_number">批次号</label> <input type="text" id="batch_number" name="batch_number" required> <label for="order_id">生产制令编号</label> <input type="text" id="order_id" name="order_id" required> <label for="product_id">产品 ID</label> <input type="text" id="product_id" name="product_id" required> <label for="production_date">生产日期</label> <input type="text" id="production_date" name="production_date" required> <label for="quantity">批次数量</label> <input type="number" id="quantity" name="quantity" value="0" required> <label for="quality_status">质量状态</label> <select id="quality_status" name="quality_status"> <option value="合格">合格</option> <option value="不合格">不合格</option> </select> <label for="remarks">备注信息</label> <input type="text" id="remarks" name="remarks"> <button type="submit">提交</button> </form> <%-- 结果展示部分 --%> <% String batchId = request.getParameter("batch_id"); String batchNumber = request.getParameter("batch_number"); String orderId = request.getParameter("order_id"); String productId = request.getParameter("product_id"); String productionDate = request.getParameter("production_date"); String quantity = request.getParameter("quantity"); String qualityStatus = request.getParameter("quality_status"); String remarks = request.getParameter("remarks"); if (batchId != null) { %> <div class="result-section"> <h2>输入结果</h2> <p><strong>批次 ID:</strong> <%= batchId %></p> <p><strong>批次号:</strong> <%= batchNumber %></p> <p><strong>生产制令编号:</strong> <%= orderId %></p> <p><strong>产品 ID:</strong> <%= productId %></p> <p><strong>生产日期:</strong> <%= productionDate %></p> <p><strong>批次数量:</strong> <%= quantity %></p> <p><strong>质量状态:</strong> <%= qualityStatus %></p> <p><strong>备注信息:</strong> <%= remarks != null ? remarks : "无" %></p> </div> <% } %> </body> </html>
标签:5px,color,2024.9,border,30,批次,background,周一,margin From: https://www.cnblogs.com/Sunyiran/p/18447635