Java教程

基于javaweb+jsp的勤工助学信息管理系统

本文主要是介绍基于javaweb+jsp的勤工助学信息管理系统,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

基于javaweb+jsp的勤工助学信息管理系统

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript idea eclipse MyEclipse Servlet SSM Maven …

部分代码实现JSP

    <form action="gangweiAdd" method="post" onsubmit="return check()">
        <table class="index-content-table-add">
            <tr>
                <td width="12%">岗位名称:</td><td><input class="index-content-table-td-add" type="text" id="gwName" name="gwName" value=""/></td>
            </tr>
            <tr>
                <td width="12%">岗位描述:</td><td><input class="index-content-table-td-add" type="text" id="gwMiao" name="gwMiao" value=""/></td>
            </tr>
            <tr>
                <td width="12%">所属部门:</td><td><input class="index-content-table-td-add" type="text" id="gwDept" name="gwDept" value=""/></td>
            </tr>
            <tr>
                <td width="12%">名额:</td><td><input class="index-content-table-td-add" type="text" id="gwCount" name="gwCount" value=""/></td>
            </tr>
            <tr>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>岗位详情</title>
    <link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<jsp:include page="menu.jsp"/>
<div class="index-content">
        }
        if (document.getElementById("gwCount").value.trim().length == 0) {
            alert("名额不能为空!");
            return false;
        }
        if (document.getElementById("gwXin").value.trim().length == 0) {
            alert("月薪不能为空!");
            return false;
        }
        if (document.getElementById("gwDate").value.trim().length == 0) {
            alert("工作时间不能为空!");
            return false;
        }
        return true;
    }
</script>
</html>

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
            </tr>
            <tr>
                <td width="12%">工作时间:</td><td><input class="index-content-table-td-add" type="text" id="gwDate" name="gwDate" value=""/></td>
            </tr>
            <tr>
                <td width="12%">岗位状态:</td>
                <td>
                        <input name="gwStatus" type="radio" value="生效中" checked="checked"/>&nbsp;&nbsp;&nbsp;生效中&nbsp;&nbsp;&nbsp;&nbsp;
                        <input name="gwStatus" type="radio" value="已暂停"/>&nbsp;&nbsp;&nbsp;已暂停&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                    <td width="12%">备注:</td><td><textarea id="gwText" name="gwText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......"></textarea></td>
            </tr>
        </table>
        <br>
        <br>
        <br>
        &nbsp;&nbsp;&nbsp;<button type="submit" class="btn btn-grad btn-info btn-sm">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="btn btn-grad btn-warning btn-sm" onclick="javascript:history.back(-1);">取消</button>
            <tr>
                <td>工作时间:<b>${vo.gwDate}</b></td>
            </tr>
            <tr>
                <td>岗位状态:
                    <b>${vo.gwStatus}</b>
                </td>
            </tr>
            <tr>
                <td>备注:<b>${vo.gwText}</b></td>
            </tr>
        </table>
        <br>
        <button type="button" class="btn btn-grad btn-warning btn-sm" onclick="javascript:history.back(-1);">返回</button>
        <a class="info-detail">岗位详情</a>
        <br>
        <br>
    </div>
    <br>
    <form>
        <table class="index-content-table-add" style="font-size: 18px;">
            <tr>
                <td>岗位名称:<b>${vo.gwName}</b></td>
            </tr>
            <tr>
                <td>岗位描述:<b>${vo.gwMiao}</b></td>
            </tr>
            <tr>
                <td>所属部门:<b>${vo.gwDept}</b></td>
            </tr>
            <tr>
                <td>名额:<b>${vo.gwCount}</b></td>
            </tr>
            <tr>
                <td>月薪:<b>${vo.gwXin}</b></td>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>修改岗位</title>
    <link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<jsp:include page="menu.jsp"/>
<div class="index-content">
    <div class="index-content-operation">
        <a class="info-detail">修改岗位</a>
        <br>
        <br>
    </div>
    <br>
    <form action="gangweiEdit" method="post" onsubmit="return check()">
            <th>岗位名称</th>
            <th>岗位描述</th>
            <th>所属部门</th>
            <th>名额</th>
            <th>月薪</th>
            <th>工作时间</th>
            <th>岗位状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${list}" var="vo">
            <tr class="index-content-table-td">
        
        <table class="index-content-table-add">
            <tr>
                <td width="12%">岗位名称:</td><td><input class="index-content-table-td-add" type="text" id="gwName" name="gwName" value="${vo.gwName}"/></td>
            </tr>
            <tr>
                <td width="12%">岗位描述:</td><td><input class="index-content-table-td-add" type="text" id="gwMiao" name="gwMiao" value="${vo.gwMiao}"/></td>
            </tr>
            <tr>
                <td width="12%">所属部门:</td><td><input class="index-content-table-td-add" type="text" id="gwDept" name="gwDept" value="${vo.gwDept}"/></td>
            </tr>
            <tr>
                <td width="12%">名额:</td><td><input class="index-content-table-td-add" type="text" id="gwCount" name="gwCount" value="${vo.gwCount}"/></td>
            </tr>
            <tr>
                <td width="12%">月薪:</td><td><input class="index-content-table-td-add" type="text" id="gwXin" name="gwXin" value="${vo.gwXin}"/></td>
            </tr>
                <td width="12%">工作时间:</td><td><input class="index-content-table-td-add" type="text" id="gwDate" name="gwDate" value="${vo.gwDate}"/></td>
            </tr>
            <tr>
                <td width="12%">岗位状态:</td>
                <td>
                   <input name="gwStatus" type="radio" value="生效中" ${vo.gwStatus=='生效中'?'checked':''}/>&nbsp;&nbsp;&nbsp;生效中&nbsp;&nbsp;&nbsp;&nbsp;
                   <input name="gwStatus" type="radio" value="已暂停" ${vo.gwStatus=='已暂停'?'checked':''}/>&nbsp;&nbsp;&nbsp;已暂停&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            </tr>
            <tr>
                <td width="12%">备注:</td><td><textarea id="gwText" name="gwText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......">${vo.gwText}</textarea></td>
            </tr>
        </table>
        <br>
        window.location.href = "gangweiList?searchColumn="+document.getElementById("searchColumn").value+"&keyword=" + document.getElementById("search_keyword").value;
    }
