1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 基于javaweb+jsp的仓库进销存管理系统(JavaWeb MySQL JSP Bootstrap Servlet SSM SpringBoot)

基于javaweb+jsp的仓库进销存管理系统(JavaWeb MySQL JSP Bootstrap Servlet SSM SpringBoot)

时间:2021-06-20 12:47:50

相关推荐

基于javaweb+jsp的仓库进销存管理系统(JavaWeb MySQL JSP Bootstrap Servlet SSM SpringBoot)

基于javaweb+jsp的仓库进销存管理系统(JavaWeb MySQL JSP Bootstrap Servlet SSM SpringBoot)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap.

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

适用

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

功能说明

登录、注册、退出、用户模块、公告模块、出库模块、库存模块、入库模块的增删改查管理

alert("货号不能为空!");return false;}if (document.getElementById("rukuDingdanhao").value.trim().length == 0) {alert("采购单号不能为空!");return false;}if (document.getElementById("rukuName").value.trim().length == 0) {alert("货物名称不能为空!");return false;}if (document.getElementById("rukuSuliang").value.trim().length == 0) {alert("数量不能为空!");return false;}if (document.getElementById("rukuTime").value.trim().length == 0) {alert("入库时间不能为空!");return false;}if (document.getElementById("rukuRen").value.trim().length == 0) {alert("操作员不能为空!");return false;}return true;}</script>

</div><br><form action="userEdit" 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="username" name="username" value="${vo.username}"/></td></tr><tr><td width="12%">密码:</td><td><input class="index-content-table-td-add" type="text" id="password" name="password" value="${vo.password}"/></td></tr><tr><td width="12%">姓名:</td><td><input class="index-content-table-td-add" type="text" id="realName" name="realName" value="${vo.realName}"/></td></tr><tr><td width="12%">性别:</td><td><input name="userSex" type="radio" value="男" ${vo.userSex=='男'?'checked':''}/>&nbsp;&nbsp;&nbsp;男&nbsp;&nbsp;&nbsp;&nbsp;<input name="userSex" type="radio" value="女" ${vo.userSex=='女'?'checked':''}/>&nbsp;&nbsp;&nbsp;女&nbsp;&nbsp;&nbsp;&nbsp;</td>

<!--批量删除--><delete id="doRemoveBatch" parameterType="java.util.Collection">DELETE FROM `t_chuku` WHERE `id` IN<foreach collection="list" item="id" separator="," open="(" close=")">#{id}</foreach></delete><!--修改--><update id="doUpdate" parameterType="com.demo.vo.Chuku">UPDATE `t_chuku`<set>

</div><br><div class="index-content-operation"><button class="btn btn-grad btn-default btn-sm" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> οnclick="window.location.href='ruku_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="ruku_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><tr class="index-content-table-th"><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">

//取出页面传进来的参数vo.setKuchunNo(Util.decode(request, "kuchunNo"));vo.setKuchunName(Util.decode(request, "kuchunName"));vo.setKuchunCount(Util.decode(request, "kuchunCount"));vo.setKuchunRukushijian(Util.decode(request, "kuchunRukushijian"));vo.setKuchunRen(Util.decode(request, "kuchunRen"));vo.setKuchunText(Util.decode(request, "kuchunText"));//调用Service层的增加(insert)方法kuchunService.insert(vo);this.redirectList(request, response);}/*** 删除库存** @param response* @param request* @throws IOException*/

