基于javaweb+jsp的醫院住院管理系統
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript idea eclipse MyEclipse Servlet SSM Maven …
部分代碼實作JSP
<td>${vo.bingfangNo}</td>
<td>${vo.bingfangName}</td>
<td>${vo.bingfangType}</td>
<td>${vo.bingfangCount}</td>
<td>${vo.bingfangPrice}</td>
<td>
<button class="btn btn-pill btn-danger btn-sm" style="padding: 0px 1px;" onclick="window.location.href='bingfangGet?id=${vo.id}'">詳情</button>
<button class="btn btn-pill btn-primary btn-sm" style="padding: 0px 1px;"
<c:if test="${loginUser.userType != '管理員'}">disabled="disabled" title="沒有權限!!!"</c:if>
οnclick="window.location.href='bingfangEditPre?id=${vo.id}'">編輯</button>
<button class="btn btn-pill btn-default btn-sm" style="padding: 0px 1px;" <c:if test="${loginUser.userType != '管理員'}">disabled="disabled" title="沒有權限!!!"</c:if> οnclick="if(window.confirm('將要洗掉:${vo.bingfangName}?'))window.location.href='bingfangDelete?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>
<%@ 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>
<jsp:include page="menu.jsp"/>
<div class="index-content">
<div class="index-content-operation">
<a class="info-detail">病房 詳情</a>
<br>
<br>
</div>
<br>
<form>
<table class="index-content-table-add" style="font-size: 18px;">
<tr>
<td>病房號:<b>${vo.bingfangNo}</b></td>
</tr>
<tr>
<td>科室:<b>${vo.bingfangName}</b></td>
</tr>
<tr>
<td>型別:
<b>${vo.bingfangType}</b>
</td>
<%@ 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>
</body>
<script>
function searchList() {
window.location.href = "bingfangList?searchColumn="+document.getElementById("searchColumn").value+"&keyword=" + document.getElementById("search_keyword").value;
}
</script>
<div class="index-content-operation">
<button class="btn btn-pill btn-info btn-sm" <c:if test="${loginUser.userType != '管理員'}">disabled="disabled" title="沒有權限!!!"</c:if> οnclick="window.location.href='bingfang_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="bingfang_name"/><button class="btn btn-pill btn-info btn-sm" onclick="searchList()">搜索</button></div>
</div>
<br>
<table class="table table-striped table-hover table-bordered">
<thead>
<tr class="index-content-table-th">
<th>病房號</th>
<th>科室</th>
<th>型別</th>
<th>容量</th>
<th>價格</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<c:forEach items="${list}" var="vo">
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" %>
<%@ 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>
</td>
</tr>
<tr>
<td width="12%">容量:</td><td><input class="index-content-table-td-add" type="text" id="bingfangCount" name="bingfangCount" value="${vo.bingfangCount}"/></td>
</tr>
<tr>
<td width="12%">價格:</td><td><input class="index-content-table-td-add" type="text" id="bingfangPrice" name="bingfangPrice" value="${vo.bingfangPrice}"/></td>
</tr>
<tr>
<td width="12%">詳情:</td><td><textarea id="bingfangText" name="bingfangText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="請輸入內容......">${vo.bingfangText}</textarea></td>
</tr>
</table>
<br>
<br>
<br>
<button type="submit" class="btn btn-pill btn-info btn-sm">提交</button> <button type="button" class="btn btn-pill btn-danger btn-sm" onclick="javascript:history.back(-1);">取消</button>
</form>
</body>
<script type="text/javascript">
//提交之前進行檢查,如果return false,則不允許提交
function check() {
//根據ID獲取值
if (document.getElementById("bingfangNo").value.trim().length == 0) {
alert("病房號不能為空!");
return false;
}
if (document.getElementById("bingfangName").value.trim().length == 0) {
alert("科室不能為空!");
return false;
}
if (document.getElementById("bingfangCount").value.trim().length == 0) {
alert("容量不能為空!");
return false;
}
if (document.getElementById("bingfangPrice").value.trim().length == 0) {
alert("價格不能為空!");
return false;
</tr>
<tr>
<td width="12%">容量:</td><td><input class="index-content-table-td-add" type="text" id="bingfangCount" name="bingfangCount" value=""/></td>
</tr>
<tr>
<td width="12%">價格:</td><td><input class="index-content-table-td-add" type="text" id="bingfangPrice" name="bingfangPrice" value=""/></td>
</tr>
<tr>
<td width="12%">詳情:</td><td><textarea id="bingfangText" name="bingfangText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="請輸入內容......"></textarea></td>
</tr>
</table>
<br>
<br>
<br>
<button type="submit" class="btn btn-pill btn-info btn-sm">提交</button> <button type="button" class="btn btn-pill btn-danger btn-sm" onclick="javascript:history.back(-1);">取消</button>
</form>
</div>
</body>
<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>
<br>
<form action="bingfangAdd" 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="bingfangNo" name="bingfangNo" value=""/></td>
</tr>
<tr>
<td width="12%">科室:</td><td><input class="index-content-table-td-add" type="text" id="bingfangName" name="bingfangName" value=""/></td>
</tr>
<tr>
<td width="12%">型別:</td>
<td>
<input name="bingfangType" type="radio" value="普通" checked="checked"/> 普通
<input name="bingfangType" type="radio" value="重癥"/> 重癥
<br>
<form action="bingfangEdit" method="post" onsubmit="return check()">
<input type="hidden" id="id" name="id" value="${vo.id}"/>
<table class="index-content-table-add">
<tr>
<td width="12%">病房號:</td><td><input class="index-content-table-td-add" type="text" id="bingfangNo" name="bingfangNo" value="${vo.bingfangNo}"/></td>
</tr>
<tr>
<td width="12%">科室:</td><td><input class="index-content-table-td-add" type="text" id="bingfangName" name="bingfangName" value="${vo.bingfangName}"/></td>
</tr>
<tr>
<td width="12%">型別:</td>
<td>
<input name="bingfangType" type="radio" value="普通" ${vo.bingfangType=='普通'?'checked':''}/> 普通
<tr>
<td>容量:<b>${vo.bingfangCount}</b></td>
</tr>
<tr>
<td>價格:<b>${vo.bingfangPrice}</b></td>
</tr>
<tr>
<td>詳情:<b>${vo.bingfangText}</b></td>
</tr>
</table>
<br>
<button type="button" class="btn btn-pill btn-danger btn-sm" onclick="javascript:history.back(-1);">回傳</button>
</form>
</div>
</body>
return false;
}
if (document.getElementById("bingfangPrice").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" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
//提交之前進行檢查,如果return false,則不允許提交
function check() {
//根據ID獲取值
if (document.getElementById("bingfangNo").value.trim().length == 0) {
alert("病房號不能為空!");
return false;
}
if (document.getElementById("bingfangName").value.trim().length == 0) {
alert("科室不能為空!");
return false;
}
if (document.getElementById("bingfangCount").value.trim().length == 0) {
運行環境
Java≥6、Tomcat≥7.0、MySQL≥5.5
開發工具
idea/eclipse/MyEclipse
技術框架
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript idea eclipse MyEclipse Servlet SSM Maven …
適用
課程設計,大作業,畢業設計,專案練習,學習演示等
功能說明
登錄、注冊、退出、用戶模塊、公告模塊、病房模塊、費用模塊、住院模塊的增刪改查管理






轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/319694.html
標籤:其他
下一篇:安卓開發工具