</script>
                <td>${vo.gwMiao}</td>
                <td>${vo.gwDept}</td>
                <td>${vo.gwCount}</td>
                <td>${vo.gwXin}</td>
                <td>${vo.gwDate}</td>
                <td>${vo.gwStatus}</td>
                <td>
                    <button class="btn btn-grad btn-warning btn-sm" style="padding: 0px 1px;" onclick="window.location.href='gangweiGet?id=${vo.id}'">详情</button>&nbsp;
                    <button class="btn btn-grad btn-primary btn-sm" style="padding: 0px 1px;"
                            <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if>
                    οnclick="window.location.href='gangweiEditPre?id=${vo.id}'">编辑</button>&nbsp;
                    <button class="btn btn-grad btn-info btn-sm" style="padding: 0px 1px;" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> οnclick="if(window.confirm('将要删除:${vo.gwName}?'))window.location.href='gangweiDelete?id=${vo.id}'">删除</button>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div style="float: right;padding-right: 10px;color: #515151;"><jsp:include page="split.jsp"/></div>
</div>
</body>
<script>
        <br>
        &nbsp;&nbsp;&nbsp;<button type="submit" class="btn btn-grad btn-info btn-sm">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="btn btn-grad btn-warning btn-sm" onclick="javascript:history.back(-1);">取消</button>
    </form>
</div>

</body>
<script type="text/javascript">
    //提交之前进行检查,如果return false,则不允许提交
    function check() {
        //根据ID获取值
        if (document.getElementById("gwName").value.trim().length == 0) {
            alert("岗位名称不能为空!");
            return false;
        }
        if (document.getElementById("gwMiao").value.trim().length == 0) {
            alert("岗位描述不能为空!");
            return false;
        }
        if (document.getElementById("gwDept").value.trim().length == 0) {
            alert("所属部门不能为空!");
            return false;
        if (document.getElementById("gwCount").value.trim().length == 0) {
            alert("名额不能为空!");
            return false;
        }
        if (document.getElementById("gwXin").value.trim().length == 0) {
            alert("月薪不能为空!");
            return false;
        }
        if (document.getElementById("gwDate").value.trim().length == 0) {
            alert("工作时间不能为空!");
            return false;
        }
        return true;
    }
</script>
</html>

<body>
<jsp:include page="menu.jsp"/>
<div class="index-content">
    <div class="index-content-operation">
        <a class="info-detail">岗位管理</a>
        <br>
        <br>
    </div>
    <br>
    <div class="index-content-operation">
        <button class="btn btn-grad btn-info btn-sm" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> οnclick="window.location.href='gangwei_add.jsp'">添加</button>
        <div class="index-content-operation-search"><input id="search_keyword" placeholder="岗位名称" type="text" name="search_keyword"/><input type="hidden" id="searchColumn" name="searchColumn" value="gw_name"/><button class="btn btn-grad btn-warning btn-sm" onclick="searchList()">搜索</button></div>
    </div>
    <br>
    <table class="table table-striped table-hover table-bordered">
        <thead>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>添加岗位</title>
    <link rel="stylesheet" type="text/css" href="css/index.css"/>
</head>
<body>
<jsp:include page="menu.jsp"/>
<div class="index-content">
    <div class="index-content-operation">
        <a class="info-detail">添加岗位</a>
        <br>
        <br>
    </div>
</div>
</body>
</html>

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>岗位管理</title>
    <link rel="stylesheet" type="text/css" href="css/index.css"/>
</div>

</body>
<script type="text/javascript">
    //提交之前进行检查,如果return false,则不允许提交
    function check() {
        //根据ID获取值
        if (document.getElementById("gwName").value.trim().length == 0) {
            alert("岗位名称不能为空!");
            return false;
        }
        if (document.getElementById("gwMiao").value.trim().length == 0) {
            alert("岗位描述不能为空!");
            return false;
        }
        if (document.getElementById("gwDept").value.trim().length == 0) {
            alert("所属部门不能为空!");

运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

idea/eclipse/MyEclipse

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript idea eclipse MyEclipse Servlet SSM Maven …

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

登录、注册、退出、用户模块、公告模块、岗位模块、人员模块的增删改查管理

v.mp4_20211009_215329.957

v.mp4_20211009_215338.405

v.mp4_20211009_215356.365

v.mp4_20211009_215358.117

v.mp4_20211009_215402.716

document

这篇关于基于javaweb+jsp的勤工助学信息管理系统的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!