ImageVerifierCode 换一换
格式:DOCX , 页数:28 ,大小:180.49KB ,
资源ID:10393521      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-10393521.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(销售管理系统的设计与实现.docx)为本站会员(b****3)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

销售管理系统的设计与实现.docx

1、销售管理系统的设计与实现1 问题描述1.1 开发环境(1)运用已学过的知识进行应用系统的开发,掌握软件设计流程。(2)通过课程设计,使用SSH技术、Java高级语言、SQL语言等开发应系统,掌握基本的编程方法。(3)通过课程设计掌握数据库的连接方法,及对数据的查询、修改、插入、删除等操作。1.2问题理解和分析 系统主要完成以下功能(1)向使用者提供商品基本的录入,删除,编辑等基本功能。(2)向使用者提供商品销售环节中的基本管理功能。(3)向使用者提供基本的查询功能。(4)提供打印功能。2 需求分析2.1 需求描述 由于销售管理系统是一个用来帮助使用者管理商品销售流程的软件。使用者通过对销售过程

2、中所涉及到的商品,订单,销售商等资料的录入,便可以轻松实现商品销售流程的管理。所以,此系统必须向使用者提供一下一些具体功能:(1)软件必须向使用者提供商品基本的录入,删除,编辑等基本功能(2)鉴于商品的不同销售方式(分为订单销售和代理商销售两种形式),软件必须向使用者提供商品销售环节中的基本管理功能,因此必须有订单分销模块和代理商分销模块。(3)软件必须向使用者提供基本的查询功。(4)由于是销售管理软件,所以系统安全性必须是要考虑的问题。因此,必须实现以下两点:A:系统操作员机制。对系统的使用者,按等级开放管理权限,这样可以在一定程度上保证数据库系统的安全性,避免数据被泄漏,非法更改等。B:销

3、售数据直接反映了一个销售单位的盈亏状况,鉴于销售数据的重要性,所以必须对这些数据加以保护,在系统崩溃时或者误操作等情况下,可以对数据进行恢复。这就需要系统提供备份功能。 (5)对于销售数据不能只存储在计算机中,而是需要导出步骤,最后以印刷品的形式出现在使用者面前,该软件设计的最终目的才能得以具体的实现。所以,打印功能是必不可少的系统功能之一。2.2 系统运行环境(1)硬件环境。本系统适用于那种Inter386以上计算机,内存容量为128M,应配备键盘、鼠标、显示器等外部设备。(2)软件环境。本系统的设计采用MyEclipse8.5编写。在Windows7环境下测试通过。3 总体设计3.1 功能

4、模块图功能模块图如图3-1所示。 图3-1 功能模块图3.2 结构设计 系统总流程图如图3-2所示。图3-2 系统流程图4 数据库设计 4.1 数据库概念结构设计E-R模型图如图4-1所示。图4-1 E-R模型图4.2 数据库逻辑结构设计表名:liyi (用户表)如表4-1所示。表4-1 用户表字段名数据类型长度是否允许空值约束usernameVarchar16Not nullPrimary keyPasswordVarchar16Not nullSafetyChar8Not null表名:Supplier(供应商表)如表4-2所示。表4-2 供应商表字段名数据类型长度是否允许空值约束Sup_

5、idChar5Not nullPrimary keySup_nameVarchar16Not nullSup_contactvarChar16Not nullSup_phonevarChar15Not Nullsup_addressVarchar40Not Null表名:Purchase (进货表)如表4-3所示。表4-3 进货表字段名数据类型长度是否允许空值约束P_idChar5Not nullPrimary keyP_nameVarchar20Not nullpriceFloatNot nullnumberintNot nullP_dateVarchar16Not nullPrimary

6、keysup_idChar5Not nullForeigner key表名:sale(销售表)如表4-4所示。表4-4 销售表字段名数据类型长度是否允许空值约束p_idChar5Not nullPrimary keypricefloatNot nullnumberintNot nulltotalfloatNot nullS_dateVarchar16Not nullPrimary key表名:Return (退货表)如表4-5所示。表4-5 退货表字段名数据类型长度是否允许空值约束p_idChar5Not nullPrimary keynumberintNot nullr_datevarcha

