Browse Source

2020/1/3 18:02

jzdsh 4 years ago
parent
commit
1248873d9d

+ 41 - 0
src/main/java/com/yc/education/controller/admin/ProviderPurchaseLibraryController.java

@@ -4,6 +4,7 @@ import com.yc.education.model.ProviderPurchaseLibrary;
 import com.yc.education.service.IProviderPurchaseLibraryService;
 import com.yc.education.util.AjaxMessage;
 import com.yc.education.util.PinYin2Abbreviation;
+import org.apache.commons.beanutils.BeanUtils;
 import org.apache.poi.hssf.usermodel.*;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -42,6 +43,46 @@ public class ProviderPurchaseLibraryController {
     @Autowired
     private IProviderPurchaseLibraryService   service;
 
+
+    /**
+     * 采购数据添加跳转
+     * @return
+     */
+    @RequestMapping("providerPurchaseLibraryAdd.html")
+     public ModelAndView providerPurchaseLibraryAdd(){
+         return new ModelAndView();
+     }
+
+     @ResponseBody
+     @RequestMapping("providerPurchaseLibraryAdds.html")
+     public AjaxMessage<Object> providerPurchaseLibraryAdds(HttpServletRequest request){
+
+         AjaxMessage<Object> am = new AjaxMessage<>();
+         ProviderPurchaseLibrary providerPurchaseLibrary = new ProviderPurchaseLibrary();
+         try {
+             BeanUtils.populate(providerPurchaseLibrary,request.getParameterMap());
+             providerPurchaseLibrary.setCreateDate(new Date());
+             providerPurchaseLibrary.setFirstLetter(PinYin2Abbreviation.cn2py(providerPurchaseLibrary.getBrand().substring(0,1)).toUpperCase());
+             int row = service.save(providerPurchaseLibrary);
+             if (row > 0){
+                 am.setIs(true);
+                 am.setMsg("添加成功");
+                 return am;
+             }else {
+                 am.setIs(false);
+                 am.setMsg("添加失败");
+                 return  am;
+             }
+         }catch (Exception e){
+             e.printStackTrace();
+         }
+
+         return am;
+     }
+
+
+
+
     /**
      * 跳转到导入页面
      * @return

+ 3 - 1
src/main/java/com/yc/education/controller/admin/ReportManageController.java

@@ -76,8 +76,10 @@ public class ReportManageController {
             refferPhone = recom. getPhone().trim();//推荐人电话
         }
         /*将空字符串赋值为null*/
-        if (StringUtils.isBlank(sDateVal) || StringUtils.isBlank(eDateVal)) {
+        if (StringUtils.isBlank(sDateVal)) {
             sDateVal = null;
+        }
+        if (StringUtils.isBlank(eDateVal)){
             eDateVal = null;
         }
         /*如果条件全为空就默认查询当前月份的商家信息*/

+ 11 - 0
src/main/java/com/yc/education/model/Provider.java

@@ -75,6 +75,9 @@ public class Provider implements Serializable {
     @Column(name = "is_shelf")
     private String isShelf;
 
+    @Transient
+    private String downShelfCause;//下架原因
+
     @Transient
     private String QCPJB;//汽车配件二级  单项件  全车件
 
@@ -1356,5 +1359,13 @@ public class Provider implements Serializable {
     public void setHouseNumber(String houseNumber) {
         this.houseNumber = houseNumber;
     }
+
+    public String getDownShelfCause() {
+        return downShelfCause;
+    }
+
+    public void setDownShelfCause(String downShelfCause) {
+        this.downShelfCause = downShelfCause;
+    }
 }
 

+ 6 - 0
src/main/java/com/yc/education/test/SortTest.java

@@ -43,6 +43,12 @@ public class SortTest {
             }
         }
         System.out.println("这是插入排序:" + Arrays.toString(ist));
+
+        int abc = 1;
+        int efg = 2;
+
+        System.out.println(efg/=abc++);
+        System.out.println(abc);
     }
 
 

+ 2 - 2
src/main/resources/mapper/ProviderMapper.xml

@@ -696,10 +696,10 @@
                 and date_format(a.createDate,'%Y-%m-%d') between #{sDateVal} and #{eDateVal}
             </if>
             <if test="sDateVal == null and eDateVal != null">
-                and date_format(a.createDate,'%Y-%m-%d') lt;= #{eDateVal}
+                and date_format(a.createDate,'%Y-%m-%d') &lt;= #{eDateVal}
             </if>
             <if test="sDateVal != null and eDateVal == null">
-                and date_format(a.createDate,'%Y-%m-%d') gt;= #{sDateVal}
+                and date_format(a.createDate,'%Y-%m-%d') &gt;= #{sDateVal}
             </if>
             <if test="monthVal != null and monthVal != ''">
                 and date_format(a.createDate,'%m') =#{monthVal}

+ 1 - 0
src/main/webapp/WEB-INF/jsp/admin/index.jsp

@@ -159,6 +159,7 @@
                     <li><a data-href="carCommercialLogList.html" data-title="商用车品牌列表"
                            href="javascript:void(0)">商用车品牌列表</a></li>
                     <li><a data-href="carSedanSeriesList.html" data-title="车系列表" href="javascript:void(0)">车系列表</a></li>
+                    <li><a data-href="providerPurchaseLibraryAdd.html" data-title="采购数据添加" href="javascript:void(0)">采购数据添加</a></li>
                 </ul>
             </dd>
         </dl>

+ 244 - 0
src/main/webapp/WEB-INF/jsp/admin/providerPurchaseLibraryAdd.jsp

@@ -0,0 +1,244 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%
+    String base = pageContext.getServletContext().getContextPath();
+%>
+<!--_meta 作为公共模版分离出去-->
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <script type="text/javascript">
+        window.UEDITOR_SERVER_URL = '<%=base%>';
+    </script>
+    <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"/>
+    <LINK rel="Bookmark" href="/favicon.ico">
+    <LINK rel="Shortcut Icon" href="/favicon.ico"/>
+
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/admin/index/h-ui/css/H-ui.min.css"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/admin/index/h-ui.admin/css/H-ui.admin.css"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/admin/index/Hui-iconfont/1.0.8/iconfont.css"/>
+    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/icheck/icheck.css"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/admin/index/h-ui.admin/skin/default/skin.css" id="skin"/>
+    <link rel="stylesheet" type="text/css"
+          href="${pageContext.request.contextPath}/static/admin/index/h-ui.admin/css/style.css"/>
+
+    <script type="text/javascript"
+            src="${pageContext.request.contextPath}/static/admin/index/jquery/1.9.1/jquery.min.js"></script>
+    <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/index/layer/layer.js"></script>
+    <script type="text/javascript"
+            src="${pageContext.request.contextPath}/static/admin/js/jquery.validate.min.js"></script>
+    <script type="text/javascript"
+            src="${pageContext.request.contextPath}/static/admin/js/validate-methods.js"></script>
+    <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/js/messages_zh.min.js"></script>
+    <script type="text/javascript"
+            src="${pageContext.request.contextPath}/static/admin/icheck/jquery.icheck.min.js"></script>
+    <script src="${pageContext.request.contextPath}/static/admin/manage/js/WdatePicker.js"></script>
+
+    <script type="text/javascript">
+        $(function () {
+            $("#sub").click(function () {
+              var liyangId = $("#liyangId").val();
+              var brand    = $("#brand").val();
+              var carType  = $("#carType").val();
+              var saleName = $("#saleName").val();
+              var year     = $("#year").val();
+              let liyangIdTest = /(?!^\d+$)(?!^[a-zA-Z]+$)[0-9a-zA-Z]{4,23}/;
+                if (liyangId == null || liyangId == '') {
+                    layer.msg("力洋Id不能为空~");
+                    return false;
+                }
+
+                if (brand == null || brand == '') {
+                    layer.msg("品牌不能为空~");
+                    return false;
+                }
+                if (carType == null || carType == '') {
+                    layer.msg("车型不能为空~");
+                    return false;
+                }
+                if (saleName == null || saleName == '') {
+                    layer.msg("销售名称不能为空~");
+                    return false;
+                }
+                if (year == null || year == '') {
+                    layer.msg("年款不能为空~");
+                    return false;
+                }
+                if (!(liyangIdTest.test(liyangId))){
+                    layer.msg("力洋Id只能输入英文和数字");
+                    return false;
+                }
+
+                var formData  =  new FormData();
+                formData.append("liyangId",$("#liyangId").val());//力洋id
+                formData.append("brand",$("#brand").val());//品牌
+                formData.append("carType",$("#carType").val());//车型
+                formData.append("saleName",$("#saleName").val())//销售名称
+                formData.append("year",$("#year").val());//年款
+
+                $.ajax({
+
+                    url: "providerPurchaseLibraryAdds.html",
+                    data: formData,
+                    type: 'POST',
+                    cache: false,
+                    async : false,
+                    dataType: "json",
+                    processData: false,
+                    contentType: false,
+                    success:function(ajax){
+
+                        if (ajax.is){
+                            layer.alert(ajax.msg, {skin: 'layui-layer-molv', closeBtn: 0, anim: 4}, function () {
+                                window.location = window.location;
+                            });
+                        }else {
+                            layer.alert(ajax.msg, {skin: 'layui-layer-molv', closeBtn: 0, anim: 4}, function () {
+                                window.location = window.location;
+                            });
+                        }
+                    }
+
+                })
+
+                /*$('#subform').submit();*/
+
+            });
+        });
+    </script>
+
+    <title>管理员管理</title>
+</head>
+<body>
+<nav class="breadcrumb">
+    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span><a href="javascript:history.go(-1)" title="采购数据添加">采购数据添加</a>
+    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
+       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
+</nav>
+<article class="page-container">
+    <form action="helpTypeAdds.html" method="post" enctype="multipart/form-data" class="form form-horizontal" id="subform">
+
+
+        <%--<div class="row cl">
+            <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>服务分类:</label>
+            <div class="formControls col-xs-8 col-sm-9">
+                <select name="pId" id="pId" class="input-text">
+                    <option value="0">服务分类</option>
+                    <c:forEach items="${findall}" var="newtype">
+                        <option value="${newtype.id}">${newtype.name}</option>
+                    </c:forEach>
+                </select>
+            </div>
+        </div>--%>
+
+
+
+        <div class="row cl">
+            <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>力洋Id:</label>
+            <div class="formControls col-xs-8 col-sm-9">
+                <input type="text" class="input-text" name="liyangId" id="liyangId" placeholder="力洋Id">
+            </div>
+        </div>
+            <div class="row cl">
+                <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>品牌名称:</label>
+                <div class="formControls col-xs-8 col-sm-9">
+                    <input type="text" class="input-text" name="brand" id="brand" placeholder="品牌名称">
+                </div>
+            </div>
+            <div class="row cl">
+                <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>车型:</label>
+                <div class="formControls col-xs-8 col-sm-9">
+                    <input type="text" class="input-text" name="carType" id="carType" placeholder="车型">
+                </div>
+            </div>
+            <div class="row cl">
+                <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>销售名称:</label>
+                <div class="formControls col-xs-8 col-sm-9">
+                    <input type="text" class="input-text" name="saleName" id="saleName" placeholder="销售名称">
+                </div>
+            </div>
+            <div class="row cl">
+                <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>年款:</label>
+                <div class="formControls col-xs-8 col-sm-9">
+                    <input type="text" class="input-text" name="year" id="year" placeholder="年款">
+                </div>
+            </div>
+        <div class="row cl">
+            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-1">
+                <button type="button" class="btn btn-primary radius" id="sub" name="admin-role-save"><i class="Hui-iconfont">&#xe632;</i> 提交</button>
+            </div>
+        </div>
+    </form>
+</article>
+
+<!--请在下方写此页面业务相关的脚本-->
+<!-- 百度文本编辑器   引用文件 -->
+<link href="<%=base%>/static/ue/themes/default/css/ueditor.css" type="text/css" rel="stylesheet">
+<script src="<%=base%>/static/ue/ueditor.config.js" type="text/javascript"></script>
+<script src="<%=base%>/static/ue/ueditor.all.js" type="text/javascript"></script>
+<script type="text/javascript" src="<%=base%>/static/ue/lang/zh-cn/zh-cn.js"></script>
+
+<!-- 百度文本编辑器   js -->
+<script type="text/javascript">
+    $(function () {
+        var ue = UE.getEditor('introduction', {
+            //关闭字数统计
+            wordCount: false,
+            toolbars: [['fullscreen', 'source', '|', 'undo', 'redo', '|',
+                'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
+                'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
+                'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
+                'directionalityltr', 'directionalityrtl', 'indent', '|',
+                'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
+                'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
+                'insertimage', 'emotion', 'insertvideo', 'attachment', 'map', 'template', 'background', '|',
+                'horizontal', 'date', 'time', 'spechars', 'wordimage', '|',
+                'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
+                'print', 'preview', 'searchreplace', 'help'
+            ]],
+            //关闭elementPath
+            elementPathEnabled: false,
+        });
+    });
+
+
+    var currentBrowserId;
+
+    function browserImage(targetId) {
+        currentBrowserId = targetId;
+        var weboxTemp = $.webox({
+            height: 600,
+            width: 1024,
+            bgvisibel: true,
+            title: '图片管理',
+            iframe: '<%=base%>/admin/image/imgbox.html?' + Math.random()
+        });
+    }
+
+    function setImagepath(imgPath) {
+        $('#' + currentBrowserId).val(imgPath);
+    }
+
+    function closeFrame() {
+        $('#locked .span').click();
+    }
+</script>
+
+
+<!--请在下方写此页面业务相关的脚本-->
+<script type="text/javascript">
+</script>
+<!--/请在上方写此页面业务相关的脚本-->
+</body>
+</html>

+ 32 - 3
src/main/webapp/WEB-INF/jsp/admin/recommenderReport.jsp

@@ -27,6 +27,8 @@
     <script type="text/javascript"
             src="${pageContext.request.contextPath}/static/admin/index/h-ui.admin/js/H-ui.admin.js"></script>
     <script src="${pageContext.request.contextPath}/static/admin/manage/js/WdatePicker.js"></script>
+  <%--  <script type="text/javascript"
+            src="${pageContext.request.contextPath}/static/admin/index/jquery/jquery.jSelectDate.js"></script>--%>
 </head>
 <body>
 <nav class="breadcrumb">
@@ -38,16 +40,16 @@
     <form action="recommenderReport.html" method="post"   enctype="multipart/form-data">
         <div class="text-c">
 
-                <input type="text"  name="sDateVal" id="sDateVal" value="${sDateVal}"  onfocus="WdatePicker({ Date:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate" style="width:120px;" placeholder="开始日期">
+                <input type="text"  name="sDateVal" id="sDateVal" value="${sDateVal}" onblur="sDate(this.value)"  onfocus="WdatePicker({ Date:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate" style="width:120px;" placeholder="开始日期">
 
                 <input type="text" hidden onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d' })"  class="input-text Wdate" style="width:120px;">
                 -
-                <input type="text"  name="eDateVal"  id="eDateVal" value="${eDateVal}" onfocus="WdatePicker({ Date:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate" style="width:120px;" placeholder="结束日期">
+                <input type="text"  name="eDateVal"  id="eDateVal" value="${eDateVal}" onblur="eDate(this.value)" onfocus="WdatePicker({ Date:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate" style="width:120px;" placeholder="结束日期">
 
                 <input type="text" hidden onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d' })"  class="input-text Wdate" style="width:120px;">
 
             <span class="select-box inline">
-                <select name="monthVal" id="monthVal" class="select" <%--style="width: 250px;height: 30px;font-size: 14px"--%>>
+                <select name="monthVal" id="monthVal" onchange="monthValChange(this.value)" class="select" <%--style="width: 250px;height: 30px;font-size: 14px"--%>>
                   <option value="">请选择今年月份</option>
                   <option value="01" <c:if test="${monthVal == '01'}">selected</c:if> >一月</option>
                   <option value="02" <c:if test="${monthVal == '02'}">selected</c:if> >二月</option>
@@ -151,8 +153,35 @@
     </div>
 </div>
 </div>
+<%--<script type="text/javascript"
+        src="${pageContext.request.contextPath}/static/admin/index/jquery/jquery.jSelectDate.js"></script>--%>
 <script type="text/javascript">
 
+
+    function sDate(sDateVal) {
+
+        var sDateVal = sDateVal;
+        if (sDateVal != ""){
+            $("#monthVal").val("");
+        }
+    }
+
+    function eDate(eDateVal) {
+
+        var eDateVal = eDateVal;
+        if (eDateVal != ""){
+            $("#monthVal").val("");
+        }
+    }
+
+    function monthValChange(monthVal) {
+        var monthVal = monthVal;
+        if (monthVal != ""){
+            $("#sDateVal").val("");
+            $("#eDateVal").val("");
+        }
+    }
+
     <%--每页条数选择--%>
     function pageSizeChoose(pageSizeVal){
         location.href="recommenderReport.html?sDateVal=${sDateVal}&eDateVal=${eDateVal}&monthVal=${monthVal}&recommenderName=${recommenderName}&cityName=${cityName}&pageNum=${pageNum}&pageSize="+pageSizeVal;

+ 43 - 17
src/main/webapp/WEB-INF/jsp/admin/saleStatisticsMapProvince.jsp

@@ -43,22 +43,25 @@
        href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
 </nav>
 <div class="page-container">
-    <div style="width: 1300px;height: 30px;">
-       <span class="select-box inline" style="margin-left: 600px" >
+    <div style="width: 1300px;height: 30px;" >
+           <span class="select-box inline" style="margin-left: 600px" >
+                <%--<select name='year' id="year" class="select">
+            <option value="">年份选择</option>
+            </select>--%>
                 <select name="monthVal" id="monthVal" class="select" onchange="monthChange(this.value)" <%--style="width: 250px;height: 30px;font-size: 14px"--%>>
-                  <option value="">请选择今年月份</option>
-                  <option value="01" <c:if test="${monthVal == '1'}">selected</c:if> >一月</option>
-                  <option value="02" <c:if test="${monthVal == '2'}">selected</c:if> >二月</option>
-                  <option value="03" <c:if test="${monthVal == '3'}">selected</c:if> >三月</option>
-                  <option value="04" <c:if test="${monthVal == '4'}">selected</c:if> >四月</option>
-                  <option value="05" <c:if test="${monthVal == '5'}">selected</c:if> >五月</option>
-                  <option value="06" <c:if test="${monthVal == '6'}">selected</c:if> >六月</option>
-                  <option value="07" <c:if test="${monthVal == '7'}">selected</c:if> >七月</option>
-                  <option value="08" <c:if test="${monthVal == '8'}">selected</c:if> >八月</option>
-                  <option value="09" <c:if test="${monthVal == '9'}">selected</c:if> >九月</option>
-                  <option value="10" <c:if test="${monthVal == '10'}">selected</c:if> >十月</option>
-                  <option value="11" <c:if test="${monthVal == '11'}">selected</c:if> >十一月</option>
-                  <option value="12" <c:if test="${monthVal == '12'}">selected</c:if> >十二月</option>
+                  <option value="">月份选择</option>
+                  <option value="01" <c:if test="${monthVal == '1'}">selected</c:if> >1</option>
+                  <option value="02" <c:if test="${monthVal == '2'}">selected</c:if> >2</option>
+                  <option value="03" <c:if test="${monthVal == '3'}">selected</c:if> >3</option>
+                  <option value="04" <c:if test="${monthVal == '4'}">selected</c:if> >4</option>
+                  <option value="05" <c:if test="${monthVal == '5'}">selected</c:if> >5</option>
+                  <option value="06" <c:if test="${monthVal == '6'}">selected</c:if> >6</option>
+                  <option value="07" <c:if test="${monthVal == '7'}">selected</c:if> >7</option>
+                  <option value="08" <c:if test="${monthVal == '8'}">selected</c:if> >8</option>
+                  <option value="09" <c:if test="${monthVal == '9'}">selected</c:if> >9</option>
+                  <option value="10" <c:if test="${monthVal == '10'}">selected</c:if> >10</option>
+                  <option value="11" <c:if test="${monthVal == '11'}">selected</c:if> >11</option>
+                  <option value="12" <c:if test="${monthVal == '12'}">selected</c:if> >12</option>
               </select>
 		   </span>
     </div>
@@ -69,6 +72,29 @@
     <span style="color: red">*默认统计今年全年各省金额数量</span>
 </div>
 <script type="text/javascript">
+
+
+    $(function(){
+        var strYear = "";
+        var date = new Date();
+        var newYear = date.getYear()+1900;
+        console.log(newYear);
+        var arrLength = newYear-2018+1
+        console.log(arrLength);
+        var yearArr = new Array(arrLength);//定义初始年份数组
+        //遍历数组将值添加到下拉框
+        for(var i=0;i<yearArr.length;i++){
+
+            yearArr[i]=(2018+i);
+            console.log(yearArr[i]);
+            strYear += '<option value=" '  +  yearArr[i]  +   ' "'  + '<c:if test="' + yearArr[i] + '==' + newYear +  '">selected</c:if>'+  '>' +yearArr[i]+     '</option>';
+
+        }
+        $("#year").append(strYear);
+
+    });
+
+
    var   option = {
         tooltip: {           //点击数据显示数据信息
             trigger: 'axis',
@@ -170,11 +196,11 @@
           success:function (ajax) {
               if (ajax.is){
                   for (var i = 0;i<ajax.data.length;i++){
-                      console.log(JSON.stringify(ajax.data[i].province),JSON.stringify(ajax.data[i].money));
+                   /*   console.log(JSON.stringify(ajax.data[i].province),JSON.stringify(ajax.data[i].money));*/
                       option.xAxis[0].data.push(ajax.data[i].province);
                       option.series[0].data.push(ajax.data[i].money);
                   }
-                  console.log(option)
+                  /*console.log(option)*/
                   myChart = echarts.init(document.getElementById('chartmain'));
                   myChart.setOption(option);
                   myChart.on('click',function (params) {

+ 344 - 0
src/main/webapp/static/admin/index/jquery/jquery.jSelectDate.js

@@ -0,0 +1,344 @@
+/**
+ * jQuery.jSelectDate Version 0.2
+ * jQuery 下拉列表选择日期插件
+ * Download by http://www.bvbsoft.com 
+ * Wathon Team
+ * http://www.wathon.com
+ * http://huacn.cnblogs.com
+ * http://www.cnblogs.com/huacn/archive/2008/01/16/jquery_plugin_jSelectDate.html
+ * 
+ * created by:
+ * 李华顺 没剑
+ */
+/*
+ * *****************   Example   ***********************
+ <script type="text/javascript">
+ $("body").ready(function(){
+ $("input.date").jSelectDate({
+ css:"date",
+ yearBeign: 1995,
+ disabled : true
+ });
+ })
+ </script>
+ 
+ 
+ <body>
+ <input type="text" id="txtName" class="date" value="2005-3-22" />
+ <input type="text" id="txtDate2" class="date" value="1995-5-2" />
+ </body>
+ 
+ * ****************  End Example  **********************
+ */
+var jSelectDate = {
+
+		
+	/**
+	 * 选项设置
+	 */
+    settings : {
+		css: "date",
+		borderCss: "date",
+        disabled: false,
+        yearBegin: 1960,
+        yearEnd: 2008,
+		isShowLabel: true
+	},
+	
+    
+    
+    /**
+     * 初始化对向
+     * @param {Object} el 用于存放日期结果的文本框 jQuery DOM
+     */
+    init: function(els){
+    
+        els.each(function(){
+        
+        
+            var el = $(this);
+            
+            /* 取得旧的日期 */
+            var elValue = el.val();
+            elDate = new Date(elValue.split("-").join("/"));
+            
+            var nYear = elDate.getFullYear();
+            var nMonth = jSelectDate.returnMonth(elDate.getMonth());
+            var nDay = elDate.getDate();
+            
+            
+            /* 隐藏给出的对向 */
+            el.hide();
+            
+            /* 先算出当前共有多少个jSelectDate */
+            var currentIdx = $("jSelectDateBorder").length + 1;
+			
+             /* 加入控件到文本框的位置 */
+			var spanDate = document.createElement("span");
+			spanDate.id = "spanDate" + currentIdx;
+			spanDate.className = "jSelectDateBorder " + jSelectDate.settings.borderCss;
+			spanDate.disabled = jSelectDate.settings.disabled;
+			
+            el.after(spanDate);
+			
+            /* 创建年 */
+            var selYear = document.createElement("select");
+            selYear.id = "selYear" + currentIdx
+            selYear.className = jSelectDate.settings.css;
+            selYear.disabled = jSelectDate.settings.disabled;
+            
+            /* 加入选项 */
+            for (var i = jSelectDate.settings.yearEnd; i >= jSelectDate.settings.yearBegin; i--) {
+            
+                var option = document.createElement("option");
+                option.value = i;
+                option.innerHTML = i;
+                
+                /* 判断是否有旧的值,如果有就选中 */
+                if (!isNaN(nYear)) {
+                    if (i == nYear) {
+                        option.selected = true;
+                    }
+                }
+                
+                selYear.appendChild(option);
+                option = null;
+                
+            }            
+           
+			$(spanDate).append(selYear);
+            
+            /* 创建月 */
+            var selMonth = document.createElement("select");
+            selMonth.id = "selMonth" + currentIdx
+			selMonth.className = jSelectDate.settings.css;
+            selMonth.disabled = jSelectDate.settings.disabled;
+            /* 加入选项 */
+            for (var i = 1; i <= 12; i++) {
+                var option = document.createElement("option");
+                option.value = i;
+                option.innerHTML = i;
+                
+                /* 判断是否有旧的值,如果有就选中 */
+                if (!isNaN(nMonth)) {
+                    if (i == nMonth) {
+                        option.selected = true;
+                    }
+                }
+                
+                selMonth.appendChild(option);
+                option = null;
+            }
+            /* 加入控件到文本框的位置 */
+            $(selYear).after(selMonth);
+            
+            
+            /* 创建日 */
+            var selDay = document.createElement("select");
+            selDay.id = "selDay" + currentIdx
+			selDay.className = jSelectDate.settings.css;
+            selDay.disabled = jSelectDate.settings.disabled;
+            
+			/* 算出最大的天数 */			
+			var maxDayNum = 30;
+			if (nMonth == 2) {
+				if (jSelectDate.isLeapYear(nYear)) {
+					maxDayNum = 29;
+				}
+				else{
+					maxDayNum = 28;
+				}
+			}
+			else if (jSelectDate.isLargeMonth(nMonth)) {
+					maxDayNum = 31;
+			}
+			
+			/* 加入选项 */
+            for (var i = 1; i <= maxDayNum; i++) {
+            
+                var option = document.createElement("option");
+                option.value = i;
+                option.innerHTML = i;
+                
+                /* 判断是否有旧的值,如果有就选中 */
+                if (!isNaN(nDay)) {
+                    if (i == nDay) {
+                        option.selected = true;
+                    }
+                }
+                
+                selDay.appendChild(option);
+                option = null;
+            }
+            /* 加入控件到文本框的位置 */
+            $(selMonth).after(selDay);
+			
+			if (jSelectDate.settings.isShowLabel) {
+				$(selMonth).before("年 ");
+				$(selDay).before("月 ");
+				$(selDay).after("日");
+			}else{
+				$(selMonth).before(" ");
+				$(selDay).before(" ");
+			}
+			
+            /* 返回当前选择的日期 */
+            var getDate = function(){
+                var year = $(selYear).val();
+                var month = $(selMonth).val();
+                var day = $(selDay).val();
+                el.val(year + "-" + month + "-" + day);
+            }
+			
+			
+            /**
+             * 给几个下拉列表加入更改后的事件
+             */
+            $(selDay).change(function(){
+                return getDate();
+            });
+            $(selMonth).change(function(){
+				
+				jSelectDate.progressDaySize(this,true);
+				
+				/* 更新文本框中的日期 */
+                return getDate();
+            });
+            $(selYear).change(function(){
+				jSelectDate.progressDaySize(this,false);
+                return getDate();
+            });
+            
+        })
+        
+        
+    },
+	
+	/**
+	 * 判断是否闰年
+	 * @param {Object} year
+	 * @author 没剑 http://regedit.cnblogs.com
+	 */
+	isLeapYear : function(year){ 
+  	return (0==year%4&&((year%100!=0)||(year%400==0)));
+  },
+
+	/**
+	 * 判断是否是大月
+	 * @param {Object} monthNum
+	 */
+	isLargeMonth : function(monthNum){
+		var largeArray = [true,false,true,false,true,false,true,true,false,true,false,true];
+		return largeArray[monthNum - 1];
+	},
+    
+    returnMonth: function(num){
+        var arr = new Array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12");
+        return arr[num];
+    },
+	
+	/**
+	 * 创建一个Option对象
+	 * @param {Object} value 值
+	 * @param {Object} text 文本
+	 */
+	createOption : function(value,text){
+		var option = document.createElement("option");
+        option.value = value;
+        option.innerHTML = text;
+		return option;			
+	},
+	
+	/**
+	 * 处理天数
+	 * @param {Object} el 下拉列表对像
+	 * @param {Object} isMonth 是否是月的下拉列表 或者就处理 年的下拉列表
+	 */
+	progressDaySize: function(el,isMonth){
+		if (isMonth == true) {
+			/* 选择月时处理大月、小月和二月的情况 */
+			var month = $(el).val();
+			var year = $($("select", $(el).parent())[0]).val()
+			var selDay = $($("select", $(el).parent())[2]);
+			if (month == 2) {
+			
+				/* 2月处理 */
+				$("option:contains('31')", selDay).remove();
+				$("option:contains('30')", selDay).remove();
+				
+				/* 闰年处理 */
+				if (!jSelectDate.isLeapYear(year)) {
+					$("option:contains('29')", selDay).remove();
+				}
+				else {
+				
+					if ($("option:contains('29')", selDay).length == 0) {
+						selDay.append(jSelectDate.createOption(29, 29));
+					}
+				}
+			}
+			else 
+				if (!jSelectDate.isLargeMonth(month)) {
+				
+					/* 小月处理 */
+					if ($("option:contains('30')", selDay).length == 0) {
+						selDay.append(jSelectDate.createOption(30, 30));
+					}
+					
+					$("option:contains('31')", selDay).remove();
+				}
+				else {
+				
+					/* 大月处理 */
+					if ($("option:contains('30')", selDay).length == 0) {
+						selDay.append(jSelectDate.createOption(30, 30));
+					}
+					
+					if ($("option:contains('31')", selDay).length == 0) {
+						selDay.append(jSelectDate.createOption(31, 31));
+					}
+				}
+		}
+		else{
+			/* 处理闰年的二月问题 */
+			var panelDate = $(el).parent();
+			var year = $(el).val();
+			var month = $($("select",panelDate)[1]).val()
+			var selDay = $($("select",panelDate)[2]);
+			if(month == 2){
+				$("option:contains('31')",selDay).remove();
+				$("option:contains('30')",selDay).remove();
+				if(! jSelectDate.isLeapYear(year)){				
+					$("option:contains('29')",selDay).remove();
+				}
+				else{
+					
+					if($("option:contains('29')",selDay).length == 0){
+						selDay.append(jSelectDate.createOption(29, 29));
+					}
+				}
+			}
+			
+		}
+	}
+    
+}
+
+jQuery.fn.jSelectDate = function(settings){    
+
+	var getNowYear = function(){
+        /* 得到现在的年 */
+        var date = new Date();
+        return date.getFullYear();
+    }
+	
+	jSelectDate.settings.yearEnd = getNowYear();
+	
+    $.extend(jSelectDate.settings, settings);
+
+
+    jSelectDate.init($(this));
+    
+    return $(this);
+    
+}