摘要电器售后服务管理是电器销售管理环节中重要的一环,许多从事电器产品的企业都有自己生产和销售的产品,而这些产品都需要储存在仓库中。
如何有效的管理仓库中的产品和对产品进行售后服务,对商家来说是非常重要的的。
本系统的功能包括有基本信息管理功能模块、产品信息管理功能模块、库存操作管理功能模块、入库操作管理功能模块、出库操作管理功能模块、仓库盘点管理功能模块、库存警示管理功能模块、统计查询管理功能模块、以及出售的电器的售后服务。
为商家的售后服务管理提供了很大的便利,也在很大程度上避免了手动操作的失误。
使用了SQL Server 2005。
关键字:电器售后服务管理系统;出库;入库;信息管理;SQL Server 2005。
ABSTRACTThe management of electric appliances after-sale service is an important part of electric appliances sale management .There are many companies of producing electrical appliances have their own products to produce and sale which need to store in the depot. And how to managethe products in the depot and how to proceed the aftersale service are very important to the dealers.This system of the function includes the basic information the management function mold,an information management function mold, an operation management function mold, store-in-warehouse operation management function mold, out operation management function mold, warehouse stocktaking management function mold, stock caution management function mold, statistics search management function mold. It Provides convenience for the warehouse stock management of the business enterprise, and also avoids the lapse of manually operation ina large extent.Keywords : The management of electric appliances after-sale service ; Delivery of cargo from storage ; Warehouse entry; SQL Server 2005.目录1.系统功能需求分析..................................................................... 错误!未定义书签。
2.数据库设计分析......................................................................... 错误!未定义书签。
3.数据库整体逻辑结构设计......................................................... 错误!未定义书签。
4.数据库实现................................................................................. 错误!未定义书签。
4.1建立数据库和表.................................................................. 错误!未定义书签。
4.2建立视图.............................................................................. 错误!未定义书签。
4.3建立存储过程...................................................................... 错误!未定义书签。
4.4建立触发器.......................................................................... 错误!未定义书签。
5.课程设计总结............................................................................. 错误!未定义书签。
参考文献................................................................................................ 错误!未定义书签。
谢辞.................................................................................................... 错误!未定义书签。
电器售后服务管理系统的设计与实现The management of electric appliances after-sale servicesystem and Implementation of the Database1.系统功能需求分析电器售后服务管理系统对售后产品进行分类和管理,提高工作效率,便于操作,能有效地对数据进行更新、查询、并能在一定程度上实现办公自动化。
主要功能包括:1.基本信息管理功能基本信息包括客户信息,仓库信息和用户权限信息。
客户信息可以分为供应商和购货商两种类型。
在产品入库时,需要提供供应商的信息;在出库和退货时,需要提供购货商的信息。
仓库信息包括仓库编号,仓库名称和仓库说明等信息。
用户权限信息包括用户名、密码、员工姓名及其权限授予等操作的信息。
基本信息管理模块可以实现以下的功能:a.客户信息的录入、修改、删除和导出。
b.仓库信息的录入、修改、删除和导出。
c.用户权限的录入、修改、删除和导出、及其。
2.产品信息管理功能产品信息管理模块可以实现以下功能:a.产品类目的录入,包括类目编号,类目名称和类目级别等信息;b.产品类目的修改;c.产品类目的删除;d.产品类目的导出;e.产品信息的录入,包括产品编号、所属类目、产品名称、产品规格等;f.产品信息的修改;g.产品信息的删除;h.产品信息的导出。
3.库存操作功能库存操作有仓库管理员执行,就是把产品放入仓库或把产品中取出的操作,用专业术语来描述就是入库和出库。
库存操作管理模块可以实现以下功能:a.入库操作入库可以分为采购入库、生产入库、退货入库等情况。
采购入库指将从供应商处的产品入库;生产入库指将企业自己生产的产品入库;退货入库指售出的产品退货后,将退货产品入库。
b.出库操作c. 库存盘点4.库存警示管理功能库存警示是指对库存中接近或超过临界值的产品进行报警。
在产品信息中,包含产品的合理数量范围和有效期限。
产品数量小于数量的下限称为短线;产品数量大于合理数量的上限称为超储。
产品出现短线、超储、接近或超过有限期时都需要报警。
a.库存产品数据报警;b.库存产品失效报警;5.统计查询管理功能统计查询管理模块可以对库存产品进行各种类型的统计和查询,从而使用户能够全面地了解库存状况。
a.产品出入库统计报表;b.库存产品流水线统计报表。
6.售后服务安排a.服务网点查询b.服务维修的安排2.数据库设计分析通过以上功能的分析,按照一般售后服务管理信息系统的要求,通过售后服务管理工程的内容,设计如下面的数据项和数据结构:客户信息管理包括的数据项有:客户编号,客户名称,客户类型,联系人,通信地址,邮政编码,联系电话,传真电话,客户描述。
仓库信息管理包括的数据项有:仓库编号,仓库名称,仓库说明。
操作员信息管理包括的数据项有:操作员代码,操作员名称,操作员权限,操作员密码,操作员职务,操作员生效日期,操作员失效日期,操作员组别。
产品类目管理包括的数据项有:产品类目编号,产品类目名称,上级类目名称。
产品信息管理包括的数据项有:产品编号,产品名称,产品类型编码,产品规格,计量单位,参考价格,产品数量上限,产品数量下限,有效期,在到达有效期前几天发出警告。
仓库入库管理包括的数据项有:出库编号,出库操作类型,出库产品编号,生产日期,出库产品单价,出库产品数量,客户编号,仓库编号,经办人,出库日期。
仓库出库管理包括的数据项有:出库编号,出库操作类型,出库产品编号,生产日期,出库产品单价,出库产品数量,客户编号,仓库编号,经办人,出库日期。
库存产品信息管理包括的数据项有:产品存储编号,产品编号们产品入库单价,产品数量,客户编号,生产日期,仓库编号。
表间对应的局部和整体E-R图如下:图2-1 客户信息实体E-R图图2-3 出库信息实体E-R图图2-4 入库信息实体E-R图图2-5 库存产品实体E-R图M P M图2-6产品之间实体E-R 图图2-7 管理员权限实体E-R 图出库 入库供应 产品 客户3.数据库整体逻辑结构设计(1)下面是将各个实体和联系转化为相应的二维表即关系模式,指定各个关系的主关键字和外部关键字,并对各个关系的约束加以限定:表12)仓库信息表(storehouse):3)产品信息表(product):4)出库操作信息表(takeout):5)仓库产品信息表(proinstore)6)操作员信息表(CZYB)7)权限表(JKJLB):8)入库操作信息表(storein)peonum int9)类目信息表(protype)字段名称数据类型主关键字外部关键字参考表取值说明typeid int yestypename Vachar(50)upperid Int(2)以下为表的关系图,如图1所示。
图1 表的关系图4.数据库的实现4.1建立数据库和表建立客户信息表clientcreate tabl e client( clientid int primary key,clientname varchar(50) not null,contact varchar(30),addres varchar(50),postcode varchar(10),phone varchar(30),fax varchar(30),describe varchar(100),)建立仓库信息表storehouseCreate table storehouse(storied int primary key,storename varchar(50) not null,sescribe varchar(100))建立产品信息表productCreate table product(proid int primary key,proname varchar(50) not null,typeid int not null,prostyle varchar(50),prounit varchar(10),proprice decimal(15,2),prolow int,prohigh int,valid int,alarmdays int,foreign key(typeid) references protype (typeid))建立出库操作信息表takeoutcreate table takeout(takeoutid int primary key,takeouttype varchar(20),proid int not null,proprice decimal(15,2),pronum int,clientid int not null,storeid int not null,empname varchar(50),optdate char(20),foreign key(clientid) references client (clientid), foreign key(proid) references product (proid), foreign key(storeid) references storehouse (storeid)) 建立仓库产品信息表proinstoreCreate table proinstore(storeproid int primary key,proid int not null,proprice decimal(15,2),pronum int,clientid int not null,createdata varchar(20),storeid int not null,foreign key(clientid) references client (clientid), foreign key(proid) references product (proid), foreign key(storeid) references storehouse (storeid)) 建立操作员信息表CZYBCreate table CZYB(CZYDM char (2) primary key,CZYMC varchar(10) not null,CZYRIGHT varchar(120),CZYPWD char(6) not null,CZYZW char(10),ZTBZ char(1),STARTYXQ char(12),ENDYXQ char(12),CZYZB char(2))建立权限表JKJLBCreate table JKJLB(JH char(10) primary key,SJ char(14),XTH char(2),SPYDM char(2),RUN char(1),BZ char(1))建立入库操作信息表storeinCreate table storein(storeinid int primary key,storeintype varchar(20),proid int not null,createdate char(10),proprice decimal(15,2),clientid int not null,storeid int not null,empname varchar(50),optdate char(10),foreign key(clientid) references client (clientid), foreign key(proid) references product (proid), foreign key(storeid) references storehouse (storeid)) 建立类目信息表protypeCreate table protype(typeid int primary key,Typename varchar(50) not nullUpperid int not null),4.2建立视图新建视图添加表保存建立dbo.View_1同样建立dbo.View_24.3建立存储过程:create procedure mASselect*from clientcreate procedure m1@khbh int,@khmc varchar(50)output, @khlx tinyint output,@lxr varchar(30)output, @txdz varchar(50)output, @yzbm varchar(10)output, @lxdh varchar(30)output, @czdh varchar(30)output, @khms varchar(100)output ASselect*from clientwhere clientid=@khbh select @khmc=clientname from clientwhere clientid=@khbh select @khlx=clientyype from clientwhere clientid=@khbh select @lxr=contactfrom clientwhere clientid=@khbh select @txdz=addresfrom clientwhere clientid=@khbh select @yzbm=postcode from clientwhere clientid=@khbh select @lxdh=phonefrom clientwhere clientid=@khbh select @czdh=faxfrom clientwhere clientid=@khbh select @khms=describe from clientwhere clientid=@khbhcreate procedure m_1ASselect*from CZYBcreate procedure m_2ASselect*from JKJLBcreate procedure m_3ASselect*from productcreate procedure m_31@minjg int,@maxjg intASselect*from productwhere proprice between @minjg and @maxjgcreate procedure m_32@cpbh int,@cpmc varchar(50)output,@cpgg varchar(50)output,@jldw varchar(10)output,@ckjg decimal(15,2)outputASselect*from productwhere @cpbh=proidselect @cpmc=pronamefrom productwhere @cpbh=proidselect @cpgg=prostylefrom productwhere @cpbh=proidselect @jldw=prounitfrom productwhere @cpbh=proidselect @ckjg=propricefrom productwhere @cpbh=proidcreate procedure m_4ASselect*from proinstorecreate procedure m_5ASselect*from protypecreate procedure m_6ASselect*from storehousecreate procedure m_7ASselect*from storiencreate procedure m_8ASselect*from takeout4.4建立触发器1)在客户信息表client上创建触发器,触发器被UPDATE操作触发。