枝江企业网站,php商务网站开发代码,单个页面的网站,网站建设外包还是自建码实现了一个简易的物业管理系统#xff0c;主要使用了以下技术和功能#xff1a;
1.主要技术
使用的技术#xff1a; HTML: 用于构建网页的基本结构。包括表单、表格、按钮等元素。 CSS: 用于美化网页的外观和布局。设置字体、颜色、边距、对齐方式等样式。 JavaScript…码实现了一个简易的物业管理系统主要使用了以下技术和功能
1.主要技术
使用的技术 HTML: 用于构建网页的基本结构。包括表单、表格、按钮等元素。 CSS: 用于美化网页的外观和布局。设置字体、颜色、边距、对齐方式等样式。 JavaScript: 用于处理用户交互和动态更新页面内容。实现了新增住户、查询住户、编辑住户、删除住户等功能。处理表单提交事件验证输入数据并更新表格显示。 DOM操作: 使用 JavaScript 直接操作 HTML DOM 元素。动态生成和更新表格内容根据用户操作实时反映数据变化。 模态框Modal: 使用自定义的模态框来实现编辑住户信息的功能。提供一个弹出窗口让用户可以编辑住户详细信息并保存更改。
2.主要功能说明
实现的主要系统功能 菜单导航: 用户可以通过侧边栏中的按钮切换不同的管理模块包括住户管理和物业费缴纳。 住户管理: 新增住户: 提供表单让用户输入住户姓名、性别、电话和楼层单元号并将其添加到住户列表中。查询用户: 显示所有住户的信息并支持按姓名或单元号搜索特定住户。编辑住户: 通过模态框允许用户编辑已存在的住户信息。删除住户: 提供删除按钮让用户从住户列表中移除某个住户。 物业费缴纳: 提供一个表单让用户选择住户并输入缴纳的物业费金额。记录每次缴纳的费用并显示在表格中。 表单清空: 在成功添加住户后自动清空表单中的所有输入字段以便用户可以立即开始新的输入。
这个系统的目的是简化物业管理过程提高工作效率并方便地管理和跟踪住户信息及物业费缴纳情况。
3.完整代码
!DOCTYPE html
html langzh-CN
headmeta charsetUTF-8meta nameviewport contentwidthdevice-width, initial-scale1.0title物业管理系统/titlestylebody {font-family: Arial, sans-serif;margin: 20px;display: flex;}.sidebar {width: 200px;padding: 10px;border-right: 1px solid #ddd;}.content {flex-grow: 1;padding: 10px;}form {display: flex;flex-direction: column;gap: 10px;margin-bottom: 20px;}label {display: block;}input, select, button {width: 100%;padding: 8px;}table {width: 100%;border-collapse: collapse;}th, td {border: 1px solid #ddd;padding: 8px;text-align: left;}th {background-color: #f2f2f2;}button {margin-top: 10px;}.submenu {margin-left: 20px;}#editModal {display: none;position: fixed;z-index: 1;left: 0;top: 0;width: 100%;height: 100%;overflow: auto;background-color: rgba(0,0,0,0.4);}.edit-modal-content {background-color: #fefefe;margin: 15% auto;padding: 20px;border: 1px solid #888;width: 300px;}.close {color: #aaa;float: right;font-size: 28px;font-weight: bold;}.close:hover,.close:focus {color: black;text-decoration: none;cursor: pointer;}/style
/head
body
div classsidebarh2菜单/h2button onclickshowResidentsMenu()住户管理/buttondiv idresidentsSubmenu classsubmenu styledisplay:none;button onclickshowAddResidentForm()新增住户/buttonbutton onclickshowQueryResidents()查询用户/button/divbutton onclickshowPayments()物业费缴纳/button
/div
div classcontent idcontentArea!-- 默认显示欢迎信息 --h2欢迎登录不靠谱物业管理系统/h2
/div!-- Edit Modal --
div ideditModal classmodaldiv classedit-modal-contentspan classclose onclickcloseEditModal()times;/spanform onsubmitevent.preventDefault(); saveEditedResident()label foreditName住户姓名:/labelinput typetext ideditName requiredlabel foreditGender性别:/labelselect ideditGender requiredoption value disabled selected请选择性别/optionoption value男男/optionoption value女女/option/selectlabel foreditPhone电话:/labelinput typetel ideditPhone requiredlabel foreditUnit楼层单元号:/labelinput typetext ideditUnit requiredbutton typesubmit保存/button/form/div
/divscriptlet residents [];let payments [];function showResidentsMenu() {const submenu document.getElementById(residentsSubmenu);if (submenu.style.display none) {submenu.style.display block;} else {submenu.style.display none;}}function showAddResidentForm() {const contentArea document.getElementById(contentArea);contentArea.innerHTML h2住户管理 - 新增住户/h2form οnsubmitevent.preventDefault(); addResidentDirectly()label forresidentName住户姓名:/labelinput typetext idresidentName placeholder住户姓名 requiredlabel forresidentGender性别:/labelselect idresidentGender requiredoption value disabled selected请选择性别/optionoption value男男/optionoption value女女/option/selectlabel forresidentPhone电话:/labelinput typetel idresidentPhone placeholder电话 requiredlabel forresidentUnit楼层单元号:/labelinput typetext idresidentUnit placeholder楼层单元号 requiredbutton typesubmit添加住户/button/form;}function showQueryResidents() {const contentArea document.getElementById(contentArea);contentArea.innerHTML h2住户管理 - 查询用户/h2input typetext idsearchInput placeholder按姓名或单元号搜索... οnkeyupfilterResidents()table idresidentsTabletheadtrth住户姓名/thth性别/thth电话/thth楼层单元号/thth操作/th/tr/theadtbody/tbody/table;updateResidentsTable();}function addResidentDirectly() {const name document.getElementById(residentName).value.trim();const gender document.getElementById(residentGender).value;const phone document.getElementById(residentPhone).value.trim();const unit document.getElementById(residentUnit).value.trim();if (name gender phone unit) {residents.push({ name, gender, phone, unit });updateResidentsTable();clearFormFields();}}function removeResident(index) {residents.splice(index, 1);updateResidentsTable();}function editResident(index) {const resident residents[index];document.getElementById(editName).value resident.name;document.getElementById(editGender).value resident.gender;document.getElementById(editPhone).value resident.phone;document.getElementById(editUnit).value resident.unit;openEditModal(index);}function saveEditedResident() {const index parseInt(document.getElementById(editModal).getAttribute(data-index), 10);const editedName document.getElementById(editName).value.trim();const editedGender document.getElementById(editGender).value;const editedPhone document.getElementById(editPhone).value.trim();const editedUnit document.getElementById(editUnit).value.trim();if (editedName editedGender editedPhone editedUnit) {residents[index] { name: editedName, gender: editedGender, phone: editedPhone, unit: editedUnit };updateResidentsTable();closeEditModal();}}function openEditModal(index) {document.getElementById(editModal).setAttribute(data-index, index);document.getElementById(editModal).style.display block;}function closeEditModal() {document.getElementById(editModal).style.display none;}function updateResidentsTable() {const tbody document.querySelector(#residentsTable tbody);tbody.innerHTML ;residents.forEach((resident, index) {const row document.createElement(tr);row.innerHTML td${resident.name}/tdtd${resident.gender}/tdtd${resident.phone}/tdtd${resident.unit}/tdtdbutton οnclickremoveResident(${index})删除/buttonbutton οnclickeditResident(${index})编辑/button/td;tbody.appendChild(row);});}function filterResidents() {const input document.getElementById(searchInput).value.toLowerCase();const rows document.querySelectorAll(#residentsTable tbody tr);rows.forEach(row {const cells row.getElementsByTagName(td);const name cells[0].textContent || cells[0].innerText;const unit cells[3].textContent || cells[3].innerText;if (name.toLowerCase().includes(input) || unit.toLowerCase().includes(input)) {row.style.display ;} else {row.style.display none;}});}function makePayment() {const residentIndex document.getElementById(paymentSelect).selectedIndex - 1;const amount parseFloat(document.getElementById(amount).value);if (residentIndex 0 !isNaN(amount)) {const payment {resident: residents[residentIndex].name,amount: amount,date: new Date().toLocaleDateString()};payments.push(payment);updatePaymentsTable();document.getElementById(amount).value ;}}function updatePaymentSelect() {const select document.getElementById(paymentSelect);select.innerHTML option disabled selected请选择住户/option;residents.forEach(resident {const option document.createElement(option);option.textContent resident.name;select.appendChild(option);});}function updatePaymentsTable() {const tbody document.querySelector(#paymentsTable tbody);tbody.innerHTML ;payments.forEach(payment {const row document.createElement(tr);row.innerHTML td${payment.resident}/tdtd${payment.amount.toFixed(2)}/tdtd${payment.date}/td;tbody.appendChild(row);});}function showPayments() {const contentArea document.getElementById(contentArea);contentArea.innerHTML h2物业费缴纳/h2form οnsubmitevent.preventDefault(); makePayment()label forpaymentSelect选择住户:/labelselect idpaymentSelect required!-- 动态填充住户选项 --/selectlabel foramount金额:/labelinput typenumber idamount placeholder金额 requiredbutton typesubmit缴纳费用/button/formtable idpaymentsTabletheadtrth住户姓名/thth金额/thth日期/th/tr/theadtbody/tbody/table;updatePaymentSelect();updatePaymentsTable();}function clearFormFields() {document.getElementById(residentName).value ;document.getElementById(residentGender).value ;document.getElementById(residentPhone).value ;document.getElementById(residentUnit).value ;}// 初始化页面window.onload function() {document.getElementById(contentArea).innerHTML h2欢迎登录不靠谱物业管理系统/h2;};
/script
/body
/html
4页面展示
文章转载自: http://www.morning.xwbwm.cn.gov.cn.xwbwm.cn http://www.morning.mjmtm.cn.gov.cn.mjmtm.cn http://www.morning.yrrnx.cn.gov.cn.yrrnx.cn http://www.morning.pcgmw.cn.gov.cn.pcgmw.cn http://www.morning.aowuu.com.gov.cn.aowuu.com http://www.morning.cnqwn.cn.gov.cn.cnqwn.cn http://www.morning.jrlgz.cn.gov.cn.jrlgz.cn http://www.morning.hmdn.cn.gov.cn.hmdn.cn http://www.morning.qpqwd.cn.gov.cn.qpqwd.cn http://www.morning.xsrnr.cn.gov.cn.xsrnr.cn http://www.morning.skbbt.cn.gov.cn.skbbt.cn http://www.morning.rlhgx.cn.gov.cn.rlhgx.cn http://www.morning.aa1585.com.gov.cn.aa1585.com http://www.morning.dydqh.cn.gov.cn.dydqh.cn http://www.morning.routalr.cn.gov.cn.routalr.cn http://www.morning.lflsq.cn.gov.cn.lflsq.cn http://www.morning.gryzk.cn.gov.cn.gryzk.cn http://www.morning.rnygs.cn.gov.cn.rnygs.cn http://www.morning.mpyry.cn.gov.cn.mpyry.cn http://www.morning.jzlkq.cn.gov.cn.jzlkq.cn http://www.morning.yfcbf.cn.gov.cn.yfcbf.cn http://www.morning.wfmqc.cn.gov.cn.wfmqc.cn http://www.morning.mknxd.cn.gov.cn.mknxd.cn http://www.morning.sfdky.cn.gov.cn.sfdky.cn http://www.morning.zpyh.cn.gov.cn.zpyh.cn http://www.morning.ygkb.cn.gov.cn.ygkb.cn http://www.morning.xqgtd.cn.gov.cn.xqgtd.cn http://www.morning.rwlsr.cn.gov.cn.rwlsr.cn http://www.morning.jltmb.cn.gov.cn.jltmb.cn http://www.morning.spqtq.cn.gov.cn.spqtq.cn http://www.morning.nrchx.cn.gov.cn.nrchx.cn http://www.morning.fkgct.cn.gov.cn.fkgct.cn http://www.morning.lgnz.cn.gov.cn.lgnz.cn http://www.morning.brrxz.cn.gov.cn.brrxz.cn http://www.morning.gbrps.cn.gov.cn.gbrps.cn http://www.morning.pzdxg.cn.gov.cn.pzdxg.cn http://www.morning.zlsmx.cn.gov.cn.zlsmx.cn http://www.morning.kcbml.cn.gov.cn.kcbml.cn http://www.morning.bbyqz.cn.gov.cn.bbyqz.cn http://www.morning.wnpps.cn.gov.cn.wnpps.cn http://www.morning.jnptt.cn.gov.cn.jnptt.cn http://www.morning.ykrkb.cn.gov.cn.ykrkb.cn http://www.morning.lcbgf.cn.gov.cn.lcbgf.cn http://www.morning.krwzy.cn.gov.cn.krwzy.cn http://www.morning.rnmmh.cn.gov.cn.rnmmh.cn http://www.morning.ckhry.cn.gov.cn.ckhry.cn http://www.morning.yjfmj.cn.gov.cn.yjfmj.cn http://www.morning.qxltp.cn.gov.cn.qxltp.cn http://www.morning.ailvturv.com.gov.cn.ailvturv.com http://www.morning.mrfr.cn.gov.cn.mrfr.cn http://www.morning.xrqkm.cn.gov.cn.xrqkm.cn http://www.morning.incmt.com.gov.cn.incmt.com http://www.morning.djwpd.cn.gov.cn.djwpd.cn http://www.morning.lnwdh.cn.gov.cn.lnwdh.cn http://www.morning.hwycs.cn.gov.cn.hwycs.cn http://www.morning.nflpk.cn.gov.cn.nflpk.cn http://www.morning.fywqr.cn.gov.cn.fywqr.cn http://www.morning.gwxwl.cn.gov.cn.gwxwl.cn http://www.morning.ltpph.cn.gov.cn.ltpph.cn http://www.morning.lydtr.cn.gov.cn.lydtr.cn http://www.morning.ygkk.cn.gov.cn.ygkk.cn http://www.morning.bxhch.cn.gov.cn.bxhch.cn http://www.morning.ffwrq.cn.gov.cn.ffwrq.cn http://www.morning.qggm.cn.gov.cn.qggm.cn http://www.morning.mhlkc.cn.gov.cn.mhlkc.cn http://www.morning.gkgb.cn.gov.cn.gkgb.cn http://www.morning.lqytk.cn.gov.cn.lqytk.cn http://www.morning.zxcny.cn.gov.cn.zxcny.cn http://www.morning.dqgbx.cn.gov.cn.dqgbx.cn http://www.morning.uqrphxm.cn.gov.cn.uqrphxm.cn http://www.morning.ttdbr.cn.gov.cn.ttdbr.cn http://www.morning.rnxs.cn.gov.cn.rnxs.cn http://www.morning.plqqp.cn.gov.cn.plqqp.cn http://www.morning.pnntx.cn.gov.cn.pnntx.cn http://www.morning.ytbr.cn.gov.cn.ytbr.cn http://www.morning.nynyj.cn.gov.cn.nynyj.cn http://www.morning.xphcg.cn.gov.cn.xphcg.cn http://www.morning.jpnw.cn.gov.cn.jpnw.cn http://www.morning.rkmsm.cn.gov.cn.rkmsm.cn http://www.morning.hjrjr.cn.gov.cn.hjrjr.cn