程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长


+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

Java+Springboot+H-ui实现营销管理系统

发布于2021-05-29 23:02     阅读(468)     评论(0)     点赞(15)     收藏(0)


一、系统介绍

1.软件环境

IDEA:2018.2
Java:jdk1.8
Mysql:8.0.13
Tomcat:8.5.23

2.功能模块图

在这里插入图片描述

3.系统功能

系统设计的目标是开发一个能够实现线上营销管理的系统,实现线索、商机信息记录等功能。系统主要包含五个功能模块:线索信息管理模块、客户信息管理模块、联系人信息管理模块、商机信息管理模块、员工信息管理模块。各模块具体功能如下:
1.线索信息管理模块
销售人员登录系统后,将自己找到的线索信息录入到系统中,或查看系统中已有线索,对某些线索进行信息更新。
2.客户信息管理模块
销售人员登录系统后,将已经与公司产生交易的客户信息录入到系统中,或将已经达成交易的线索转化为客户,对某些已有客户信息进行更新。
3.联系人信息管理模块
销售人员登录系统后,录入系统中已存在客户的联系人的信息,方便以后进行客户的回访和关系维护。
4.商机信息管理模块
当之前的线索成交并转化为客户后,销售人员需要将已成交信息作为商机录入到系统中,供公司日后查看和分析。
5.员工信息管理模块
管理员在系统中为公司新入职销售人员添加账号,并维护其部门信息等基本信息,同时将已离职员工账号禁用。为更换手机号员工重置登录账号,为忘记密码员工重置密码。

4.数据库表

1.客户表
在这里插入图片描述

2.联系人表
在这里插入图片描述

3.商机表
在这里插入图片描述

4.线索表
在这里插入图片描述

5.用户表
在这里插入图片描述

5.工程截图

在这里插入图片描述

二、系统展示

1.系统登录

在这里插入图片描述

2.系统主页

在这里插入图片描述

3.新增用户

在这里插入图片描述

4.查询用户

在这里插入图片描述

5.更新用户

在这里插入图片描述

6.新增客户

在这里插入图片描述

7.查询客户

在这里插入图片描述

8.更新客户

在这里插入图片描述

9.新增联系人

在这里插入图片描述

10.查询联系人

在这里插入图片描述

11.更新联系人

在这里插入图片描述

12.系统主页

在这里插入图片描述

13.系统主页

在这里插入图片描述

14.系统主页

在这里插入图片描述

15.系统主页

在这里插入图片描述

16.系统主页

在这里插入图片描述

17.系统主页

在这里插入图片描述

三、代码实现

BusinessController

package com.example.cra.controller;

import com.example.cra.entity.Business;
import com.example.cra.entity.Contact;
import com.example.cra.service.BusinessService;
import com.example.cra.service.ContactService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/business")
public class BusinessController {

    @Autowired
    private BusinessService businessService;

    @RequestMapping(value = "/addbusiness" , method = RequestMethod.POST)
    public Map<String,Object> addBusiness(@RequestBody Business business) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = businessService.addBusiness(business);
        map.put("msg", result);
        return  map;
    }

    @RequestMapping(value = "/businessList" , method = RequestMethod.GET)
    public Map<String,Object> businessList() {
        Map<String, Object> map = new HashMap<String, Object>();
        List<Business> business = businessService.businessList();
        map.put("business",business);
        return map;
    }
    @RequestMapping(value = "/delbusiness" , method = RequestMethod.GET)
    public Map<String,Object> delBusinesss(@RequestParam("business_id")  String business_id) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = businessService.delBusiness(Integer.parseInt(business_id));
        map.put("msg",result);
        return map;
    }

    @RequestMapping(value = "/querybusiness" , method = RequestMethod.POST)
    public Map<String,Object> queryBusinesss(@RequestParam("business_name") String business_name,
                                            @RequestParam("business_state") String business_state,
                                            @RequestParam("person") String person) {
        Map<String, Object> map = new HashMap<String, Object>();
        List<Business> business = businessService.queryBusiness(business_name,business_state,person);
        map.put("business",business);
        return map;
    }

    @RequestMapping(value = "/selectbusiness" , method = RequestMethod.POST)
    public Map<String,Object> selectBusiness(@RequestParam("business_id") String business_id) {
        Map<String, Object> map = new HashMap<String, Object>();
        Business business = businessService.selectBusiness(Integer.parseInt(business_id));
        map.put("business",business);
        return map;
    }
    @RequestMapping(value = "/updatebusiness" , method = RequestMethod.POST)
    public Map<String,Object> updateBusiness(@RequestBody Business business) {
        Map<String, Object> map = new HashMap<String, Object>();
        boolean result = businessService.updateBusiness(business);
        map.put("success",result);
        return map;
    }

}

