• 首页
  • 栏目
  • CRM
  • Java项目:CRM客户关系管理系统(java+Springboot+maven+mysql)

Java项目:CRM客户关系管理系统(java+Springboot+maven+mysql)

  • 2021-12-29
  • Admin

源码获取:博客首页 "资源" 里下载!

Springboot项目CRM客户关系管理系统:

系统实现了CRM客户关系系统的基本功能,主要有看板(当月参与的业务机会、当月转化情况、将要结束的业务机会等)、业务机会(初步接触中、需求分析中、协商方案中、商业谈判中的业务机会)、客户管理、联系人管理、个人日报管理、查看团队日报、主数据管理(组织架构管理)、系统管理(用户管理、角色管理、菜单管理)。

 

 

 

 

 

 

登录控制层:

  1. public class LoginFrm extends javax.swing.JFrame {
  2. /**
  3. * 皮肤
  4. */
  5. static {
  6. try {
  7. // LookAndFeel lf = new SubstanceAutumnLookAndFeel();
  8. // LookAndFeel lf = new SubstanceChallengerDeepLookAndFeel();
  9. // LookAndFeel lf = new Plastic3DLookAndFeel();
  10. // LookAndFeel lf = new PlasticLookAndFeel();
  11. LookAndFeel lf = new PlasticXPLookAndFeel();
  12. UIManager.setLookAndFeel(lf);
  13. } catch (UnsupportedLookAndFeelException e) {
  14. e.printStackTrace();
  15. }
  16. }
  17. /**
  18. * 版本序列号
  19. */
  20. private static final long serialVersionUID = -2989784724450522952L;
  21. // 验证码的String类型
  22. private String imageCode;
  23. private User user;
  24. /** Creates new form LoginFrm */
  25. public LoginFrm(User user) {
  26. this.user = user;
  27. initComponents();
  28. this.setLocationRelativeTo(null);
  29. fillImageCode();
  30. if (user != null) {
  31. this.jtf_username.setText(this.user.getusername());
  32. this.jpw_password.setText(this.user.getpassword());
  33. }
  34. }
  35. public void setUser(User user) {
  36. this.user = user;
  37. }
  38. /**
  39. * 填充验证码图片
  40. */
  41. private void fillImageCode() {
  42. // this.jl_checkImage.setIcon(new ImageIcon("images/check.jpeg"));
  43. // this.repaint();
  44. // jl_checkImage.setIcon(new ImageIcon(ImageIO.read(new
  45. // File("images/check.jpeg"))));
  46. ImageCodeUtil imageCodeUtil = ImageCodeUtil.getImageCodeUtil();
  47. jl_checkImage.setIcon(new ImageIcon(imageCodeUtil.getBufferedImage()));
  48. imageCode =imageCodeUtil.sRand;
  49. }
  50. // GEN-BEGIN:initComponents
  51. //
  52. private void initComponents() {
  53. jLabel1 = new javax.swing.JLabel();
  54. jLabel2 = new javax.swing.JLabel();
  55. jLabel3 = new javax.swing.JLabel();
  56. jtf_username = new javax.swing.JTextField();
  57. jpw_password = new javax.swing.JPasswordField();
  58. jLabel4 = new javax.swing.JLabel();
  59. jtf_check = new javax.swing.JTextField();
  60. jl_checkImage = new javax.swing.JLabel();
  61. jb_login = new javax.swing.JButton();
  62. jb_cancle = new javax.swing.JButton();
  63. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  64. setTitle("\u7528\u6237\u767b\u5f55");
  65. jLabel1.setFont(new java.awt.Font("宋体", 0, 24));
  66. jLabel1.setText("\u5ba2\u6237\u5173\u7cfb\u7ba1\u7406\u7cfb\u7edf");
  67. jLabel2.setText("\u7528\u6237\u540d\uff1a");
  68. jLabel3.setText("\u5bc6 \u7801\uff1a");
  69. jLabel4.setText("\u9a8c\u8bc1\u7801\uff1a");
  70. jb_login.setText("\u767b\u5f55");
  71. jb_login.addActionListener(new java.awt.event.ActionListener() {
  72. public void actionPerformed(java.awt.event.ActionEvent evt) {
  73. jb_loginActionPerformed(evt);
  74. }
  75. });
  76. jb_cancle.setText("\u53d6\u6d88");
  77. jb_cancle.addActionListener(new java.awt.event.ActionListener() {
  78. public void actionPerformed(java.awt.event.ActionEvent evt) {
  79. jb_cancleActionPerformed(evt);
  80. }
  81. });
  82. javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
  83. getContentPane());
  84. getContentPane().setLayout(layout);
  85. layout.setHorizontalGroup(layout
  86. .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  87. .addGroup(
  88. layout.createSequentialGroup()
  89. .addGroup(
  90. layout.createParallelGroup(
  91. javax.swing.GroupLayout.Alignment.LEADING)
  92. .addGroup(
  93. layout.createSequentialGroup()
  94. .addGap(108,
  95. 108,
  96. 108)
  97. .addComponent(
  98. jLabel1))
  99. .addGroup(
  100. layout.createSequentialGroup()
  101. .addGap(78, 78,
  102. 78)
  103. .addGroup(
  104. layout.createParallelGroup(
  105. javax.swing.GroupLayout.Alignment.LEADING,
  106. false)
  107. .addGroup(
  108. layout.createSequentialGroup()
  109. .addGroup(
  110. layout.createParallelGroup(
  111. javax.swing.GroupLayout.Alignment.TRAILING)
  112. .addComponent(
  113. jLabel2)
  114. .addComponent(
  115. jLabel3)
  116. .addComponent(
  117. jLabel4))
  118. .addPreferredGap(
  119. javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  120. .addGroup(
  121. layout.createParallelGroup(
  122. javax.swing.GroupLayout.Alignment.TRAILING,
  123. false)
  124. .addGroup(
  125. javax.swing.GroupLayout.Alignment.LEADING,
  126. layout.createSequentialGroup()
  127. .addComponent(
  128. jtf_check,
  129. javax.swing.GroupLayout.PREFERRED_SIZE,
  130. 71,
  131. javax.swing.GroupLayout.PREFERRED_SIZE)
  132. .addPreferredGap(
  133. javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  134. .addComponent(
  135. jl_checkImage))
  136. .addComponent(
  137. jpw_password,
  138. javax.swing.GroupLayout.Alignment.LEADING,
  139. javax.swing.GroupLayout.DEFAULT_SIZE,
  140. 157,
  141. Short.MAX_VALUE)
  142. .addComponent(
  143. jtf_username,
  144. javax.swing.GroupLayout.Alignment.LEADING)))
  145. .addGroup(
  146. layout.createSequentialGroup()
  147. .addComponent(
  148. jb_login)
  149. .addPreferredGap(
  150. javax.swing.LayoutStyle.ComponentPlacement.RELATED,
  151. javax.swing.GroupLayout.DEFAULT_SIZE,
  152. Short.MAX_VALUE)
  153. .addComponent(
  154. jb_cancle)))))
  155. .addContainerGap(79, Short.MAX_VALUE)));
  156. layout.setVerticalGroup(layout
  157. .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  158. .addGroup(
  159. layout.createSequentialGroup()
  160. .addGap(34, 34, 34)
  161. .addComponent(jLabel1)
  162. .addGap(53, 53, 53)
  163. .addGroup(
  164. layout.createParallelGroup(
  165. javax.swing.GroupLayout.Alignment.BASELINE)
  166. .addComponent(jLabel2)
  167. .addComponent(
  168. jtf_username,
  169. javax.swing.GroupLayout.PREFERRED_SIZE,
  170. javax.swing.GroupLayout.DEFAULT_SIZE,
  171. javax.swing.GroupLayout.PREFERRED_SIZE))
  172. .addGap(18, 18, 18)
  173. .addGroup(
  174. layout.createParallelGroup(
  175. javax.swing.GroupLayout.Alignment.BASELINE)
  176. .addComponent(jLabel3)
  177. .addComponent(
  178. jpw_password,
  179. javax.swing.GroupLayout.PREFERRED_SIZE,
  180. javax.swing.GroupLayout.DEFAULT_SIZE,
  181. javax.swing.GroupLayout.PREFERRED_SIZE))
  182. .addGap(28, 28, 28)
  183. .addGroup(
  184. layout.createParallelGroup(
  185. javax.swing.GroupLayout.Alignment.BASELINE)
  186. .addComponent(jLabel4)
  187. .addComponent(
  188. jtf_check,
  189. javax.swing.GroupLayout.PREFERRED_SIZE,
  190. javax.swing.GroupLayout.DEFAULT_SIZE,
  191. javax.swing.GroupLayout.PREFERRED_SIZE)
  192. .addComponent(jl_checkImage))
  193. .addPreferredGap(
  194. javax.swing.LayoutStyle.ComponentPlacement.RELATED,
  195. 38, Short.MAX_VALUE)
  196. .addGroup(
  197. layout.createParallelGroup(
  198. javax.swing.GroupLayout.Alignment.BASELINE)
  199. .addComponent(jb_login)
  200. .addComponent(jb_cancle))
  201. .addContainerGap()));
  202. pack();
  203. }//
  204. // GEN-END:initComponents
  205. private void jb_cancleActionPerformed(java.awt.event.ActionEvent evt) {
  206. int i = JOptionPane.showConfirmDialog(this, "确定退出系统?", "确认信息",
  207. JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
  208. if (i == 0) {
  209. this.dispose();
  210. }
  211. }
  212. private void jb_loginActionPerformed(java.awt.event.ActionEvent evt) {
  213. String userName = this.jtf_username.getText();
  214. String password = new String(this.jpw_password.getPassword());
  215. String checkCode = this.jtf_check.getText();
  216. if (StringUtil.isEmpty(userName)) {
  217. JOptionPane.showMessageDialog(this, "用户名不能为空!");
  218. return;
  219. }
  220. if (StringUtil.isEmpty(password)) {
  221. JOptionPane.showMessageDialog(this, "密码不能为空");
  222. return;
  223. }
  224. if (!checkCode.equals(imageCode)) {
  225. JOptionPane.showMessageDialog(this, "验证码错误");
  226. // this.fillImageCode();
  227. // this.jl_checkImage.updateUI();
  228. // this.pack();
  229. return;
  230. }
  231. User user = new User(userName, password);
  232. UserEbi userEbi = UserEbiFactory.getUserEbi();
  233. User currentUser = userEbi.login(user);
  234. if (currentUser == null) {
  235. JOptionPane.showMessageDialog(this, "用户名或密码错误!");
  236. return;
  237. }
  238. // System.out.println("登录成功");
  239. this.dispose();
  240. new MainFrm(currentUser).setVisible(true);
  241. }
  242. /**
  243. * @param args
  244. * the command line arguments
  245. 原文:https://blog.csdn.net/yuyecsdn/article/details/122212759

联系站长

QQ:769220720

Copyright © SibooSoft All right reserved 津ICP备19011444号