收藏 分销(赏)

汽车销售管理系统的设计与实现--客户管理模块毕业设计.doc

上传人:可**** 文档编号:2798356 上传时间:2024-06-06 格式:DOC 页数:22 大小:370KB 下载积分:10 金币
下载 相关 举报
汽车销售管理系统的设计与实现--客户管理模块毕业设计.doc_第1页
第1页 / 共22页
汽车销售管理系统的设计与实现--客户管理模块毕业设计.doc_第2页
第2页 / 共22页


点击查看更多>>
资源描述
摘要 随着互连网技术的发展,汽车销售系统通过计算机网络对客户进行管理已成为主要形式。本文在分析客户管理的发展及现有模式的基础上,结合计算机网络技术的发展和企业销售的要求,提出了客户管理的有效模式,并在技术实现上进行了详细的分析。 本课题使用JAVA作为开发语言,应用框架是Spring MVC+MyBatis+freemaker,TOMCAT作为Web服务器,并使用了MYSQL作为后台数据库。Ajax实现了从基于Web的应用到基于数据的应用的转换。通过Ajax异步请求,可以使系统功能更加完善,更加友好。同时,EasyUI界面框架的使用也加强了页面友好度。 此次完成的客户管理系统,成功的实现了分页显示客户信息、添加客户信息及其增删改等功能,此外,根据用户的购买信息,实现了销售统计和客户消费的统计。并且注册页面采用了Ajax异步请求进行了对注册用户名的验证,同时,本软件的风格主要是采用了Easyui界面进行展示,其中,页面布局使用其layout模块,加载数据使用其datagrid模块,页面提示信息亦是采用了其Message功能模块。 关键词: Spring MVC, MYSQL,Ajax,Easyui,MyBatis 1 Abstract With the development of Internet technology, car sales system through computer network to manage the customer has become the main form. Based on the analysis of the development of customer management and the existing model, combined with the development of computer network technology and the requirement of quality education, puts forward the customer management mode, and makes detailed analysis on technology implementation. This paper uses JAVA as the development language, SpringMVC+MyBatis+freemaker application framework, TOMCAT as the Web server,and uses MYSQL as the back-end database. Ajax from the implementation of the Web based applications to applications based on data conversion.Through the Ajax asynchronous request, can make the system function more perfect, more friendly. At the same time, the use of EasyUI interface frameworkand strengthen friendly page. The complete customer management system, to achieve the success ofpaging display customer information, add customer information and crud functions, in addition, according to the user's information, the statistics, sales statistics and customer consumption. And the registration page using the Ajaxasynchronous request is verified, the registered user name at the same time,the software style is mainly used Easyui interface to display, wherein, the layout of the page using the layout module, loading the data using its DataGridmodule, page message is also using the Message function module. Key words:Spring MVC, MYSQL,Ajax,Easyui,Mybatis 目录 引言 1 1.1 模块开发的意义 1 1.2 开发环境 1 技术概述 2 2.1数据库介绍 2 2.2设计中JavaScript和Ajax技术 2 2.3 Spring MVC 介绍 2 需求分析 3 3.1项目概述 3 3.1.1 应用目标 3 3.1.2 作用及范围 3 3.2模块功能 3 3.3设计模式选定 3 设计与实现 4 4.1数据库设计 4 4.1.1 E/R图 4 如下图4-1所示: 4 4.1.2 详细的表结构 5 4.2流程图 5 4.3模块功能界面 6 4.3.1 登录界面 6 4.3.2 管理员注册界面 7 4.3.3 管理员修改密码界面 7 4.3.4 用户列表界面 8 4.3.5 消费列表界面 8 4.3.6 销售列表界面 9 4.4 部分功能界面代码 9 4.4.1 管理员注册界面代码 9 4.4.2 页面加载数据代码 10 4.4.3 SpringMVC配置代码 12 总结 17 参考文献 18 致谢 19 引言 1.1 模块开发的意义 IT技术的发展使信息的管理也进入了一个崭新的阶段,人类进入了信息高速发展的时代,信息技术成为一门新的产业[1]。汽车销售理念的出台,使销售信息管理系统已开始设计并应用于现实管理中。汽车销售数量急剧增加,有关购车客户的各种信息量也成倍增长,客户信息的统计跟踪工作量与工作难度亦在增长。 使用计算机对客户信息进行统计跟踪,具有手工管理无法比拟的优点。使用计算机进行管理具有查找方便、数据处理快捷、成本低等优点。这些优点能够极大地提高汽车销售客户信息管理的效率,也是企业的科学化、正规化管理的重要条件。 在传统模式下简单利用计算机对客户信息进行统计跟踪,存在着较多的缺点,这给汽车销售管理者对客户的信息管理带来了很大困难,严重影响了工作者的工作效率。随着科学技术的不断发展,计算机科学日渐成熟,使用日趋成熟的计算机技术代替传统的人工模式,来实现销售客户的现代化管理,其强大的功能已经为人们所深刻认知,计算机技术已进入人类社会的各个领域并发挥着越来越重要的作用。 1.2 开发环境 运行环境硬件:P4以上计算机,256M内存以上。 软件要求:Windows98以上,Mysql5.5以上,JDK1.6以上,Tomcat7.0。 开发环境硬件:P4以上计算机,256M内存以上。 软件:MySQL5.5,JDK1.7以上,Tomcat7.0,Eclipse 3.6。 技术概述 2.1数据库介绍 MySQL[2]是一个小型关系型数据库管理系统。由于它的强大功能、灵活性、丰富的应用编程接口(API)以及精巧的系统结构,体积小、速度快、总体拥有成本低 ,尤其是开放源码 ,受到了广大自由软件爱好者甚至是商业软件用户的青睐,特别是与Apache和PHP/PERL结合,为建立基于数据库的动态网站提供了强大动力。MySQL是一个真正的多用户、多线程SQL数据库服务器。SQL(结构化查询语言)是世界上最流行的和标准化的数据库语言。MySQL是以一个客户机/服务器结构的实现,它由一个服务器守护程序MySQL和很多不同的客户程序和库组成。 2.2设计中JavaScript和Ajax技术 本模块前台的大部分功能采用Ajax来实现。这使系统大大提升了性能。Ajax技术以JavaScript[3]为依托,而JavaScript是一种解释性的,基于对象的脚本语言(an interpreted,object-based scripting language)。 HTML网页在互动性方面能力较弱,例如表单局部刷新,就是用户点击某一按钮时,可实现网页的无跳转的页面局部刷新,用纯HTML网页无法实现;又如验证HTML表单(Form)提交信息的有效性,用户名不能为空,密码不能少于6位,邮政编码只能是数字之类,用纯HTML网页也无法实现。要实现这些功能,就需要用到JavaScript。 JavaScript作为一种脚本语言,比HTML要复杂,但是因为JavaScript写的程序都是以源代码的形式出现的,正因为可以借鉴、参考优秀网页的代码,所以让JavaScript本身也变得非常受欢迎,从而被广泛应用。原来不懂编程的人,多参考JavaScript示例代码,也能很快上手。 JavaScript主要是基于客户端运行的,用户点击带有JavaScript的网页,网页里的JavaScript就传到浏览器,由浏览器对此作处理。前面提到的局部刷新、验证表单有效性等大量互动性功能,都是在客户端完成的。 2.3 Spring MVC 介绍 Spring[4]框架提供了构建 Web 应用程序的全功能 MVC 模块。使用 Spring 可插入的 MVC 架构,可以选择是使用内置的 Spring Web[5]框架还是 Struts 这样的 Web 框架。通过策略接口,Spring 框架是高度可配置的,而且包含多种视图技术,例如 JavaServer Pages(JSP)技术、Velocity、Tiles、iText 和 POI。Spring MVC 框架并不知道使用的视图,所以不会强迫您只使用 JSP 技术。Spring MVC 分离了控制器、模型对象、分派器以及处理程序对象的角色,这种分离让它们更容易进行定制。 Spring用到的技术主要是IOC和AOP[6],并且善用注解和单元测试。 需求分析 3.1项目概述 该模块是为节省了客户管理花费的人力和物力,解决手工操作带来的诸多不便,提高信息查询管理的工作效率而设计的。 3.1.1 应用目标 系统界面简洁,操作方便、容易,最大限度的满足汽车销售管理人员的需求,使管理人员通过使用本模块可以进行快速的客户信息检索,以节省大量的工作时间和工作量,提高客户信息管理的效率。 3.1.2 作用及范围 本系统适用于汽车销售系统中客户信息查询管理,使查询更加方便、高效率,以协助企业建立完备的客户信息的管理。 3.2模块功能 汽车销售管理平台分为用户管理,客户基本信息的管理,管理员管理等几大部分。其中客户基本信息的管理模块是核心模块,客户添加有单个添加,客户信息查询可以提供根据客户姓名和购车名称的精确查询和根据购车价格,购车日期,有无等条件模糊查询。其中,根据客户的消费记录,实现了汽车的销量统计和客户的消费统计。 3.3设计模式选定 目前,网络应用软件运行的模式主要有两类:Client/Server模式和Browser/Web模式[7]。前者主要的缺点是维护、升级较麻烦,后者是近几年伴随Internet迅速发展起来的一种技术,它与客户/服务器方式类似,客户端是一个标准的浏览器,服务器端是Web Server,而Web Server与数据库和应用服务器的紧密结合,使得这种模式的应用范围不断扩大,它已不仅仅用于网上查询,有很多部门的业务系统、企业的MIS系统纷纷采用这种模式,它的主要优点是便于扩充应用、升级维护简便。 另外,客户统计跟踪模块也将不断的更新,同时软件产品本身就要经过一个不断自我完善的过程。 基于上述考虑,用Browser/Web模式来设计管理系统比较合适,服务器端本模块采用MySQL数据库系统和J2EE框架来构成毕业统计跟踪模块;客户端采用浏览起来完成。 设计与实现 4.1数据库设计 4.1.1 E/R图 管理员 编号 用户名 密码 类型 如下图4-1所示: 1 用户 编号 用户名 用户性别 用户年龄 购车日期 车名 购车价格 用户电话 备注 用户身份证 用户地址 图4-1数据库E/R图 4.1.2 详细的表结构 系统数据库名称:car_sale_db。数据库的表:car_admin,car_user。当添加删除、选择、更新、添加操作更新客户表时对应的客户人数发生变化对应的表car_user更新数据。 系统管理员表结构如下表4-2所示: 表4-2 管理员表 字段名称 数据类型 长度 编号 int 11 用户名 varchar 20 密码 varchar 20 类型 varchar 50 客户表结构如下表4-3所示: 表4-3 用户表 字段名称 数据类型 长度 编号 int 11 用户名字 varchar 20 用户性别 varchar 10 用户年龄 integer 11 购车日期 varchar 40 购车名字 varchar 20 购车价格 integer 11 用户电话 varchar 20 用户身份证 varcahr 20 用户地址 varchar 50 备注 varchar 200 4.2流程图 系统主要分为两大模块:管理员登录模块和客户信息管理模块。下面分别介绍管理员登录模块和客户管理模块的建立。如下图4-4所示: 汽车销售客户管理 管理员 客户管理 登录 注册 修改密码 用户列表 销售列表 消费列表 图4-4 客户管理系统组成结构 4.3模块功能界面 4.3.1 登录界面 登录界面,系统管理员的登录界面。如果账号或密码错误则提示红色错误信息。如下图4-5所示: 图4-5登陆界面 4.3.2 管理员注册界面 管理员注册界面。如下图4-6所示: 图4-6 注册界面 4.3.3 管理员修改密码界面 管理员修改密码界面。如下图4-7所示: 图4-7管理员修改密码界面 4.3.4 用户列表界面 客户信息的展示,客户的增删改操作,其中可进行模糊查找,也可以进行精确查找。如下图4-8所示: 图4-8 客户信息列表界面 4.3.5 消费列表界面 客户的消费信息列表界面,可通过客户名对客户进行精确查找,如下图4-9所示: 图4-9 消费列表界面 4.3.6 销售列表界面 汽车的销售信息列表界面,可通过车名对销售信息进行精确查找,如下图4-10所示。 图4-10销售列表的显示界面 4.4 部分功能界面代码 4.4.1 管理员注册界面代码 管理员注册信息界面主要实现的是通过Ajax实现异步验证要注册的用户名是否存在。通过jquery[8]来验证密码和确认密码是否相等。该界面的具体代码如下: <script> //验证用户名是否已经注册,用到了Ajax异步调用 function isUserExist(){ var user = $("#user").val(); if($.trim(user) != ""){ $.post("/admin/isUserExist",{user:user},function(data){ if(data == 0){ $("#user").val(""); $("#errorMsg").empty(); $("#errorMsg").append("用户名已注册"); }else if(data == 1){ $("#errorMsg").empty(); } }); }else{ $("#errorMsg").empty(); $("#errorMsg").append("用户名不能为空"); } } //通过Ajax来提交表单数据并进行注册,实现与服务器端的交互 $(":button").click(function () { var user = $("#user").val(); var pwd = $("#pwd").val(); var conpwd = $("#conpwd").val(); if($.trim(pwd) == ""){ $("#pwd").val(""); $("#conpwd").val(""); $("#errorMsg").empty(); $("#errorMsg").append("密码不能为空"); return ; } if($.trim(pwd) == $.trim(conpwd)){ $.post("/admin/regist", {user: user, pwd: pwd}, function (data) { if (data == 1) { window.location.href = "/admin/toLogin"; } else if(data == 0){ $("#user").val(""); $("#pwd").val(""); $("#conpwd").val(""); $("#errorMsg").empty(); $("#errorMsg").append("用户名已注册"); } }); }else{ $("#pwd").val(""); $("#conpwd").val(""); $("#errorMsg").empty(); $("#errorMsg").append("密码不一致"); } }) </script> 4.4.2 页面加载数据代码 页面中加载数据的方式是通过EasyUI[9]中datagrid加载的,其可实现分页Pagination的效果。 $(function () { user.init(); }); var user={ init:function(){ user.loaddata(); }, loaddata:function(){ //jquery获取页面中对应的参数值 var queryName = $("#queryName").val(); var queryCarName = $("#queryCarName").val(); var queryCarPriceMin = $("#queryCarPriceMin").val(); var queryCarPriceMax = $("#queryCarPriceMax").val(); var queryDateMin = $('#queryDateMin').datebox('getValue'); var queryDateMax = $('#queryDateMax').datebox('getValue'); //easyui框架中对应的datagrid数据加载 $("#table-user").datagrid({ url: '/user/queryAllUser', toolbar:'#toolbar', pagination:true, rownumbers: true, fitColumns:true, singleSelect:true, fit: true, // toolbar:'toolbar', queryParams:{ queryName:queryName, queryCarName:queryCarName, queryCarPriceMin:queryCarPriceMin, queryCarPriceMax:queryCarPriceMax, queryDateMin:queryDateMin, queryDateMax:queryDateMax }, columns: [ [ {filed: 'id', hidden: true}, {field: 'userName', title: '用户名',width:100}, {field: 'carName', title: '车名', align: 'left',width:100}, {field: 'carPrice', title: '车价',width:100}, {field: 'userCell', title: '用户电话',width:100}, {field: 'userAddress', title: '用户地址',width:100}, {field: 'carDate', title: '购车日期',width:100}, {field: 'op',title:'操作',width:100,formatter: function (value, rec) { return'<a title="删除" href="javascript:user.del(' + rec.id + ')" class="easyui-linkbutton l-btn l-btn-plain" iconcls="icon-remove" plain="true"><span class="l-btn-left"><span class="l-btn-text icon-remove l-btn-icon-left"></span></span></a>' + '<a title="编辑" href="javascript:user.updateDialog(' + rec.id + ')" class="easyui-linkbutton l-btn l-btn-plain" iconcls="icon-edit" plain="true"><span class="l-btn-left"><span class="l-btn-text icon-edit l-btn-icon-left"></span></span></a>'; } } ] ] }); } 4.4.3 SpringMVC配置代码 配置中,涉及到了注解的配置,前台展示使用freemarker[10]渲染也需要在这里进行配置,数据源的配置,连接数据库使用的Mybatis也在这里进行相应的配置。 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> <!-- aop support --> <mvc:annotation-driven/> <aop:aspectj-autoproxy/> <!-- scan annotation beans : Controller, Service, Component, Repository...--> <context:component-scan base-package="com.stu.car.dao.**,com.stu.car.service.**,com.stu.car.controller.**"/> <!--静态资源文件 <context:property-placeholder location="classpath:constant.properties"></context:property-placeholder> --> <!-- freemarker的配置 --> <bean id="freemarkerConfigurer" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"> <property name="templateLoaderPath" value=""/> <property name="defaultEncoding" value="UTF-8"/> <property name="freemarkerSettings"> <props> <prop key="classic_compatible">true</prop> <prop key="template_update_delay">10</prop> <prop key="locale">zh_CN</prop> <prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop> <prop key="date_format">yyyy-MM-dd</prop> <prop key="number_format">#.##</prop> </props> </property> </bean> <!-- FreeMarker视图解析 如返回userinfo。。在这里配置后缀名ftl和视图解析器。。 --> <bean id="viewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.freemarker.FreeMarkerView"/> <property name="prefix" value="/WEB-INF/template/"/> <property name="suffix" value=".ftl"/> <property name="contentType" value="text/html;charset=UTF-8"/> <property name="exposeRequestAttributes" value="true"/> <property name="exposeSessionAttributes" value="true"/> <property name="exposeSpringMacroHelpers" value="true"/> </bean> <!-- database configuration --> <tx:annotation-driven transaction-manager="txManager"/> <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource"/> </bean> <bean id="dataSource" class="mons.dbcp.BasicDataSource"> <property name="driverClassName" value="${jdbc.driver}"></property> <property name="url" value="${jdbc.url}"></property> <property name="username" value="${jdbc.username}"></property> <property name="password" value="${jdbc.password}"></property> <property name="maxActive" value="100"></property> <property name="maxIdle" value="30"></property> <property name="maxWait" value="500"></property> <property name="defaultAutoCommit" value="true"></property> </bean> <!--Configure SqlSessionFactoryBean.--> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="configLocation" value="classpath:mybatis.xml"/> <property name="mapperLocations" value="classpath*:com/stu/car/dao/**/*.xml"/> </bean> <bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate"> <
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 学术论文 > 毕业论文/毕业设计

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服