0
点赞
收藏
分享

微信扫一扫

基于javaweb+jsp的家政服务管理系统

独西楼Q 2022-02-25 阅读 47

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可

开发工具:idea或eclipse或myeclipse

部分代码实现JSP

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>服务详情</title>
    <%@ include file="include/head.jsp" %>
</head>
<body>
<div class="container-fluid">
    <ul class="nav nav-tabs">
        <li><a href="FuwuServlet?action=list">用户列表</a></li>
        <li class="active"><a href="#">详情</a></li>
    </ul>
    <br/>
    <form class="form-horizontal" role="form" action="#" method="post">
        <input type="hidden" class="form-control" id="id" name="id" value="${vo.id}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">服务名称:</label>
            <div class="col-sm-5" style="padding-top: 7px;">
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">状态:</label>
            <div class="col-sm-5">
                <input name="complaintStatus" type="radio" value="已处理" checked="checked"/>&nbsp;&nbsp;&nbsp;已处理&nbsp;&nbsp;&nbsp;&nbsp;
                <input name="complaintStatus" type="radio" value="待处理"/>&nbsp;&nbsp;&nbsp;待处理&nbsp;&nbsp;&nbsp;&nbsp;
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"></label>
            <div class="col-sm-5">
                <input type="submit" class="btn btn-pill btn-grad btn-danger btn-sm" value="保存">
                <input type="button" class="btn btn-pill btn-grad btn-success btn-sm" value="返回" onclick="javascript:history.back(-1);">
            </div>
        </div>
    </form>
</div>
</body>
<script type="text/javascript">
    //提交之前进行检查,如果return false,则不允许提交
        <div class="form-group">
            <input type="text" class="form-control" name="keyword" id="keyword" placeholder="姓名">
            <input type="hidden" id="searchColumn" name="searchColumn" value="jiao_name"/>
        </div>
        <button class="btn btn-pill btn-grad btn-default btn-sm"><span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询
        </button>
    </form>
    <br/>
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>姓名</th>
            <th>联系方式</th>
            <th>服务</th>
            <th>时间</th>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>投诉添加</title>
    <%@ include file="include/head.jsp" %>
</head>
<body>
<div class="container-fluid">
    <ul class="nav nav-tabs">
        <li><a href="ComplaintServlet?action=list">投诉列表</a></li>
        <li class="active"><a href="#">添加</a></li>
    </ul>
    <br/>
    <form class="form-horizontal" role="form" action="ComplaintServlet?action=add" method="post" onsubmit="return check()">
</body>
</html>

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>服务编辑</title>
    <%@ include file="include/head.jsp" %>
</head>
<body>
<div class="container-fluid">
    <ul class="nav nav-tabs">
        <li><a href="FuwuServlet?action=list">服务列表</a></li>
        </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">联系人:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="fuwuRen" name="fuwuRen" value="${vo.fuwuRen}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">联系方式:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="fuwuPhone" name="fuwuPhone" value="${vo.fuwuPhone}">
                </div>
            </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注:</label>
            <div class="col-sm-5">
                <textarea rows="3" class="form-control" id="fuwuText" name="fuwuText" placeholder="请输入内容......">${vo.fuwuText}</textarea>
            </div>
        </div>
            <th>状态</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${list}" var="vo">
            <tr>
                <td><a href="JiaoServlet?action=get&id=${vo.id}">${vo.jiaoName}</a></td>
                <td>${vo.jiaoPhone}</td>
                <td>${vo.jiaoFuwu}</td>
                <td>${vo.jiaoDate}</td>
                    <button onclick="if(window.confirm('将要删除:${vo.jiaoName}?'))window.location.href='JiaoServlet?action=delete&id=${vo.id}'"
                            class="btn btn-pill btn-grad btn-success btn-xs"
                            <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> >
                        <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                        删除
                    </button>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div style="float: right;padding-right: 10px;color: #515151;"><jsp:include page="split.jsp"/></div>
</div>
</body>
</html>

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<html>
        //根据ID获取值
        if (document.getElementById("complaintName").value.trim().length == 0) {
            alert("主题不能为空!");
            return false;
        }
        if (document.getElementById("complaintOwner").value.trim().length == 0) {
            alert("投诉人不能为空!");
            return false;
        }
        if (document.getElementById("complaintTime").value.trim().length == 0) {
            alert("投诉时间不能为空!");
            return false;
        }
        return true;
    }
</script>
    </ul>
    <br/>
    <form class="form-horizontal" role="form" action="FuwuServlet?action=edit" method="post" onsubmit="return check()">
        <input type="hidden" class="form-control" id="id" name="id" value="${vo.id}"/>
        
            <div class="form-group">
                <label class="col-sm-3 control-label">服务名称:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="fuwuName" name="fuwuName" value="${vo.fuwuName}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">价格:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="fuwuPrice" name="fuwuPrice" value="${vo.fuwuPrice}">
                </div>
            </div>
            <div class="form-group">
            <label class="col-sm-3 control-label"></label>
            <div class="col-sm-5">
                <input type="submit" class="btn btn-pill btn-grad btn-danger btn-sm" value="保存">
                <input type="button" class="btn btn-pill btn-grad btn-success btn-sm" value="返回" onclick="javascript:history.back(-1);">
            </div>
        </div>
    </form>
