文章詳情頁
基于javaweb+jsp實現企業財務記賬管理系統
瀏覽:546日期:2022-06-07 18:16:22
目錄
- 前言
- 部分代碼實現JSP?
- 效果圖
前言
運行環境
Java≥6、Tomcat≥7.0、MySQL≥5.5
開發工具
idea/eclipse/MyEclipse
技術框架
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript
基礎JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架…均可
開發工具:idea或eclipse或myeclipse
適用
課程設計,大作業,畢業設計,項目練習,學習演示等
功能說明
登錄、注冊、退出、用戶模塊、公告模塊、職工工資模塊、企業資產模塊、項目經營模塊的增刪改查管理
部分代碼實現JSP?
<th>投入(萬元)</th> <th>收入(萬元)</th> <th>利潤(萬元)</th> <th>盈虧</th><th>操作</th> </tr> </thead> <tbody> <c:forEach items="${list}" var="vo"><tr><td>${vo.jingyinName}</td><td>${vo.jingyinDate}</td><td>${vo.jingyinTou}</td><td>${vo.jingyinShou}</td>
<div> <form action="JingyinServlet"><div> <button type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> </button> <h4>刪除項目經營</h4></div><div> 確認要刪除該項目經營記錄嗎? <div><label>(hidden)</label><input type="hidden" name="action" value="delete"><input type="text" name="id" id="delete-id">
</div><div> <table><tr> <td>項目名稱:</td> <td><b id="info-jingyinName"></b></td></tr><tr> <td>時間:</td> <td><b id="info-jingyinDate"></b></td></tr><tr> <td>投入(萬元):</td> <td><b id="info-jingyinTou"></b></td></tr><tr> <td>收入(萬元):</td> <td><b id="info-jingyinShou"></b></td></tr><tr> <td>利潤(萬元):</td>
</div> </div></div><!-- add --><div id="modal-add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div role="document"><div> <form action="JingyinServlet" onsubmit="return addCheck()"><div> <button type="button" data-dismiss="modal"
</form></div> </div></div><!-- edit --><div id="modal-edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div role="document"><div> <form action="JingyinServlet" onsubmit="return editCheck()"><div> <button type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> </button> <h4>更新項目經營</h4></div><div> <div><label>(hidden)</label>
}if (document.getElementById("edit-jingyinTou").value.trim().length == 0) { alert("投入(萬元)不能為空"); return false;}if (document.getElementById("edit-jingyinShou").value.trim().length == 0) { alert("收入(萬元)不能為空"); return false;}if (document.getElementById("edit-jingyinLirun").value.trim().length == 0) { alert("利潤(萬元)不能為空"); return false;}return true; }</script>
let button = $(event.relatedTarget);let id = button.data("id");let modal = $(this);$.ajax({ url: "JingyinServlet?action=get&id=" + id, type: "get", success: function (voString) {let vo = eval("(" + voString + ")");modal.find("#edit-id").val(vo.id);modal.find("#edit-jingyinName").val(vo.jingyinName);modal.find("#edit-jingyinDate").val(vo.jingyinDate);modal.find("#edit-jingyinTou").val(vo.jingyinTou);
<label for="edit-createTime">創建時間:</label><input type="text" name="createTime" id="edit-createTime"> </div></div><div> <button type="button" data-dismiss="modal">取消</button> <button type="submit">提交</button></div> </form></div> </div></div><!-- delete --><div id="modal-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div><label>盈虧:</label><input name="jingyinStatus" id="add-jingyinStatus_盈利" type="radio" value="盈利" checked="checked"/>盈利<input name="jingyinStatus" id="add-jingyinStatus_虧損" type="radio" value="虧損"/>虧損 </div> <div><label for="add-jingyinText">備注:</label><textarea name="jingyinText" id="add-jingyinText"></textarea> </div></div><div> <button type="button" data-dismiss="modal">取消</button> <button type="submit">提交</button></div> </form>
</div></div><!-- info --><div id="modal-info" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div role="document"><div> <form><div> <button type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> </button>
<td>${vo.jingyinStatus}</td> <th><button data-id="${vo.id}"data-toggle="modal" data-target="#modal-info">詳情</button><button<c:if test="${loginUser.userType != "管理員"}">disabled="disabled" title="沒有權限!??!"</c:if>data-id="${vo.id}"data-toggle="modal" data-target="#modal-edit">編輯</button><button <c:if test="${loginUser.userType != "管理員"}">disabled="disabled" title="沒有權限!??!"</c:if> data-id="${vo.id}"data-toggle="modal" data-target="#modal-delete">刪除</button> </th></tr> </c:forEach> </tbody></table> </div>
let vo = eval("(" + voString + ")");modal.find("#info-jingyinName").text(vo.jingyinName);modal.find("#info-jingyinDate").text(vo.jingyinDate);modal.find("#info-jingyinTou").text(vo.jingyinTou);modal.find("#info-jingyinShou").text(vo.jingyinShou);modal.find("#info-jingyinLirun").text(vo.jingyinLirun);modal.find("#info-jingyinStatus").text(vo.jingyinStatus);modal.find("#info-jingyinText").text(vo.jingyinText); }}) }) function searchList() {window.location.href = "JingyinServlet?action=list&searchColumn="+document.getElementById("searchColumn").value+"&keyword=" + document.getElementById("search_keyword").value; }
</tr><tr> <td>盈虧:</td> <td><b id="info-jingyinStatus"></b></td></tr><tr> <td>備注:</td> <td><b id="info-jingyinText"></b></td></tr> </table> <br></div><div> <button type="button" data-dismiss="modal">關閉</button>
<span aria-hidden="true">×</span> </button> <h4 id="myModalLabel">增加項目經營</h4></div><div> <div><label>(hidden)</label><input type="text" name="action" value="add"> </div> <div><label for="add-jingyinName">項目名稱:</label><input type="text" name="jingyinName" id="add-jingyinName">
</div> <div><label for="edit-jingyinShou">收入(萬元):</label><input type="text" name="jingyinShou" id="edit-jingyinShou"> </div> <div><label for="edit-jingyinLirun">利潤(萬元):</label><input type="text" name="jingyinLirun" id="edit-jingyinLirun"> </div> <div><label>盈虧:</label> <input name="jingyinStatus" id="edit-jingyinStatus_盈利" type="radio" value="盈利"/>盈利 <input name="jingyinStatus" id="edit-jingyinStatus_虧損" type="radio" value="虧損"/>虧損 </div> <div><label for="edit-jingyinText">備注:</label><textarea name="jingyinText" id="edit-jingyinText"></textarea> </div>
<div><label for="add-jingyinDate">時間:</label><input type="text" name="jingyinDate" id="add-jingyinDate"> </div> <div><label for="add-jingyinTou">投入(萬元):</label><input type="text" name="jingyinTou" id="add-jingyinTou"> </div> <div><label for="add-jingyinShou">收入(萬元):</label><input type="text" name="jingyinShou" id="add-jingyinShou"> </div> <div><label for="add-jingyinLirun">利潤(萬元):</label><input type="text" name="jingyinLirun" id="add-jingyinLirun">
<%@ 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" href="css/bootstrap.css" rel="external nofollow" > <link rel="stylesheet" href="css/main.css" rel="external nofollow" > <script src="js/jquery-3.5.1.js"></script> <script src="js/bootstrap.js"></script></head>
</ul></div> </div></nav><div> <div><div> <!-- 側邊欄 --> <jsp:include page="menu.jsp"><jsp:param value="active" name="Jingyin_active"/> </jsp:include></div><br><div> <div><div> <div><input type="hidden" id="searchColumn" name="searchColumn" value="jingyin_name"/><input type="text" id="search_keyword" name="search_keyword" placeholder="項目名稱"/> <span><button type="button" onclick="searchList()">搜索</button></span> </div>
<input type="text" readonly name="id" id="edit-id"> </div> <div><label for="edit-jingyinName">項目名稱:</label><input type="text" name="jingyinName" id="edit-jingyinName"> </div> <div><label for="edit-jingyinDate">時間:</label><input type="text" name="jingyinDate" id="edit-jingyinDate"> </div> <div><label for="edit-jingyinTou">投入(萬元):</label>
modal.find("#edit-jingyinLirun").val(vo.jingyinLirun);for (let val of "盈利/虧損".split("/")) { if (val == vo.jingyinStatus) {modal.find("#edit-jingyinStatus_" + vo.jingyinStatus).prop("checked", true); } else {modal.find("#edit-jingyinStatus_" + vo.jingyinStatus).removeAttr("checked"); }};modal.find("#edit-jingyinText").val(vo.jingyinText); }}) }) $("#modal-info").on("show.bs.modal", function (event) {let button = $(event.relatedTarget);let id = button.data("id");let modal = $(this);$.ajax({ url: "JingyinServlet?action=get&id=" + id, type: "get",
<div> <button type="button" <c:if test="${loginUser.userType != "管理員"}">disabled="disabled" title="沒有權限!??!"</c:if> data-toggle="modal" data-target="#modal-add">添加項目經營 </button></div> </div> <br> <br> <div><table> <thead> <tr> <th>項目名稱</th>
<body><nav> <div><div> <button type="button" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"><span>企業財務記賬管理系統</span> <span></span><span></span> <span></span> </button> <a href="#" rel="external nofollow" rel="external nofollow" >企業財務記賬管理系統</a></div><div id="navbar"> <ul><li><a href="#" rel="external nofollow" rel="external nofollow" >歡迎:<span>${loginUser.username}</span></a></li>
function addCheck() {//根據ID獲取值if (document.getElementById("add-jingyinName").value.trim().length == 0) { alert("項目名稱不能為空"); return false;}if (document.getElementById("add-jingyinDate").value.trim().length == 0) { alert("時間不能為空"); return false;}if (document.getElementById("add-jingyinTou").value.trim().length == 0) { alert("投入(萬元)不能為空"); return false;}
</div><div> <button type="button" data-dismiss="modal">取消</button> <button type="submit">刪除</button></div> </form></div> </div></div></body><script> $("#modal-delete").on("show.bs.modal", function (event) {let button = $(event.relatedTarget);let id = button.data("id");let modal = $(this);modal.find("#delete-id").val(id); })
alert("收入(萬元)不能為空"); return false;}if (document.getElementById("add-jingyinLirun").value.trim().length == 0) { alert("利潤(萬元)不能為空"); return false;}return true; } //編輯表單提交之前進行檢查,如果return false,則不允許提交 function editCheck() {//根據ID獲取值if (document.getElementById("edit-jingyinName").value.trim().length == 0) { alert("項目名稱不能為空"); return false;}if (document.getElementById("edit-jingyinDate").value.trim().length == 0) { alert("時間不能為空");
效果圖
以上就是基于javaweb+jsp實現企業財務記賬管理系統的詳細內容,更多關于javaweb jsp企業財務記賬管理系統的資料請關注其它相關文章!
標簽:
JSP
排行榜