ClueController

package com.example.cra.controller;

import com.example.cra.entity.Clue;
import com.example.cra.service.ClueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/clue")
public class ClueController {

    @Autowired
    private ClueService clueService;

    @RequestMapping(value = "/addclue" , method = RequestMethod.POST)
    public Map<String,Object> addClue(@RequestBody Clue clue) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = clueService.addClue(clue);
        map.put("msg", result);
        return  map;
    }

    @RequestMapping(value = "/clueList" , method = RequestMethod.GET)
    public Map<String,Object> clueList() {
        Map<String, Object> map = new HashMap<String, Object>();
        List<Clue> clue = clueService.clueList();
        map.put("clue",clue);
        return map;
    }
    @RequestMapping(value = "/delclue" , method = RequestMethod.GET)
    public Map<String,Object> delClues(@RequestParam("clue_id")  String clue_id) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = clueService.delClue(Integer.parseInt(clue_id));
        map.put("msg",result);
        return map;
    }

    @RequestMapping(value = "/queryclue" , method = RequestMethod.POST)
    public Map<String,Object> queryClues(@RequestParam("clue_name") String clue_name,
                                            @RequestParam("person") String person) {
        Map<String, Object> map = new HashMap<String, Object>();
        List<Clue> clue = clueService.queryClue(clue_name,person);
        map.put("clue",clue);
        return map;
    }

    @RequestMapping(value = "/selectclue" , method = RequestMethod.POST)
    public Map<String,Object> selectClue(@RequestParam("clue_id") String clue_id) {
        Map<String, Object> map = new HashMap<String, Object>();
        Clue clue = clueService.selectClue(Integer.parseInt(clue_id));
        map.put("clue",clue);
        return map;
    }
    @RequestMapping(value = "/updateclue" , method = RequestMethod.POST)
    public Map<String,Object> updateClue(@RequestBody Clue clue) {
        Map<String, Object> map = new HashMap<String, Object>();
        boolean result = clueService.updateClue(clue);
        map.put("success",result);
        return map;
    }

}

ContactController

package com.example.cra.controller;

import com.example.cra.entity.Contact;
import com.example.cra.service.ContactService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/contacts")
public class ContactController {

    @Autowired
    private ContactService contactService;

    @RequestMapping(value = "/addcontacts" , method = RequestMethod.POST)
    public Map<String,Object> addContact(@RequestBody Contact contact) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = contactService.addContact(contact);
        map.put("msg", result);
        return  map;
    }

    @RequestMapping(value = "/contactsList" , method = RequestMethod.GET)
    public Map<String,Object> contactList() {
        Map<String, Object> map = new HashMap<String, Object>();
        List<Contact> contact = contactService.contactList();
        map.put("contact",contact);
        return map;
    }
    @RequestMapping(value = "/delcontacts" , method = RequestMethod.GET)
    public Map<String,Object> delContacts(@RequestParam("cont_id")  String contacts_id) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = contactService.delContact(Integer.parseInt(contacts_id));
        map.put("msg",result);
        return map;
    }

    @RequestMapping(value = "/querycontacts" , method = RequestMethod.POST)
    public Map<String,Object> queryContacts(@RequestParam("customer_name") String customer_name,
                                            @RequestParam("telephone") String telephone,
                                            @RequestParam("contacts_name") String contacts_name) {
        Map<String, Object> map = new HashMap<String, Object>();
        List<Contact> contact = contactService.queryContact(customer_name,telephone,contacts_name);
        map.put("contact",contact);
        return map;
    }

    @RequestMapping(value = "/selectcontacts" , method = RequestMethod.POST)
    public Map<String,Object> selectContact(@RequestParam("cont_id") String contacts_id) {
        Map<String, Object> map = new HashMap<String, Object>();
        Contact contact = contactService.selectContact(Integer.parseInt(contacts_id));
        map.put("contact",contact);
        return map;
    }
    @RequestMapping(value = "/updatecontacts" , method = RequestMethod.POST)
    public Map<String,Object> updateContact(@RequestBody Contact contact) {
        Map<String, Object> map = new HashMap<String, Object>();
        boolean result = contactService.updateContact(contact);
        map.put("success",result);
        return map;
    }
}

