基于javaweb+jsp的企业物资管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap Ajax)
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap Ajax
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可
开发工具:eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
return false;
}
if (document.getElementById("add-suppliesCount").value.trim().length == 0) {
alert("库存数量不能为空");
return false;
}
if (document.getElementById("add-suppliesFactory").value.trim().length == 0) {
alert("供应商不能为空");
return false;
}
if (document.getElementById("add-suppliesDate").value.trim().length == 0) {
alert("入库日期不能为空");
return false;
}
return true;
}
//编辑表单提交之前进行检查,如果return false,则不允许提交
function editCheck() {
//根据ID获取值
<div class="col-sm-5">
<button type="button" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> class="btn btn-grad btn-info" data-toggle="modal" data-target="#modal-add">添加物资
</button>
</div>
</div>
<br>
<br>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th>名称</th>
<th>编号</th>
<th>类别</th>
<th>库存数量</th>
<th>供应商</th>
<th>入库日期</th>
<th>备注</th>
}
})
})
$('#modal-info').on('show.bs.modal', function (event) {
let button = $(event.relatedTarget);
let id = button.data('id');
let modal = $(this);
$.ajax({
url: 'suppliesGet?id=' + id,
type: "get",
success: function (voString) {
let vo = eval('(' + voString + ')');
modal.find('#info-suppliesName').text(vo.suppliesName);
modal.find('#info-suppliesNo').text(vo.suppliesNo);
modal.find('#info-suppliesType').text(vo.suppliesType);
modal.find('#info-suppliesCount').text(vo.suppliesCount);
modal.find('#info-suppliesFactory').text(vo.suppliesFactory);
modal.find('#info-suppliesDate').text(vo.suppliesDate);
modal.find('#info-suppliesText').text(vo.suppliesText);
<jsp:include page="menu.jsp">
<jsp:param value="active" name="User_active"/>
</jsp:include>
</div>
<br>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<div class="row">
<div class="col-sm-7">
<div class="input-group">
<input class="form-control" type="hidden" id="searchColumn" name="searchColumn" value="real_name"/>
<input class="form-control" type="text" id="search_keyword" name="search_keyword" placeholder="姓名"/> <span class="input-group-btn"><button class="btn btn-grad btn-danger" type="button" onclick="searchList()">搜索</button></span>
</div>
</div>
<div class="col-sm-5">
<button type="button" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> class="btn btn-grad btn-info" data-toggle="modal" data-target="#modal-add">添加用户
</button>
</div>
</div>
<br>
System.out.println(parameterName + "==" + str.trim());
return str.trim();
}
}
package com.demo.vo;
import java.io.Serializable;
/**
* 物资(t_supplies表对应的Java实体类)
*/
public class Supplies implements Serializable {
private Long id;//主键
private String suppliesName;//名称
private String suppliesNo;//编号
private String suppliesType;//类别
private String suppliesCount;//库存数量
private String suppliesFactory;//供应商
if (document.getElementById("add-noticeType").value.trim().length == 0) {
alert("类型不能为空");
return false;
}
if (document.getElementById("add-createDate").value.trim().length == 0) {
alert("创建时间不能为空");
return false;
}
return true;
}
//编辑表单提交之前进行检查,如果return false,则不允许提交
function editCheck() {
//根据ID获取值
if (document.getElementById("edit-noticeName").value.trim().length == 0) {
alert("标题不能为空");
return false;
}
if (document.getElementById("edit-noticeType").value.trim().length == 0) {
alert("类型不能为空");
return false;
}
if (document.getElementById("edit-createDate").value.trim().length == 0) {
alert("创建时间不能为空");
return false;
}
return true;
<textarea style="height: 100px;" class="form-control" name="noticeText" id="edit-noticeText"></textarea>
</div>
<div class="form-group">
<label for="edit-noticeType" class="control-label">类型:</label>
<input type="text" class="form-control" name="noticeType" id="edit-noticeType">
</div>
<div class="form-group">
<label for="edit-createDate" class="control-label">创建时间:</label>
<input type="text" class="form-control" name="createDate" id="edit-createDate">
</div>
<div class="form-group hidden">
<label for="edit-createTime" class="control-label">创建时间:</label>
<input type="text" class="form-control" name="createTime" id="edit-createTime">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-grad btn-success" data-dismiss="modal">取消</button>
<button type="submit" class="btn btn-grad btn-info">提交</button>
</div>
</form>
</div>
</div>
</div>
<!-- delete -->
public PageBean(int pageNum, int totalRecord) {
this.pageNum = (pageNum = Math.max(pageNum, 1));
this.pageSize = 10;//默认为10
this.totalRecord = totalRecord;
//totalPage 总页数
if (totalRecord % pageSize == 0) {
//说明整除,正好每页显示pageSize条数据,没有多余一页要显示少于pageSize条数据的
this.totalPage = totalRecord / pageSize;
} else {
//不整除,就要在加一页,来显示多余的数据。
this.totalPage = totalRecord / pageSize + 1;
}
//开始索引
this.startIndex = (pageNum - 1) * pageSize;
//显示5页,这里自己可以设置,想显示几页就自己通过下面算法修改
this.start = 1;
this.end = 5;
//显示页数的算法
if (totalPage <= 5) {
//总页数都小于5,那么end就为总页数的值了。
this.end = this.totalPage;
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">企业物资管理系统</span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">企业物资管理系统</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">欢迎:<span style="color: yellow">${loginUser.username}</span></a></li>
<li><a href="authLogout">退出</a></li>
</ul>
</div>
</div>
</nav>
</div>
<div class="form-group">
<label for="edit-suppliesType" class="control-label">类别:</label>
<input type="text" class="form-control" name="suppliesType" id="edit-suppliesType">
</div>
<div class="form-group">
<label for="edit-suppliesCount" class="control-label">库存数量:</label>
<input type="text" class="form-control" name="suppliesCount" id="edit-suppliesCount">
</div>
<div class="form-group">
<label for="edit-suppliesFactory" class="control-label">供应商:</label>
<input type="text" class="form-control" name="suppliesFactory" id="edit-suppliesFactory">
</div>
<div class="form-group">
<label for="edit-suppliesDate" class="control-label">入库日期:</label>
<input type="text" class="form-control" name="suppliesDate" id="edit-suppliesDate">
</div>
<div class="form-group">
<label for="edit-suppliesText" class="control-label">备注:</label>
<textarea style="height: 100px;" class="form-control" name="suppliesText" id="edit-suppliesText"></textarea>
</div>
<div class="form-group hidden">
运行环境
Java≥6、Tomcat≥7.0、MySQL≥5.5
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
技术框架
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap Ajax
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
登录、注册、退出、用户模块、公告模块、物资模块的增删改查管理