2024.10.4(周五)

复制代码
<%@ 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: #faf7f7;
        }

        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: #f5efef;
        }

        p {
            margin: 5px 0;
        }
    </style>
</head>
<body>
<h1>工资核算信息</h1>
<form method="post" action="processWageCalculation.jsp">
    <label for="wage_id">工资 ID</label>
    <input type="text" id="wage_id" name="wage_id" required>

    <label for="employee_id">员工 ID</label>
    <input type="text" id="employee_id" name="employee_id" required>

    <label for="month">工资月份</label>
    <input type="text" id="month" name="month" required>

    <label for="piecework_wage">计件工资</label>
    <input type="number" id="piecework_wage" name="piecework_wage" value="0">

    <label for="cost_wage">成本工资</label>
    <input type="number" id="cost_wage" name="cost_wage" value="0">

    <label for="quality_wage">质量工资</label>
    <input type="number" id="quality_wage" name="quality_wage" value="0">

    <label for="total_wage">总工资</label>
    <input type="number" id="total_wage" name="total_wage" value="0">

    <label for="remarks">备注</label>
    <input type="text" id="remarks" name="remarks">

    <button type="submit">提交</button>
</form>

<%-- 结果展示部分 --%>
<%
    String wageId = request.getParameter("wage_id");
    String employeeId = request.getParameter("employee_id");
    String month = request.getParameter("month");
    String pieceworkWage = request.getParameter("piecework_wage");
    String costWage = request.getParameter("cost_wage");
    String qualityWage = request.getParameter("quality_wage");
    String totalWage = request.getParameter("total_wage");
    String remarks = request.getParameter("remarks");

    if (wageId != null) {
%>
<div class="result-section">
    <h2>输入结果</h2>
    <p><strong>工资 ID:</strong> <%= wageId %></p>
    <p><strong>员工 ID:</strong> <%= employeeId %></p>
    <p><strong>工资月份:</strong> <%= month %></p>
    <p><strong>计件工资:</strong> <%= pieceworkWage %></p>
    <p><strong>成本工资:</strong> <%= costWage %></p>
    <p><strong>质量工资:</strong> <%= qualityWage %></p>
    <p><strong>总工资:</strong> <%= totalWage %></p>
    <p><strong>备注:</strong> <%= remarks != null ? remarks : "无" %></p>
</div>
<%
    }
%>

</body>
</html>
复制代码

 

posted @   记得关月亮  阅读(2)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示