CustomerController

package com.example.cra.controller;

import com.example.cra.entity.Customer;
import com.example.cra.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


@RestController
@RequestMapping("/customers")
public class CustomerController {

    @Autowired
    private CustomerService customerService;


    @RequestMapping(value = "/listCustomers" , method = RequestMethod.GET)
    public Map<String,Object> listCustomers() {
        Map<String, Object> map = new HashMap<String, Object>();
        List<Customer> customers = customerService.getAllCustomers();
        map.put("customers", customers);
        return  map;
    }


    @RequestMapping(value = "/querycustomers" , method = RequestMethod.POST)
    public Map<String,Object> queryCustomer(@RequestParam("customer_name") String customer_name,
                                             @RequestParam("person") String person,
                                             @RequestParam("customer_state") String customer_state) {
        Map<String, Object> map = new HashMap<String, Object>();
        List<Customer> customer = customerService.queryCustomer(customer_name,person,customer_state);
        map.put("customer", customer);
        return  map;
    }

    @RequestMapping(value = "/addcustomer" , method = RequestMethod.POST)
    public Map<String,Object> addCustomer(@RequestBody Customer customer) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = customerService.insertCustomer(customer);
        map.put("msg", result);
        return  map;
    }


    @RequestMapping(value = "/updatecustomer" , method = RequestMethod.POST)
    public Map<String,Object> updateCustomer(@RequestBody Customer customer) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = customerService.updateCustomer(customer);
        map.put("msg", result);
        return  map;
    }


    @RequestMapping(value = "/deletecustomer" , method = RequestMethod.POST)
    public Map<String,Object> deleteCustomer(@RequestParam("customer_id") Integer customer_id) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = customerService.deleteCustomer(customer_id);
        map.put("msg", result);
        return  map;
    }

    @RequestMapping(value = "/getcustomer" , method = RequestMethod.POST)
    public Map<String,Object> getCustomer(@RequestParam("customer_id") Integer customer_id) {
        Map<String, Object> map = new HashMap<String, Object>();
        Customer customer = customerService.getCustomer(customer_id);
        map.put("customer", customer);
        return  map;
    }
}

FrontendController

package com.example.cra.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/front")
public class FrontendController {

    @RequestMapping(value = "/index", method = RequestMethod.GET)
    public String login() {
        return "index";
    }

    @RequestMapping(value = "/home", method = RequestMethod.GET)
    public String index() {
        return "home";
    }

    @RequestMapping(value = "/user-add", method = RequestMethod.GET)
    public String userAdd() {
        return "user-add";
    }

    @RequestMapping(value = "/user-list", method = RequestMethod.GET)
    public String userList() {
        return "user-list";
    }

    @RequestMapping(value = "/user-update", method = RequestMethod.GET)
    public String userUpdate() {
        return "user-update";
    }

    @RequestMapping(value = "/contact-add", method = RequestMethod.GET)
    public String contactAdd() {
        return "contact-add";
    }

    @RequestMapping(value = "/contact-list", method = RequestMethod.GET)
    public String contactList() {
        return "contact-list";
    }

    @RequestMapping(value = "/contact-update", method = RequestMethod.GET)
    public String contactUpdate() {
        return "contact-update";
    }

    @RequestMapping(value = "/customer-add", method = RequestMethod.GET)
    public String customerAdd() {
        return "customer-add";
    }

