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

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

三、代码实现


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实现考试管理系统

————————————————

版权声明:本文为CSDN博主「水坚石青」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

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

相关文章
|
29天前
|
监控 Java API
如何使用Java语言快速开发一套智慧工地系统
使用Java开发智慧工地系统,采用Spring Cloud微服务架构和前后端分离设计,结合MySQL、MongoDB数据库及RESTful API,集成人脸识别、视频监控、设备与环境监测等功能模块,运用Spark/Flink处理大数据,ECharts/AntV G2实现数据可视化,确保系统安全与性能,采用敏捷开发模式,提供详尽文档与用户培训,支持云部署与容器化管理,快速构建高效、灵活的智慧工地解决方案。
|
19天前
|
Java 开发者 微服务
Spring Boot 入门:简化 Java Web 开发的强大工具
Spring Boot 是一个开源的 Java 基础框架,用于创建独立、生产级别的基于Spring框架的应用程序。它旨在简化Spring应用的初始搭建以及开发过程。
38 6
Spring Boot 入门:简化 Java Web 开发的强大工具
|
7天前
|
存储 JavaScript 前端开发
基于 SpringBoot 和 Vue 开发校园点餐订餐外卖跑腿Java源码
一个非常实用的校园外卖系统,基于 SpringBoot 和 Vue 的开发。这一系统源于黑马的外卖案例项目 经过站长的进一步改进和优化,提供了更丰富的功能和更高的可用性。 这个项目的架构设计非常有趣。虽然它采用了SpringBoot和Vue的组合,但并不是一个完全分离的项目。 前端视图通过JS的方式引入了Vue和Element UI,既能利用Vue的快速开发优势,
52 13
|
15天前
|
JavaScript 安全 Java
java版药品不良反应智能监测系统源码,采用SpringBoot、Vue、MySQL技术开发
基于B/S架构,采用Java、SpringBoot、Vue、MySQL等技术自主研发的ADR智能监测系统,适用于三甲医院,支持二次开发。该系统能自动监测全院患者药物不良反应,通过移动端和PC端实时反馈,提升用药安全。系统涵盖规则管理、监测报告、系统管理三大模块,确保精准、高效地处理ADR事件。
|
20天前
|
设计模式 消息中间件 搜索推荐
Java 设计模式——观察者模式:从优衣库不使用新疆棉事件看系统的动态响应
【11月更文挑战第17天】观察者模式是一种行为设计模式,定义了一对多的依赖关系,使多个观察者对象能直接监听并响应某一主题对象的状态变化。本文介绍了观察者模式的基本概念、商业系统中的应用实例,如优衣库事件中各相关方的动态响应,以及模式的优势和实际系统设计中的应用建议,包括事件驱动架构和消息队列的使用。
|
1月前
|
数据采集 监控 并行计算
基于MCMC的贝叶斯营销组合模型评估方法论: 系统化诊断、校准及选择的理论框架
贝叶斯营销组合建模(Bayesian Marketing Mix Modeling,MMM)作为一种先进的营销效果评估方法,其核心在于通过贝叶斯框架对营销投资的影响进行量化分析。
55 3
基于MCMC的贝叶斯营销组合模型评估方法论: 系统化诊断、校准及选择的理论框架
|
1月前
|
运维 自然语言处理 供应链
Java云HIS医院管理系统源码 病案管理、医保业务、门诊、住院、电子病历编辑器
通过门诊的申请,或者直接住院登记,通过”护士工作站“分配患者,完成后,进入医生患者列表,医生对应开具”长期医嘱“和”临时医嘱“,并在电子病历中,记录病情。病人出院时,停止长期医嘱,开具出院医嘱。进入出院审核,审核医嘱与住院通过后,病人结清缴费,完成出院。
86 3
|
1月前
|
监控 前端开发 Java
Java SpringBoot –性能分析与调优
Java SpringBoot –性能分析与调优
|
1月前
|
Java 数据库连接 数据库
深入探讨Java连接池技术如何通过复用数据库连接、减少连接建立和断开的开销,从而显著提升系统性能
在Java应用开发中,数据库操作常成为性能瓶颈。本文通过问题解答形式,深入探讨Java连接池技术如何通过复用数据库连接、减少连接建立和断开的开销,从而显著提升系统性能。文章介绍了连接池的优势、选择和使用方法,以及优化配置的技巧。
37 1
|
1月前
|
JavaScript Java 项目管理
Java毕设学习 基于SpringBoot + Vue 的医院管理系统 持续给大家寻找Java毕设学习项目(附源码)
基于SpringBoot + Vue的医院管理系统,涵盖医院、患者、挂号、药物、检查、病床、排班管理和数据分析等功能。开发工具为IDEA和HBuilder X,环境需配置jdk8、Node.js14、MySQL8。文末提供源码下载链接。
下一篇
DataWorks