Springboot项目CRM客户关系管理系统:
系统实现了CRM客户关系系统的基本功能,主要有看板(当月参与的业务机会、当月转化情况、将要结束的业务机会等)、业务机会(初步接触中、需求分析中、协商方案中、商业谈判中的业务机会)、客户管理、联系人管理、个人日报管理、查看团队日报、主数据管理(组织架构管理)、系统管理(用户管理、角色管理、菜单管理)。
.addGroup(
layout.createSequentialGroup()
.addComponent(
jb_login)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(
jb_cancle)))))
.addContainerGap(79, Short.MAX_VALUE)));
layout.setVerticalGroup(layout
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
.addComponent(jScrollPane1,
javax.swing.GroupLayout.PREFERRED_SIZE,
193,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jb_end)
.addComponent(jb_nextpage)
.addComponent(jb_previouspage)
.addComponent(jb_start)
.addComponent(jLabel9)
.addComponent(jb_info))
.addGap(24, 24, 24)));
pack();
}// </editor-fold>
//GEN-END:initComponents
private void jb_infoActionPerformed(java.awt.event.ActionEvent evt) {
JOptionPane.showMessageDialog(this, "暂不提供查看明细\n系统功能开发中");
}
private void jb_endActionPerformed(java.awt.event.ActionEvent evt) {
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JButton jb_end;
private javax.swing.JButton jb_info;
private javax.swing.JButton jb_nextpage;
private javax.swing.JButton jb_previouspage;
private javax.swing.JButton jb_start;
private javax.swing.JTable jtb_order;
private javax.swing.JTextField jtf_cusid;
private javax.swing.JTextField jtf_cusname;
// End of variables declaration//GEN-END:variables
}
登录控制层:
public class LoginFrm extends javax.swing.JFrame {
/**
* 皮肤
*/
static {
try {
// LookAndFeel lf = new SubstanceAutumnLookAndFeel();
// LookAndFeel lf = new SubstanceChallengerDeepLookAndFeel();
jl_checkImage = new javax.swing.JLabel();
jb_login = new javax.swing.JButton();
jb_cancle = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("\u7528\u6237\u767b\u5f55");
jLabel1.setFont(new java.awt.Font("宋体", 0, 24));
jLabel1.setText("\u5ba2\u6237\u5173\u7cfb\u7ba1\u7406\u7cfb\u7edf");
jLabel2.setText("\u7528\u6237\u540d\uff1a");
jLabel3.setText("\u5bc6 \u7801\uff1a");
jLabel4.setText("\u9a8c\u8bc1\u7801\uff1a");
jb_login.setText("\u767b\u5f55");
jb_login.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_loginActionPerformed(evt);
.addGap(34, 34, 34)
.addComponent(jLabel1)
.addGap(53, 53, 53)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(
jtf_username,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2)
.addComponent(
jtf_cusname,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1,
javax.swing.GroupLayout.PREFERRED_SIZE,
193,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
false)
.addGroup(
javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addComponent(
jLabel9,
javax.swing.GroupLayout.PREFERRED_SIZE,
162,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
jb_info)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(
jb_start)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(
.addComponent(
jcb_role,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(98, 98, 98)));
pack();
}// </editor-fold>
//GEN-END:initComponents
private void jtb_userMouseClicked(java.awt.event.MouseEvent evt) {
DefaultTableModel tableModel = (DefaultTableModel) jtb_user.getModel();
int selectRows = jtb_user.getSelectedRows().length;// 取得用户所选行的行数
int selectedRowIndex = jtb_user.getSelectedRow(); // 取得用户所选单行
if (selectRows == 1) {
String id = tableModel.getValueAt(selectedRowIndex, 0).toString();
User user = UserEbiFactory.getUserEbi().search(id);
this.jtf_username.setText(user.getusername());
this.jtf_password.setText(user.getpassword());
// Role[] role = (Role[]) this.jcb_role.getSelectedObjects();
// for (Role r: role) {
// if (r.getId()==user.getid()) {
// this.jcb_role.setSelectedItem(r);
// }
jtb_user = new javax.swing.JTable();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jtf_username = new javax.swing.JTextField();
jtf_password = new javax.swing.JTextField();
jcb_role = new javax.swing.JComboBox();
jb_modify = new javax.swing.JButton();
jb_del = new javax.swing.JButton();
jb_end = new javax.swing.JButton();
jb_nextpage = new javax.swing.JButton();
jb_previouspage = new javax.swing.JButton();
jb_start = new javax.swing.JButton();
jb_add = new javax.swing.JButton();
jLabel4 = new javax.swing.JLabel();
setClosable(true);
setIconifiable(true);
setTitle("\u7528\u6237\u7ba1\u7406");
jtb_user.setModel(new javax.swing.table.DefaultTableModel(
new Object[][] {
}, new String[] { "编号", "用户名", "角色" }) {
boolean[] canEdit = new boolean[] { false, false, false };
}
}
public void setUser(User user) {
this.user = user;
}
/**
* 填充验证码图片
*/
private void fillImageCode() {
// this.jl_checkImage.setIcon(new ImageIcon("images/check.png"));
// this.repaint();
// jl_checkImage.setIcon(new ImageIcon(ImageIO.read(new
return canEdit[columnIndex];
}
});
jtb_user.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jtb_userMouseClicked(evt);
}
});
jScrollPane1.setViewportView(jtb_user);
jLabel1.setText("\u7528\u6237\u540d\uff1a");
jLabel2.setText("\u5bc6 \u7801\uff1a");
jLabel3.setText("\u89d2 \u8272\uff1a");
jcb_role.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
"Item 1", "Item 2", "Item 3", "Item 4" }));
jb_modify.setText("\u4fee\u6539");
jb_modify.addActionListener(new java.awt.event.ActionListener() {
}
登录控制层:
public class LoginFrm extends javax.swing.JFrame {
/**
* 皮肤
*/
static {
try {
// LookAndFeel lf = new SubstanceAutumnLookAndFeel();
// LookAndFeel lf = new SubstanceChallengerDeepLookAndFeel();
// LookAndFeel lf = new Plastic3DLookAndFeel();
// LookAndFeel lf = new PlasticLookAndFeel();
LookAndFeel lf = new PlasticXPLookAndFeel();
// this.jcb_role.setSelectedItem(r);
// }
// }
for (int i = 0; i < this.jcb_role.getItemCount(); i++) {
Role role = (Role) this.jcb_role.getItemAt(i);
if (role.getId() == user.getroleid()) {
this.jcb_role.setSelectedIndex(i);
}
}
}
}
private void jb_endActionPerformed(java.awt.event.ActionEvent evt) {
QueryInfo info = new QueryInfo();
jtf_cusid = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
jtf_cusname = new javax.swing.JTextField();
jScrollPane1 = new javax.swing.JScrollPane();
jtb_order = new javax.swing.JTable();
jb_start = new javax.swing.JButton();
jb_end = new javax.swing.JButton();
jb_previouspage = new javax.swing.JButton();
jb_nextpage = new javax.swing.JButton();
jLabel9 = new javax.swing.JLabel();
jb_info = new javax.swing.JButton();
setClosable(true);
setIconifiable(true);
setTitle("\u5386\u53f2\u8ba2\u5355");
jLabel1.setText("\u5ba2\u6237\u7f16\u53f7\uff1a");
jtf_cusid.setEditable(false);
jLabel2.setText("\u5ba2\u6237\u540d\u79f0\uff1a");
jtf_cusname.setEditable(false);
jtb_order.setModel(new javax.swing.table.DefaultTableModel(
new Object[][] {
}, new String[] { "订单编号", "日期", "送货地址", "状态" }) {
boolean[] canEdit = new boolean[] { false, false, false, false };
public boolean isCellEditable(int rowIndex, int columnIndex) {
initComponents();
this.setLocation(330, 80);
initData();
}
private void initData() {
this.jtf_cusid.setText(id);
this.jtf_cusname.setText(name);
QueryInfo info = new QueryInfo();
info.setPagesize(PAGESIZE);
fillTable(info, id);
}
@SuppressWarnings({ "unchecked", "rawtypes" })
jScrollPane1 = new javax.swing.JScrollPane();
jtb_order = new javax.swing.JTable();
jb_start = new javax.swing.JButton();
jb_end = new javax.swing.JButton();
jb_previouspage = new javax.swing.JButton();
jb_nextpage = new javax.swing.JButton();
jLabel9 = new javax.swing.JLabel();
jb_info = new javax.swing.JButton();
setClosable(true);
setIconifiable(true);
this.fillTable(info);
}
private void fillRole() {
DefaultComboBoxModel dcm = (DefaultComboBoxModel) this.jcb_role
.getModel();
dcm.removeAllElements();
List<Role> list = RoleEbiFactory.getRoleEbo().getRole();
for (Role role : list) {
dcm.addElement(role);
}
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
//GEN-BEGIN:initComponents
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
jtb_user = new javax.swing.JTable();
.addComponent(
jtf_check,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jl_checkImage))
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED,
38, Short.MAX_VALUE)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jb_login)
.addComponent(jb_cancle))
.addContainerGap()));
pack();
}// </editor-fold>
// GEN-END:initComponents
private void jb_cancleActionPerformed(java.awt.event.ActionEvent evt) {
int i = JOptionPane.showConfirmDialog(this, "确定退出系统?", "确认信息",
fillTable(info, id);
}
@SuppressWarnings({ "unchecked", "rawtypes" })
private void fillTable(QueryInfo info, String id) {
DefaultTableModel dtm = (DefaultTableModel) this.jtb_order.getModel();
dtm.setRowCount(0);
bean = CustomerEbiFactory.getCustomerEbi().searchOrder(id, info);
List<CusOrder> list = bean.getList();
for (CusOrder cusOrder : list) {
Vector v = new Vector();
v.add(cusOrder.getOrderid());
v.add(cusOrder.getOrder_date());
v.add(cusOrder.getOrder_address());
v.add(cusOrder.getOr_state());
dtm.addRow(v);
}
this.jLabel9.setText("共" + bean.getTotalrecord() + "条记录-共"
+ bean.getTotalpage() + "页-当前第" + bean.getCurrentpage() + "页");
}
//GEN-BEGIN:initComponents
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jtf_cusid = new javax.swing.JTextField();
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit[columnIndex];
}
});
jScrollPane1.setViewportView(jtb_order);
jb_start.setText("\u9996\u9875");
jb_start.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_startActionPerformed(evt);
}
});
jb_end.setText("\u672b\u9875");
jb_end.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_endActionPerformed(evt);
}
});
jb_add.setText("\u65b0\u5efa");
jb_add.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jb_addActionPerformed(evt);
}
});
jLabel4.setText("jLabel4");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
getContentPane());
jtf_cusid,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2)
.addComponent(
jtf_cusname,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1,
javax.swing.GroupLayout.PREFERRED_SIZE,
+ bean.getTotalpage() + "页-当前第" + bean.getCurrentpage() + "页");
}
//GEN-BEGIN:variables
// Variables declaration - do not modify
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JButton jb_add;
private javax.swing.JButton jb_del;
private javax.swing.JButton jb_end;
private javax.swing.JButton jb_modify;
private javax.swing.JButton jb_nextpage;
private javax.swing.JButton jb_previouspage;
private javax.swing.JButton jb_start;
private javax.swing.JComboBox jcb_role;
private javax.swing.JTable jtb_user;
private javax.swing.JTextField jtf_password;
private javax.swing.JTextField jtf_username;
// End of variables declaration//GEN-END:variables
}
订单管理服务类:
public class CusOrderInterFrm extends javax.swing.JInternalFrame {
.addGap(26,
26,
26)
.addComponent(
jLabel2)
.addPreferredGap(
javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(
jtf_cusname,
javax.swing.GroupLayout.PREFERRED_SIZE,
176,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addContainerGap(36, Short.MAX_VALUE)));