    @RequestMapping(value = "/customer-list", method = RequestMethod.GET)
    public String customerList() {
        return "customer-list";
    }

    @RequestMapping(value = "/customer-update", method = RequestMethod.GET)
    public String customerUpdate() {
        return "customer-update";
    }

    @RequestMapping(value = "/clue-add", method = RequestMethod.GET)
    public String bookinfoAdd() {
        return "clue-add";
    }

    @RequestMapping(value = "/clue-list", method = RequestMethod.GET)
    public String bookinfoList() {
        return "clue-list";
    }

    @RequestMapping(value = "/clue-update", method = RequestMethod.GET)
    public String bookinfoUpdate() {
        return "clue-update";
    }



    @RequestMapping(value = "/business-add", method = RequestMethod.GET)
    public String logAdd() {
        return "business-add";
    }

    @RequestMapping(value = "/business-list", method = RequestMethod.GET)
    public String logList() {
        return "business-list";
    }

    @RequestMapping(value = "/business-update", method = RequestMethod.GET)
    public String logUpdate() {
        return "business-update";
    }



}

UserController

package com.example.cra.controller;

import com.example.cra.entity.User;
import com.example.cra.service.UserService;
import com.example.cra.util.SelectUsers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.*;

@RestController
@RequestMapping("/users")
public class UserController {

    @Autowired
    private UserService usersService;

    //登录
    @RequestMapping(value = "/login", method = RequestMethod.POST)
    public Map<String, Object> login(@RequestParam("username") String username,
                                     @RequestParam("password") String password, HttpServletRequest request) {
        Map<String, Object> map = new HashMap<String, Object>();
        User result = usersService.login(username, password);
        if (result != null) {
            request.getSession().setAttribute("username", username);
            map.put("success", true);
            map.put("msg", "登陆成功!");
        } else {
            map.put("success", false);
            map.put("msg", "登陆失败!");
        }
        return map;
    }

    //系统管理员创建用户信息,默认角色为销售
    @RequestMapping(value = "/addUsers", method = RequestMethod.POST)
    public Map<String, Object> addUsers(@RequestBody User user) throws ParseException {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = usersService.createUsers(user);
        map.put("msg", result);
        return map;
    }

    @RequestMapping(value = "/selectUsers", method = RequestMethod.POST)
    public Map<String, Object> selectUsers(@RequestParam("select_username") String username,
                                           @RequestParam("select_sex") String sex,
                                           @RequestParam("select_role") String role,
                                           @RequestParam("select_status") String select_status) throws ParseException {
        Map<String, Object> map = new HashMap<String, Object>();
        SelectUsers selectUsers = new SelectUsers();
        selectUsers.setUsername(username);
        selectUsers.setSex(sex);
        selectUsers.setSelect_role(role);
        selectUsers.setSelect_status(select_status);
        List<User> users = usersService.selectUsers(selectUsers);
        map.put("users", users);
        return map;
    }

    //修改用户角色
    @RequestMapping(value = "/editUsers", method = RequestMethod.POST)
    public Map<String, Object> editUsers(@RequestBody User user) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = usersService.updateUser(user);
        map.put("msg", result);
        return map;
    }

    //系统管理员对系统所有用户进行删除
    @RequestMapping(value = "/delUsers", method = RequestMethod.GET)
    public Map<String, Object> delUsers(@RequestParam("user_id") String user_id) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = usersService.delUsers(user_id);
        map.put("msg", result);
        return map;
    }

    //系统管理员对系统所有用户进行查看
    @RequestMapping(value = "/listUsers", method = RequestMethod.GET)
    public Map<String, Object> listUsers() {
        Map<String, Object> map = new HashMap<String, Object>();
        List<User> users = new ArrayList<User>();
        users = usersService.listUsers();
        map.put("users", users);
        return map;
    }

    //获取session
    @RequestMapping(value = "/session", method = RequestMethod.POST)
    public Map<String, Object> session(HttpServletRequest request) {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("session", request.getSession().getAttribute("username"));
        return map;
    }

    //通过用户名获取用户id
    @RequestMapping(value = "/getUserId", method = RequestMethod.GET)
    public Map<String, Integer> getUserId(@RequestParam("username") String username) {
        Map<String, Integer> map = new HashMap<String, Integer>();
        Integer user_id = usersService.findUserIdByUserName(username);
        map.put("user_id", user_id);
        System.out.println(user_id);
        return map;
    }

    //检测用户名
    @RequestMapping(value = "/checkname", method = RequestMethod.POST)
    public Map<String, Object> checkname(@RequestParam("username") String username) {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = usersService.checkname(username);
        map.put("msg", result);
        return map;
    }

    @RequestMapping(value = "/selectuser", method = RequestMethod.POST)
    public Map<String, Object> selectuser(@RequestParam("userid") String user_id) {
        Map<String, Object> map = new HashMap<String, Object>();
        User result = usersService.queryuser(Integer.parseInt(user_id));
        map.put("users", result);
        return map;
    }


    @RequestMapping(value = "/updateuser", method = RequestMethod.POST)
    public Map<String, Object> updateUser(@RequestBody User user) throws ParseException {
        Map<String, Object> map = new HashMap<String, Object>();
        String result = usersService.updateUser(user);
        map.put("success",result);
        return map;
    }
}

