<%@ 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: #f1eded; } 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: #f1efef; } p { margin: 5px 0; } </style> </head> <body> <h1>生產製令</h1> <form method="post" action="processProductionOrder.jsp"> <label for="order_id">制令編號</label> <input type="text" id="order_id" name="order_id" required> <label for="contract_id">合同編號</label> <input type="text" id="contract_id" name="contract_id" required> <label for="total_order_id">總制令編號</label> <input type="text" id="total_order_id" name="total_order_id" required> <label for="sub_order_id">子制令編號</label> <input type="text" id="sub_order_id" name="sub_order_id" required> <label for="batch_number">批次號</label> <input type="text" id="batch_number" name="batch_number" required> <label for="production_quantity">生產數量</label> <input type="number" id="production_quantity" name="production_quantity" value="0" required> <label for="planned_start_date">計劃開始日期</label> <input type="text" id="planned_start_date" name="planned_start_date" required> <label for="planned_end_date">計劃結束日期</label> <input type="text" id="planned_end_date" name="planned_end_date" required> <label for="status">制令狀態</label> <select id="status" name="status"> <option value="待生產">待生產</option> <option value="生產中">生產中</option> <option value="已完成">已完成</option> </select> <button type="submit">提交</button> </form> <%-- 結果展示部分 --%> <% String orderId = request.getParameter("order_id"); String contractId = request.getParameter("contract_id"); String totalOrderId = request.getParameter("total_order_id"); String subOrderId = request.getParameter("sub_order_id"); String batchNumber = request.getParameter("batch_number"); String productionQuantity = request.getParameter("production_quantity"); String plannedStartDate = request.getParameter("planned_start_date"); String plannedEndDate = request.getParameter("planned_end_date"); String status = request.getParameter("status"); if (orderId != null) { %> <div class="result-section"> <h2>輸入結果</h2> <p><strong>制令編號:</strong> <%= orderId %></p> <p><strong>合同編號:</strong> <%= contractId %></p> <p><strong>總制令編號:</strong> <%= totalOrderId %></p> <p><strong>子制令編號:</strong> <%= subOrderId %></p> <p><strong>批次號:</strong> <%= batchNumber %></p> <p><strong>生產數量:</strong> <%= productionQuantity %></p> <p><strong>計劃開始日期:</strong> <%= plannedStartDate %></p> <p><strong>計劃結束日期:</strong> <%= plannedEndDate %></p> <p><strong>制令狀態:</strong> <%= status %></p> </div> <% } %> </body> </html>