* @param request* @throws IOException*/@RequestMapping("noticeDelete")public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = Util.decode(request, "id");noticeService.delete(Arrays.asList(id));this.redirectList(request, response);}/*** 编辑公告** @param response* @param request* @throws IOException*/@RequestMapping("noticeEdit")public void edit(HttpServletResponse response, HttpServletRequest request) throws IOException {Notice vo = new Notice();vo.setId(Long.valueOf(Util.decode(request, "id")));

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %><%@ taglib uri="/jsp/jstl/core" prefix="c" %><%@ taglib prefix="fn" uri="/jsp/jstl/functions" %><%@ taglib prefix="fmt" uri="/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>

}/*** 删除出库** @param response* @param request* @throws IOException*/@RequestMapping("chukuDelete")public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = Util.decode(request, "id");chukuService.delete(Arrays.asList(id));this.redirectList(request, response);}/**

</body><script type="text/javascript">//提交之前进行检查,如果return false,则不允许提交function check() {//根据ID获取值if (document.getElementById("username").value.trim().length == 0) {alert("用户名不能为空!");return false;}if (document.getElementById("password").value.trim().length == 0) {alert("密码不能为空!");return false;}if (document.getElementById("realName").value.trim().length == 0) {alert("姓名不能为空!");return false;}if (document.getElementById("userPhone").value.trim().length == 0) {alert("手机不能为空!");return false;

/*** 跳转到列表页面** @param request* @param response*/private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {//查询列和关键字String searchColumn = Util.decode(request, "searchColumn");String keyword = Util.decode(request, "keyword");Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)params.put("searchColumn", searchColumn);//要查询的列params.put("keyword", keyword);//查询的关键字Map<String, Object> map = rukuService.list(params);request.getSession().setAttribute("list", map.get("list"));Integer totalRecord = (Integer) map.get("totalCount");//根据查询条件取出对应的总记录数,用于分页String pageNum = Util.decode(request, "pageNum");//封装分页参数com.demo.util.PageBean<Object> pb = new com.demo.util.PageBean(Integer.valueOf(pageNum != null ? pageNum : "1"), totalRecord);params.put("startIndex", pb.getStartIndex());params.put("pageSize", pb.getPageSize());List list = (List) rukuService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果listpb.setServlet("rukuList");pb.setSearchColumn(searchColumn);

<!--新增--><insert id="doCreate" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.demo.vo.Kuchun">INSERT INTO `t_kuchun`<trim prefix="(" suffix=")" suffixOverrides=","><if test ='id != null'>`id`,</if><if test ='kuchunNo != null'>`kuchun_no`,</if><if test ='kuchunName != null'>`kuchun_name`,</if><if test ='kuchunCount != null'>`kuchun_count`,</if><if test ='kuchunRukushijian != null'>`kuchun_rukushijian`,</if><if test ='kuchunRen != null'>`kuchun_ren`,</if><if test ='kuchunText != null'>`kuchun_text`</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test ='id != null'>#{id},</if><if test ='kuchunNo != null'>#{kuchunNo},</if><if test ='kuchunName != null'>#{kuchunName},</if><if test ='kuchunCount != null'>#{kuchunCount},</if><if test ='kuchunRukushijian != null'>#{kuchunRukushijian},</if><if test ='kuchunRen != null'>#{kuchunRen},</if>

<if test ='id != null'>#{id},</if><if test ='chukuHuohao != null'>#{chukuHuohao},</if><if test ='chukuName != null'>#{chukuName},</if><if test ='chukuSuliang != null'>#{chukuSuliang},</if><if test ='chukuClientname != null'>#{chukuClientname},</if><if test ='chukuTel != null'>#{chukuTel},</if><if test ='chukuMan != null'>#{chukuMan},</if><if test ='chukuText != null'>#{chukuText}</if></trim></insert><!--批量删除--><delete id="doRemoveBatch" parameterType="java.util.Collection">DELETE FROM `t_chuku` WHERE `id` IN<foreach collection="list" item="id" separator="," open="(" close=")">#{id}</foreach></delete><!--修改--><update id="doUpdate" parameterType="com.demo.vo.Chuku">

Graphics g = image.getGraphics();// 获得用于输出文字的Graphics对象Random random = new Random();g.setColor(getRandomColor(180, 250));// 随机设置要填充的颜色g.fillRect(0, 0, width, height);// 填充图形背景// 设置初始字体g.setFont(new Font("Times New Roman", Font.ITALIC, height));g.setColor(getRandomColor(120, 180));// 随机设置字体颜色// 用于保存最后随机生成的验证码StringBuilder validationCode = new StringBuilder();// 验证码的随机字体String[] fontNames = {"Times New Roman", "Book antiqua", "Arial"};for (int i = 0; i < 4; i++) {// 随机设置当前验证码的字符的字体g.setFont(new Font(fontNames[random.nextInt(3)], Font.ITALIC, height));// 随机获得当前验证码的字符char codeChar = codeChars.charAt(random.nextInt(charsLength));validationCode.append(codeChar);// 随机设置当前验证码字符的颜色g.setColor(getRandomColor(10, 100));// 在图形上输出验证码字符,x和y都是随机生成的g.drawString(String.valueOf(codeChar), 16 * i + random.nextInt(7), height - random.nextInt(6));}HttpSession session = request.getSession();session.setMaxInactiveInterval(5 * 60);

<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><th>备注</th><th>操作</th></tr></thead><tbody><c:forEach items="${list}" var="vo"><tr class="index-content-table-td"><td>${vo.chukuHuohao}</td><td>${vo.chukuName}</td><td>${vo.chukuSuliang}</td><td>${vo.chukuClientname}</td><td>${vo.chukuTel}</td><td>${vo.chukuMan}</td><td title="${vo.chukuText}">

vo.setRukuDingdanhao(Util.decode(request, "rukuDingdanhao"));vo.setRukuName(Util.decode(request, "rukuName"));vo.setRukuSuliang(Util.decode(request, "rukuSuliang"));vo.setRukuTime(Util.decode(request, "rukuTime"));vo.setRukuRen(Util.decode(request, "rukuRen"));vo.setRukuText(Util.decode(request, "rukuText"));rukuService.update(vo);this.redirectList(request, response);}/*** 获取入库的详细信息(详情页面与编辑页面要显示该入库的详情)并跳转回页面** @param response* @param request* @throws IOException*/@RequestMapping({"rukuGet", "rukuEditPre"})public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = Util.decode(request, "id");//取出主键idRuku vo = rukuService.get(id);

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。