business-add.js

$(function () {

    //刷新页面
    $('#reload_btn').click(function(){
        $('#business_name').val('');
        $("#customer_name").val('');
        $('#contacts').val('');
        $('#amount').val('');
        $('#date').val('');
        $('#business_state').val('');
        $('#create_time').val('');
        $('#person').val('');
        $('#remark').val('');
        window.location.reload();
    });

    // 新增用户
    $('#submit_btn').click(function () {
        var business_name = $('#business_name').val();
        var customer_name = $("#customer_name").val();
        var contacts = $('#contacts').val();
        var amount = $('#amount').val();
        var date = $('#date').val();
        var business_state = $('#business_state').val();
        var create_time = $('#create_time').val();
        var person = $('#person').val();
        var remark = $('#remark').val();


        var param = {
            "business_name": business_name,
            "customer_name": customer_name,
            "contacts":contacts,
            "amount":amount,
            "date":date,
            "business_state":business_state,
            "create_time":create_time,
            "person": person,
            "remark": remark
        };

        $.ajax({
            url: "/business/addbusiness",
            async: false,
            cache: false,
            type: "post",
            dataType: 'json',
            // 格式化发送的数据
            contentType: 'application/json',
            data: JSON.stringify(param),
            success: function (data) {
                alert(data.msg);
                window.location.reload();
            }
        });
    })
});

business-list.js

$(function () {
    getBusinessList();

    // 获取所有商机信息
    function getBusinessList(e) {
        $.ajax({
            url: "/business/businessList",
            type: "get",
            dataType: "json",
            success: function (data) {
                businessList(data.business);
            }
        });
    }

    // 查询商机信息
    $("#queryBusiness").click(function () {
        var business_name = $("#query_business_name").val();
        var business_state = $("#query_business_state").val();
        var person = $("#query_bussiness_person").val();

        $.ajax({
            url: "/business/querybusiness",
            async: false,
            cache: false,
            type: "post",
            dataType: 'json',
            data: {
                "business_name": business_name,
                "business_state": business_state,
                "person": person
            },
            success: function (data) {
                businessList(data.business);
            }
        });
    });

    // 展示商机信息
    function businessList(data) {
        var html = '';
        if(data.length > 0){
            data.map(function (item) {
                html += '<tr class="text-c">'
                    + '<td>' + item.business_id + '</td>'
                    + '<td>' + item.business_name + '</a></td>'
                    + '<td>' + item.customer_name + '</td>'
                    + '<td>' + item.contacts + '</td>'
                    + '<td>' + item.amount + '</td>'
                    + '<td>' + item.date.substring(0, 10) + '</td>'
                    + '<td>' + item.business_state + '</td>'
                    + '<td>' + item.create_time.substring(0, 10) + '</td>'
                    + '<td>' + item.person + '</td>'
                    + '<td>' + item.remark + '</td>'
                    + '<td>'
                    + '<a data-id="' + item.business_id + '" id="edit">修改</a>&nbsp;&nbsp;'
                    + '<a data-id="' + item.business_id + '" id="del">删除</a>'
                    + '</td></tr>'
            })
        }
        $('#business_list').html(html);
    }

    // 监听修改商机信息
    $('body').on('click', '#edit', function (e) {
        var business_id = e.target.dataset.id;
        window.location.href = "/front/business-update?business_id=" + business_id;
    })


    // 监听删除商机信息
    $('body').on('click', '#del', function (e) {
        var del_business_id = e.target.dataset.id;
        $.ajax({
            url: "/business/delbusiness",
            async: false,
            cache: false,
            type: "get",
            dataType: 'json',
            data: {
                "business_id": del_business_id
            },
            success: function (data) {
                alert(data.msg);
                window.location.href = "/front/business-list";
            }
        });
    })
});

