基于javaweb+jsp的甜品店奶茶店管理系统
Posted qq_1742826239
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了基于javaweb+jsp的甜品店奶茶店管理系统相关的知识,希望对你有一定的参考价值。
基于javaweb+jsp的甜品店奶茶店管理系统
JavaWeb JavaBean JSP MVC mysql Tomcat javascript idea eclipse MyEclipse Servlet SSM Maven …
部分代码实现JSP
<tr>
<td width="12%">商品详情:</td><td><input class="index-content-table-td-add" type="text" id="dinggouXiangqing" name="dinggouXiangqing" value="${vo.dinggouXiangqing}"/></td>
</tr>
<tr>
<td width="12%">订购人:</td><td><input class="index-content-table-td-add" type="text" id="dinggouShouhuo" name="dinggouShouhuo" value="${vo.dinggouShouhuo}"/></td>
</tr>
<tr>
<td width="12%">电话:</td><td><input class="index-content-table-td-add" type="text" id="dinggouTel" name="dinggouTel" value="${vo.dinggouTel}"/></td>
</tr>
<tr>
<td width="12%">地址:</td><td><input class="index-content-table-td-add" type="text" id="dinggouAdd" name="dinggouAdd" value="${vo.dinggouAdd}"/></td>
</tr>
<tr>
<td width="12%">支付方式:</td>
<td>
<input name="dinggouZhifufangshi" type="radio" value="现金" ${vo.dinggouZhifufangshi=='现金'?'checked':''}/> 现金
<input name="dinggouZhifufangshi" type="radio" value="转帐" ${vo.dinggouZhifufangshi=='转帐'?'checked':''}/> 转帐
</td>
</tr>
<tr>
<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-success btn-sm" <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> οnclick="window.location.href='dinggou_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="dinggou_name"/><button class="btn btn-grad btn-default btn-sm" onclick="searchList()">搜索</button></div>
</div>
<br>
<table class="table table-striped table-hover table-bordered">
<thead>
<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>
if (document.getElementById("dinggouShouhuo").value.trim().length == 0) {
alert("订购人不能为空!");
return false;
}
if (document.getElementById("dinggouTel").value.trim().length == 0) {
alert("电话不能为空!");
return false;
}
if (document.getElementById("dinggouAdd").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" %>
<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.dinggouName}</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>
<input name="dinggouZhuangtai" type="radio" value="已完成"/> 已完成
</td>
</tr>
<tr>
<td width="12%">备注:</td><td><textarea id="dinggouText" name="dinggouText" style="width: 60%; height: 100px;padding: 0px 17px;" placeholder="请输入内容......"></textarea></td>
</tr>
</table>
<br>
<br>
<br>
<button type="submit" class="btn btn-grad btn-success btn-sm">提交</button> <button type="button" class="btn btn-grad btn-info btn-sm" onclick="javascript:history.back(-1);">取消</button>
</form>
</div>
</body>
<td>状态:
<b>${vo.dinggouZhuangtai}</b>
</td>
</tr>
<tr>
<td>备注:<b>${vo.dinggouText}</b></td>
</tr>
</table>
<br>
<button type="button" class="btn btn-grad btn-info btn-sm" onclick="javascript:history.back(-1);">返回</button>
</form>
</div>
</body>
<%@ 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"/>
</body>
<script>
function searchList() {
window.location.href = "dinggouList?searchColumn="+document.getElementById("searchColumn").value+"&keyword=" + document.getElementById("search_keyword").value;
}
</script>
//提交之前进行检查,如果return false,则不允许提交
function check() {
//根据ID获取值
if (document.getElementById("dinggouName").value.trim().length == 0) {
alert("商品不能为空!");
return false;
}
if (document.getElementById("dinggouXiangqing").value.trim().length == 0) {
alert("商品详情不能为空!");
return false;
}
if (document.getElementById("dinggouShouhuo").value.trim().length == 0) {
alert("订购人不能为空!");
return false;
}
if (document.getElementById("dinggouTel").value.trim().length == 0) {
alert("电话不能为空!");
return false;
}
if (document.getElementById("dinggouAdd").value.trim().length == 0) {
alert("地址不能为空!");
<td>${vo.dinggouShouhuo}</td>
<td>${vo.dinggouTel}</td>
<td>${vo.dinggouAdd}</td>
<td>${vo.dinggouZhifufangshi}</td>
<td>${vo.dinggouZhuangtai}</td>
<td>
<button class="btn btn-grad btn-info btn-sm" style="padding: 0px 1px;" onclick="window.location.href='dinggouGet?id=${vo.id}'">详情</button>
<button class="btn btn-grad btn-warning btn-sm" style="padding: 0px 1px;"
<c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if>
οnclick="window.location.href='dinggouEditPre?id=${vo.id}'">编辑</button>
<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.dinggouName}?'))window.location.href='dinggouDelete?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>
}
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>
<table class="index-content-table-add" style="font-size: 18px;">
满记甜品“联姻”小满茶田,老品牌寻觅翻红之道