7、r16Not nullPrimary keyreasonvarchar50yes5 系统的详细设计与实现5.1 用户登录模块设计用户登录模块如图5-1所示。图5-1 用户登录窗口效果图本窗体的任务是通过用户输入密码判断用户是否是合法的用户.它用于管理员按照用户名和密码进行登录。以免不相关得人进入系统进行不良的操作,而对系统进行破坏,导致整个系统进行瘫痪。主要代码:public class LoginDialog extends JFrame private static final long serialVersionUID = 1L;private LoginPanel loginPanel

8、 = null;private JButton exitButton = null;private static String userStr;private MainFrame mainFrame;public LoginDialog() try UIManager.setLookAndFeel(UIManager .getSystemLookAndFeelClassName(); mainFrame = new MainFrame(); initialize(); catch (Exception e) e.printStackTrace(); private JButton getLog

9、inButton() if (loginButton = null) loginButton = new JButton(); loginButton.setBounds(new Rectangle(109, 114, 48, 20); loginButton.setIcon(new ImageIcon(getClass().getResource( /res/loginButton.jpg); loginButton.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) try us

10、erStr = userField.getText(); String passStr = new String(passwordField.getPassword(); if (!Dao.checkLogin(userStr, passStr) JOptionPane.showMessageDialog(LoginDialog.this, 用户名与密码无法登录, 登录失败, JOptionPane.ERROR_MESSAGE); return; catch (Exception e1) e1.printStackTrace(); MainFrame.setDefaultCloseOperat

11、ion(JFrame.EXIT_ON_CLOSE); mainFrame.setVisible(true); mainFrame.getCzyStateLabel().setText(userStr); setVisible(false); ); return loginButton; 5.2 销售系统主界面设计销售系统主界面如图5-2所示。图5-2 销售系统主界面窗口效果图该窗体是本系统的统筹界面。它是系统的结构匡架,便于对整个系统的观摩、管理.主要使用Label和 panl以及manu等控件实现的。Image控件使得界面得以美化。 由于每次操作不一定会用到所有的数据库,所以没有必要在每次运

12、行时生成所有的数据库别名。Session控件提供了动态生成数据库别名的方法,使通过操作选择窗体进行优选择的别名生成成为可能。主要代码:package com.lzw;import java.awt.*;import javax.swing.border.BevelBorder;import com.lzw.login.LoginDialog;public class MainFrame extends JFrame private static final long serialVersionUID = 1L;private JPanel frameContentPane = null; pr

13、ivate ToolBar getJJToolBarBar() if (toolBar = null) toolBar = new ToolBar(getFrameMenuBar(); toolBar.setCursor(new Cursor(Cursor.HAND_CURSOR); return toolBar; protected MenuBar getFrameMenuBar() if (frameMenuBar = null) frameMenuBar = new MenuBar(getDesktopPane(), getStateLabel(); return frameMenuBa

14、r; private DesktopPanel getDesktopPane() if (desktopPane = null) desktopPane = new DesktopPanel(); return desktopPane; public JLabel getStateLabel() if (stateLabel = null) stateLabel = new JLabel(); stateLabel.setText(当前没有选定窗体); return stateLabel; public MainFrame() super(); initialize(); / jve:decl

15、-index=0:visual-constraint=6,-55.3商品销售录入模块设计商品销售录入模块如图5-3所示。图5-3 销售录入窗口效果图该窗体以图形化的界面,简单直观的向使用者提供商品销售的录入功能,使用者可以快速的将销售记录录入系统,并进行保存。主要代码:package com.lzw.iframe;import java.awt.*;import java.awt.event.*;import com.lzw.*;public class XiaoShouDan extends JInternalFrame private final JTable table;public X

16、iaoShouDan() super(); setMaximizable(true); setIconifiable(true); setClosable(true); getContentPane().setLayout(new GridBagLayout(); piaoHao.setFocusable(false); setupComponet(piaoHao, 1, 0, 1, 140, true); setupComponet(new JLabel(客户:), 2, 0, 1, 0, false); kehu.setPreferredSize(new Dimension(160, 21

17、); kehu.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) doKhSelectAction(); ); setupComponet(kehu, 3, 0, 1, 1, true); sp = new JComboBox(); sp.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) TbSpinfo info = (TbSpinfo) sp.getSelected

18、Item();if (info != null & info.getId() != null) updateTable(); ); table = new JTable(); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); initTable(); tjButton.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) initPiaoHao(); stopTableCellEditing(); for (int i = 0; i ta

19、ble.getRowCount(); i+) TbSpinfo info = (TbSpinfo) table.getValueAt(i, 0); if (table.getValueAt(i, 0) = null) return; DefaultTableModel model = (DefaultTableModel) table.getModel(); model.addRow(new Vector(); ); setupComponet(tjButton, 4, 4, 1, 1, false); JButton sellButton = new JButton(销售); sellBut

20、ton.addActionListener(new ActionListener() if (ysjlStr = null | ysjlStr.isEmpty() JOptionPane.showMessageDialog(XiaoShouDan.this, 填写验收结论); return; if (table.getRowCount() = 0) JOptionPane.showMessageDialog(XiaoShouDan.this, 填加销售商品); return; TbSellMain sellMain = new TbSellMain(id, pzsStr, jeStr, ysj

21、lStr, kehuName, rkDate, czyStr, jsrStr, jsfsStr); Set set = sellMain.getTbSellDetails(); int rows = table.getRowCount(); for (int i = 0; i rows; i+) TbSpinfo spinfo = (TbSpinfo) table.getValueAt(i, 0); String djStr = (String) table.getValueAt(i, 6); String slStr = (String) table.getValueAt(i, 7); Do

22、uble dj = Double.valueOf(djStr); Integer sl = Integer.valueOf(slStr); TbSellDetail detail = new TbSellDetail(); detail.setSpid(spinfo.getId(); detail.setTbSellMain(sellMain.getSellId(); set.add(detail); boolean rs = Dao.insertSellInfo(sellMain); if (rs) JOptionPane.showMessageDialog(XiaoShouDan.this

23、, 销售完成); DefaultTableModel dftm = new DefaultTableModel(); table.setModel(dftm); initTable(); pzs.setText(0); hpzs.setText(0); hjje.setText(0); ); setupComponet(sellButton, 5, 4, 1, 1, false); addInternalFrameListener(new initTasks(); private void stopTableCellEditing() TableCellEditor cellEditor =

24、table.getCellEditor(); if (cellEditor != null) cellEditor.stopCellEditing(); 5.4商品进货录入模块设计商品进货录入模块如图5-4图5-4 商品进货录入窗口效果图该窗体以图形化的界面,简单直观的向使用者提供商品的查询功能,使用者可以通过已知商品信息迅速查询到与此种商品相关的代理商信息,同时,也可用过代理商的信息反查处其代理的商品状况。主要代码:package com.lzw.iframe;import java.awt.*;import java.awt.event.*;import java.beans.Proper

25、tyChangeListener;import java.sql.*;import java.util.*; private JComboBox gysComboBox = null; private JComboBox jsrComboBox = null; private Date jhsjDate = new Date(); private JTextField getCzyField() if (czyField = null) czyField = new JTextField(); czyField.setEditable(false); czyField.setText(Main

26、Frame.getCzyStateLabel().getText(); return czyField; private JButton getRukuButton() if (rukuButton = null) rukuButton = new JButton(); rukuButton.setText(入库); rukuButton.addActionListener(new java.awt.event.ActionListener() public void actionPerformed(java.awt.event.ActionEvent e) TbRukuMain ruMain

27、 = new TbRukuMain(id, pzsStr, jeStr, ysjlStr, gysName, rkDate, czyStr, jsrStr, jsfsStr); Set set = ruMain.getTabRukuDetails(); int rows = table.getRowCount(); for (int i = 0; i rows; i+) TbSpinfo spinfo = (TbSpinfo) table.getValueAt(i, 0); if (spinfo = null | spinfo.getId() = null | spinfo.getId().i

28、sEmpty()continue; String djStr = (String) table.getValueAt(i, 6); String slStr = (String) table.getValueAt(i, 7); Double dj = Double.valueOf(djStr); Integer sl = Integer.valueOf(slStr); TbRukuDetail detail = new TbRukuDetail(); detail.setTabSpinfo(spinfo.getId(); detail.setTabRukuMain(ruMain.getRkId(); detail.setDj(dj);

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2