business-update.js

$(function () {
    var businessId = getQueryString("business_id");

    // 获取url后面参数
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) {
            return decodeURIComponent(r[2]);
        }
        return '';
    }

    getBusinessList();

    function getBusinessList() {
        $.ajax({
            url: "/business/selectbusiness",
            type: "post",
            data: {'business_id': businessId},
            dataType: "json",
            success: function (data) {
                var obj = data.business;
                $('#business_id').val(obj.business_id);
                $('#business_name').val(obj.business_name);
                $("#customer_name").val(obj.customer_name);
                $('#contacts').val(obj.contacts);
                $('#amount').val(obj.amount);
                $('#date').val(obj.date);
                $('#business_state').val(obj.business_state);
                $('#create_time').val(obj.create_time);
                $('#person').val(obj.person);
                $('#remark').val(obj.remark);
            }
        });
    }

    //返回
    $('#back_btn').click(function () {
        window.location.href = "/front/business-list";
    });

    // 新增用户
    $('#submit_btn').click(function () {
        var business_id = $('#business_id').val();
        var business_name = $('#business_name').val();
        var customer_name = $("#customer_name").val();
        var contacts = $('#contacts').val();
        var amount = $('#amount').val();
        var date = $('#date').val();
        var business_state = $('#business_state').val();
        var create_time = $('#create_time').val();
        var person = $('#person').val();
        var remark = $('#remark').val();

        var param = {
            "business_id" : business_id,
            "business_name": business_name,
            "customer_name": customer_name,
            "contacts":contacts,
            "amount":amount,
            "date":date,
            "business_state":business_state,
            "create_time":create_time,
            "person": person,
            "remark": remark
        };

        $.ajax({
            url: "/business/updatebusiness",
            async: false,
            cache: false,
            type: "post",
            dataType: 'json',
            // 格式化发送的数据
            contentType: 'application/json',
            data: JSON.stringify(param),
            success: function (data) {
                if(data.success){
                    alert("修改成功!");
                    window.location.href = "/front/business-list";
                }else {
                    alert("修改失败!");
                }
            }
        });
    })
});

business-add.html

<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
  <!--[if lt IE 9]>
  <script type="text/javascript" src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
  <script type="text/javascript" src="http://libs.useso.com/js/respond.js/1.4.2/respond.min.js"></script>
  <script type="text/javascript" src="http://cdn.bootcss.com/css3pie/2.0beta1/PIE_IE678.js"></script>
  <![endif]-->
  <link type="text/css" rel="stylesheet" href="/static/h-ui/css/H-ui.css"/>
  <link type="text/css" rel="stylesheet" href="/static/h-ui.admin/css/H-ui.admin.css"/>
  <!--<link type="text/css" rel="stylesheet" href="font/font-awesome.min.css"/>-->
  <!--[if IE 7]>
  <link href="http://www.bootcss.com/p/font-awesome/assets/css/font-awesome-ie7.min.css" rel="stylesheet"
        type="text/css"/>
  <![endif]-->
    <title>新增商机</title>