</div>
</body>
<script type="text/javascript">
    //提交之前进行检查,如果return false,则不允许提交
    function check() {
        //根据ID获取值
        if (document.getElementById("fuwuName").value.trim().length == 0) {
            alert("服务名称不能为空!");
            return false;
        }
        if (document.getElementById("fuwuPrice").value.trim().length == 0) {
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>交易管理</title>
    <%@ include file="include/head.jsp" %>
</head>
<body>
<div class="container-fluid">
    <ul class="nav nav-tabs">
        <li class="active"><a href="JiaoServlet?action=list">交易列表</a></li>
        <c:if test="${loginUser.userType == '管理员'}"><li><a href="jiao_add.jsp">添加</a></li></c:if>
    </ul>
    <br/>
        <div class="form-group">
            <label class="col-sm-3 control-label">类型:</label>
            <div class="col-sm-5" style="padding-top: 7px;">
                ${vo.fuwuType}
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">联系人:</label>
            <div class="col-sm-5" style="padding-top: 7px;">
                ${vo.fuwuRen}
            </div>
        </div>
        <div class="form-group">
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="fuwuCount" name="fuwuCount" value="${vo.fuwuCount}">
                </div>
            </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">类型:</label>
            <div class="col-sm-5">
                       <input name="fuwuType" type="radio" value="保姆" ${vo.fuwuType=='保姆'?'checked':''}/>&nbsp;&nbsp;&nbsp;保姆&nbsp;&nbsp;&nbsp;&nbsp;
                       <input name="fuwuType" type="radio" value="月嫂" ${vo.fuwuType=='月嫂'?'checked':''}/>&nbsp;&nbsp;&nbsp;月嫂&nbsp;&nbsp;&nbsp;&nbsp;
                       <input name="fuwuType" type="radio" value="钟点工" ${vo.fuwuType=='钟点工'?'checked':''}/>&nbsp;&nbsp;&nbsp;钟点工&nbsp;&nbsp;&nbsp;&nbsp;
                       <input name="fuwuType" type="radio" value="育婴师" ${vo.fuwuType=='育婴师'?'checked':''}/>&nbsp;&nbsp;&nbsp;育婴师&nbsp;&nbsp;&nbsp;&nbsp;
                       <input name="fuwuType" type="radio" value="其它" ${vo.fuwuType=='其它'?'checked':''}/>&nbsp;&nbsp;&nbsp;其它&nbsp;&nbsp;&nbsp;&nbsp;
            <label class="col-sm-3 control-label">主题:</label>
            <div class="col-sm-5">
                <input type="text" class="form-control" id="complaintName" name="complaintName">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">详细情况:</label>
            <div class="col-sm-5">
                <textarea rows="3" class="form-control" id="complaintText" name="complaintText" placeholder="请输入内容......"></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">投诉人:</label>
            <div class="col-sm-5">
                <input type="text" class="form-control" id="complaintOwner" name="complaintOwner">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">投诉时间:</label>
            <div class="col-sm-5">
                <input type="text" class="form-control" id="complaintTime" name="complaintTime">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">价格:</label>
            <div class="col-sm-5" style="padding-top: 7px;">
                ${vo.fuwuPrice}
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">人数:</label>
            <div class="col-sm-5" style="padding-top: 7px;">
                ${vo.fuwuCount}
            </div>
            <div class="col-sm-5" style="padding-top: 7px;">
                ${vo.fuwuPhone}
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注:</label>
            <div class="col-sm-5" style="padding-top: 7px;">
                <textarea rows="3" class="form-control" id="fuwuText" name="fuwuText" disabled="disabled">${vo.fuwuText}</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"></label>
            <div class="col-sm-5" style="padding-top: 7px;">
                <input type="button" class="btn btn-pill btn-grad btn-success btn-sm" value="返回" onclick="javascript:history.back(-1);">
            </div>
        </div>
    </form>
            return false;
        }
        if (document.getElementById("fuwuCount").value.trim().length == 0) {
            alert("人数不能为空!");
            return false;
        }
        if (document.getElementById("fuwuRen").value.trim().length == 0) {
            alert("联系人不能为空!");
            return false;
        }
        if (document.getElementById("fuwuPhone").value.trim().length == 0) {
            alert("联系方式不能为空!");
            return false;
        }
        return true;
    }
</script>
</html>

                <td>${vo.jiaoStatus}</td>
                <td title="${vo.jiaoText}">
                <c:choose>
                    <c:when test="${fn:length(vo.jiaoText) > 19}">
                        <c:out value="${fn:substring(vo.jiaoText, 0, 19)}..."/>
                    </c:when>
                    <c:otherwise>
                        <c:out value="${vo.jiaoText}"/>
                    </c:otherwise>
                </c:choose>
                </td>
                <td>
                    <button onclick="window.location.href='JiaoServlet?action=editPre&id=${vo.id}'"
                            class="btn btn-pill btn-grad btn-default btn-xs"
                            <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if>
                             >
                        <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
                        编辑

Java代码:略


运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

idea/eclipse/MyEclipse

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可

开发工具:idea或eclipse或myeclipse

适用

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

功能说明

登录、注册、退出、用户模块、公告模块、服务模块、投诉模块、交易模块的增删改查管理

v.mp4_20211009_222059.947

v.mp4_20211009_222111.579

v.mp4_20211009_222115.778

v.mp4_20211009_222121.602

v.mp4_20211009_222134.746

v.mp4_20211009_222136.538

v.mp4_20211009_222141.874

v.mp4_20211009_222150.228

v.mp4_20211009_222154.138

v.mp4_20211009_222200.586

v.mp4_20211009_222204.323

v.mp4_20211009_222209.794

document

←源码获取见左侧[源码QQ]

举报

相关推荐

0 条评论