</head>
<body>
<div class="pd-20">
  <div class="Huiform">
    <table class="table table-bg">
      <tbody>
      <tr>
        <th  width="100" class="text-r">商机名称:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="business_name"></td>
      </tr>
      <tr>
        <th class="text-r">客户名称:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="customer_name"></td>
      </tr>
      <tr>
        <th class="text-r">联系人:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="contacts"></td>
      </tr>
      <tr>
        <th class="text-r">预计成交金额:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="amount" ></td>
      </tr>
      <tr>
        <th class="text-r">预计成交日期:</th>
        <td><input type="text" style="width:200px" class="input-text Wdate" value="" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',lang:'zh-cn'})"  id="date"/></td>
      </tr>
      <tr>
        <th class="text-r">商机状态:</th>
        <td>
          <select style="width:200px" class="input-text" placeholder="" id="business_state" >
            <option value="" selected>==请选择==</option>
            <option value="潜在客户">潜在客户</option>
            <option value="正式客户">正式客户</option>
            <option value="放弃客户">放弃客户</option>
            <option value="签约客户">签约客户</option>
          </select>
        </td>
      </tr>
      <tr>
        <th class="text-r">创建时间:</th>
        <td><input type="text" style="width:200px" class="input-text Wdate" value="" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',lang:'zh-cn'})"  id="create_time"/></td>
      </tr>
      <tr>
        <th class="text-r">负责人:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="person" ></td>
      </tr>
      <tr>
        <th class="text-r">备注:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="remark" ></td>
      </tr>
      <tr>
        <th></th>
        <td><button class="btn btn-success radius" type="button" id="submit_btn"><i class="icon-ok"></i> 提交</button>
          <button class="btn btn-success radius" type="reset" id="reload_btn"><i class="icon-ok"></i> 重置</button>
        </td>
      </tr>
      </tbody>
    </table>
  </div>
</div>
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="/lib/My97DatePicker/4.8/WdatePicker.js" language="JavaScript"></script>
<script type="text/javascript" src="/js/business-add.js"></script>
</body>
</html>

business-list.html

<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="/lib/html5shiv.js"></script>
    <script type="text/javascript" src="/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/static/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="/lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="/static/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/style.css"/>
    <!--[if IE 6]>
    <script type="text/javascript" src="/lib/DD_belatedPNG_0.0.8a-min.js"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>用户管理</title>
</head>
<body>
<div class="pd-20">
    <div class="text-c">
        商机名称:<input type="text" class="input-text" style="width:200px" placeholder="支持模糊查询" id="query_business_name">
        商机状态:<select id="query_business_state">
                    <option value="" selected>==请选择==</option>
                    <option value="潜在客户">潜在客户</option>
                    <option value="正式客户">正式客户</option>
                    <option value="放弃客户">放弃客户</option>
                    <option value="签约客户">签约客户</option>
                </select>
        负责人:<input type="text" class="input-text" style="width:200px" placeholder="支持模糊查询" id="query_bussiness_person">
        <button type="submit" class="btn btn-success" id="queryBusiness"> 查询</button>
    </div>
    <table class="table table-border table-bordered table-hover table-bg table-sort">
        <thead>
        <tr class="text-c">
            <th width="50">编号</th>
            <th width="50">商机名称</th>
            <th width="50">客户名称</th>
            <th width="50">联系人</th>
            <th width="50">预计成交金额</th>
            <th width="50">预计成交日期</th>
            <th width="50">商机状态</th>
            <th width="50">创建时间</th>
            <th width="50">负责人</th>
            <th width="50">备注</th>
            <th width="50">操作</th>
        </tr>
        </thead>
        <tbody id="business_list">
        </tbody>
    </table>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script>
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="/js/business-list.js"></script>
</body>
</html>

business-update.html

<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
  <!--[if lt IE 9]>
  <script type="text/javascript" src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
  <script type="text/javascript" src="http://libs.useso.com/js/respond.js/1.4.2/respond.min.js"></script>
  <script type="text/javascript" src="http://cdn.bootcss.com/css3pie/2.0beta1/PIE_IE678.js"></script>
  <![endif]-->
  <link type="text/css" rel="stylesheet" href="/static/h-ui/css/H-ui.css"/>
  <link type="text/css" rel="stylesheet" href="/static/h-ui.admin/css/H-ui.admin.css"/>
  <!--<link type="text/css" rel="stylesheet" href="font/font-awesome.min.css"/>-->
  <!--[if IE 7]>
  <link href="http://www.bootcss.com/p/font-awesome/assets/css/font-awesome-ie7.min.css" rel="stylesheet"
        type="text/css"/>
  <![endif]-->
  <title>修改商机</title>
</head>
<body>
<div class="pd-20">
  <div class="Huiform">
    <table class="table table-bg">
      <tbody>
      <input type="hidden" style="width:200px" class="input-text" value="" placeholder="" id="business_id">
      <tr>
        <th  width="100"  class="text-r">商机名称:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="business_name"></td>
      </tr>
      <tr>
        <th class="text-r">客户名称:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="customer_name"></td>
      </tr>
      <tr>
        <th class="text-r">联系人:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="contacts"></td>
      </tr>
      <tr>
        <th class="text-r">预计成交金额:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="amount" ></td>
      </tr>
      <tr>
        <th class="text-r">预计成交日期:</th>
        <td><input type="text" style="width:200px" class="input-text Wdate" value="" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',lang:'zh-cn'})"  id="date"/></td>
      </tr>
      <tr>
        <th class="text-r">商机状态:</th>
        <td>
          <select style="width:200px" class="input-text" placeholder="" id="business_state" >
            <option value="" selected>==请选择==</option>
            <option value="潜在客户">潜在客户</option>
            <option value="正式客户">正式客户</option>
            <option value="放弃客户">放弃客户</option>
            <option value="签约客户">签约客户</option>
          </select>
        </td>
      </tr>
      <tr>
        <th class="text-r">创建时间:</th>
        <td><input type="text" style="width:200px" class="input-text Wdate" value="" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',lang:'zh-cn'})"  id="create_time"/></td>
      </tr>
      <tr>
        <th class="text-r">负责人:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="person" ></td>
      </tr>
      <tr>
        <th class="text-r">备注:</th>
        <td><input type="text" style="width:200px" class="input-text" value="" placeholder="" id="remark" ></td>
      </tr>
      <tr>
        <th></th>
        <td><button class="btn btn-success radius" type="button" id="submit_btn"><i class="icon-ok"></i> 提交</button>
          <button class="btn btn-success radius" type="reset" id="back_btn"><i class="icon-ok"></i> 返回</button>
        </td>
      </tr>
      </tbody>
    </table>
  </div>
</div>
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="/lib/My97DatePicker/4.8/WdatePicker.js" language="JavaScript"></script>
<script type="text/javascript" src="/js/business-update.js"></script>
</body>
</html>

四、其他

1.其他系统实现

JavaWeb系统系列实现

Java+JSP实现图书管理系统
Java+JSP实现学生信息管理系统
Java+Servlet+JSP实现学生成绩管理系统
Java+Servlet+JSP实现宠物诊所管理系统
Java+SSM+Easyui实现网上考试系统

JavaSwing系统系列实现

Java+Swing实现医院管理系统
Java+Swing实现仓库管理系统
Java+Swing实现学生信息管理系统
Java+Swing实现学生宿舍管理系统
Java+Swing实现学生选课管理系统
Java+Swing实现电子相册管理系统
Java+Swing实现图书管理系统
Java+Swing实现斗地主游戏
Java+Swing实现宠物商店管理系统-TXT存储信息
Java+Swing实现学生成绩管理系统
Java+Swing实现企业人事管理系统
Java+Swing实现学校教材管理系统
Java+Swing实现学校教务管理系统
Java+Swing实现超市管理系统-TXT存储信息
Java+Swing实现考试管理系统

2.获取源码

请联系QQ:3079118617

3.备注

如有侵权请联系我删除。

4.鸡汤

在无尽的道路上一直走,终将有所得!

原文链接:https://blog.csdn.net/helongqiang/article/details/117305806



所属网站分类: 技术文章 > 博客

作者:我很伤感

链接:http://www.javaheidong.com/blog/article/207639/8d877d88840d3726e66c/

来源:java黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

15 0
收藏该文
已收藏

评论内容:(最多支持255个字符)