Эх сурвалжийг харах

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	donate-console/src/main/webapp/resources/js/index/app.js
huangct 8 жил өмнө
parent
commit
0da623c2d8
28 өөрчлөгдсөн 2043 нэмэгдсэн , 931 устгасан
  1. 8 0
      donate-console/src/main/java/com/uas/console/donate/model/ProjectRecode.java
  2. 1 1
      donate-console/src/main/java/com/uas/console/donate/service/impl/ActivityServiceImpl.java
  3. 26 23
      donate-console/src/main/webapp/WEB-INF/views/index.html
  4. 758 11
      donate-console/src/main/webapp/resources/js/app.js
  5. 0 0
      donate-console/src/main/webapp/resources/js/app.min.js
  6. 202 34
      donate-console/src/main/webapp/resources/js/index/app.js
  7. 1 1
      donate-console/src/main/webapp/resources/js/index/services/Organization.js
  8. 0 758
      donate-console/src/main/webapp/resources/lib/js/app.js
  9. 7 5
      donate-console/src/main/webapp/resources/view/activity/activity_launch.html
  10. 1 1
      donate-console/src/main/webapp/resources/view/project/project_detail.html
  11. 26 6
      donate-console/src/main/webapp/resources/view/project/project_launch_1.html
  12. 48 16
      donate-console/src/main/webapp/resources/view/project/project_launch_2.html
  13. 853 1
      donate-console/src/main/webapp/resources/view/user/user_list.html
  14. 3 15
      donate-service/src/main/java/com/uas/service/donate/controller/ActivityController.java
  15. 1 1
      donate-service/src/main/java/com/uas/service/donate/model/ProjectRecode.java
  16. 4 2
      donate-service/src/main/java/com/uas/service/donate/service/impl/ActivityServiceImpl.java
  17. 3 0
      donate-service/src/main/webapp/resources/css/base.css
  18. 3 3
      donate-service/src/main/webapp/resources/js/activity/controllers/ActivityDetailCtrl.js
  19. 2 5
      donate-service/src/main/webapp/resources/js/common/query/Activity.js
  20. 22 13
      donate-service/src/main/webapp/resources/js/mobile/controllers/MobileActivityDetailCtrl.js
  21. 3 0
      donate-service/src/main/webapp/resources/js/mobile/controllers/MobileProjectDetailCtrl.js
  22. 2 3
      donate-service/src/main/webapp/resources/js/pay.js
  23. 5 0
      donate-service/src/main/webapp/resources/js/project/controllers/ProjectDetailCtrl.js
  24. 6 5
      donate-service/src/main/webapp/resources/view/activity/activity_detail.html
  25. 1 1
      donate-service/src/main/webapp/resources/view/mobile/mobile_activity_detail.html
  26. 29 7
      donate-service/src/main/webapp/resources/view/mobile/mobile_project_detail.html
  27. 4 2
      donate-service/src/main/webapp/resources/view/project/donateQrcode.html
  28. 24 17
      donate-service/src/main/webapp/resources/view/project/project_detail.html

+ 8 - 0
donate-console/src/main/java/com/uas/console/donate/model/ProjectRecode.java

@@ -177,4 +177,12 @@ public class ProjectRecode {
     public void setExceptionMsg(String exceptionMsg) {
         this.exceptionMsg = exceptionMsg;
     }
+
+    public User getUser() {
+        return user;
+    }
+
+    public void setUser(User user) {
+        this.user = user;
+    }
 }

+ 1 - 1
donate-console/src/main/java/com/uas/console/donate/service/impl/ActivityServiceImpl.java

@@ -84,7 +84,7 @@ public class ActivityServiceImpl implements ActivityService{
         // 如果是已保存的
         if (null != activity.getId()) {
             Activity oldActivity = activityDao.findOne(activity.getId());
-            oldActivity.setSumconnect(activity.getProjects().size());
+            activity.setSumconnect(activity.getProjects().size());
             Date date=new Date();
             //设置活动发布时间
             activity.setSubmitTime(date);

+ 26 - 23
donate-console/src/main/webapp/WEB-INF/views/index.html

@@ -31,7 +31,7 @@
     <!--顶部导航-->
     <header class="main-header" ng-controller="AuthCtrl">
         <!-- Logo -->
-        <a class="logo" ui-sref="#/">
+        <a class="logo" href="#/">
             <span class="logo-mini"><b>UAS</b></span>
             <span class="logo-lg"><b>一元捐后台系统</b></span>
         </a>
@@ -73,57 +73,57 @@
                     </a>
                 </li>
                 <li class="jpress_block"></li>
-                <li class="treeview" id="systems">
+                <li class="treeview" ng-class="{'active' : tree == 'project'}" id="project">
                     <a href="#">
                         <i class="fa fa-file-text-o"></i><span>项目中心</span>
                         <i class="fa fa-angle-left pull-right"></i>
                     </a>
                     <ul class="treeview-menu">
-                        <li id=""><a ui-sref="project">项目列表</a></li>
-                        <li id=""><a ui-sref="launchProject1">发起项目</a></li>
-                        <li id=""><a ui-sref="projectFinance">项目财务披露</a></li>
-                        <li id=""><a ui-sref="projectReport">项目报告填写</a></li>
-                        <li id=""><a ui-sref="projectManagement">项目结项管理</a></li>
+                        <li ng-class="{'active' : thief == 'list'}"><a ui-sref="project">项目列表</a></li>
+                        <li ng-class="{'active' : thief == 'new'}"><a ui-sref="launchProject1">发起项目</a></li>
+                        <li ng-class="{'active' : thief == 'finance'}"><a ui-sref="projectFinance">项目财务披露</a></li>
+                        <li ng-class="{'active' : thief == 'report'}"><a ui-sref="projectReport">项目报告填写</a></li>
+                        <li ng-class="{'active' : thief == 'manage'}"><a ui-sref="projectManagement">项目结项管理</a></li>
                     </ul>
                 </li>
-                <li class="treeview" id="schemes">
+                <li class="treeview" ng-class="{'active' : tree == 'user'}" id="user">
                     <a href="#">
                         <i class="fa fa-file-text-o"></i><span>用户中心</span>
                         <i class="fa fa-angle-left pull-right"></i>
                     </a>
                     <ul class="treeview-menu">
-                        <li id=""><a ui-sref="organizationList">机构列表</a></li>
-                        <li id=""><a ui-sref="userList">用户列表</a></li>
-                        <!--<li id=""><a href="permissionsSettings">权限设置</a></li>-->
-                        <li id=""><a ui-sref="selectInstitutionsNature">机构入驻</a></li>
+                        <li ng-class="{'active' : thief == 'organization'}"><a ui-sref="organizationList">机构列表</a></li>
+                        <li ng-class="{'active' : thief == 'userList'}"><a ui-sref="userList">用户列表</a></li>
+                        <!--<li><a href="permissionsSettings">权限设置</a></li>-->
+                        <li ng-class="{'active' : thief == 'newOrg'}"><a ui-sref="selectInstitutionsNature">机构入驻</a></li>
                     </ul>
                 </li>
-                <li class="treeview" id="customers">
+                <li class="treeview" ng-class="{'active' : tree == 'activity'}" id="activity">
                     <a href="#"><i class="fa fa-file-text-o"></i><span>活动中心</span>
                         <i class="fa fa-angle-left pull-right"></i>
                     </a>
                     <ul class="treeview-menu">
-                        <li id=""><a ui-sref="launchActivity">活动发起</a></li>
-                        <li id=""><a ui-sref="activityList">活动列表</a></li>
+                        <li ng-class="{'active' : thief == 'new'}"><a ui-sref="launchActivity">活动发起</a></li>
+                        <li ng-class="{'active' : thief == 'list'}"><a ui-sref="activityList">活动列表</a></li>
                     </ul>
                 </li>
-                <li class="treeview" id="customers">
+                <li class="treeview" ng-class="{'active' : tree == 'message'}" id="message">
                     <a href="#"><i class="fa fa-file-text-o"></i><span>消息中心</span>
                         <i class="fa fa-angle-left pull-right"></i>
                     </a>
                     <ul class="treeview-menu">
-                        <li id=""><a >编辑消息</a></li>
-                        <li id=""><a >消息列表</a></li>
+                        <li ng-class="{'active' : thief == 'new'}"><a >编辑消息</a></li>
+                        <li ng-class="{'active' : thief == 'list'}"><a >消息列表</a></li>
                     </ul>
                 </li>
-                <li class="treeview" id="customers">
+                <li class="treeview" ng-class="{'active' : tree == 'manage'}" id="front">
                     <a href="#"><i class="fa fa-file-text-o"></i><span>前台管理</span>
                         <i class="fa fa-angle-left pull-right"></i>
                     </a>
                     <ul class="treeview-menu">
                         <li><a href="http://10.10.101.23:20010/carousels/donate" target="_blank">Banner设置(PC)</a></li>
                         <li><a href="http://10.10.101.23:20010/carousels/donate" target="_blank">Banner设置(IM)</a></li>
-                        <li><a >内容框背景设置</a></li>
+                        <li ng-class="{'active' : thief == 'banner'}"><a >内容框背景设置</a></li>
                     </ul>
                 </li>
                 <li class="jpress_block"></li>
@@ -138,11 +138,11 @@
 <!-- 消息提示框  Start-->
 <toaster-container
         toaster-options="{'position-class': 'toast-top-center'}"></toaster-container>
-<script src="static/lib/jquery/jquery.min.js"></script>
-<!--<script src="static/lib/bootstrap/js/bootstrap.min.js"></script>-->
-<script src="static/lib/js/app.min.js"></script>
 <script type="text/javascript" src="static/lib/require.js"
         data-main="static/js/index/main.js"></script>
+<script src="static/lib/jquery/jquery.min.js"></script>
+<!--<script src="static/lib/bootstrap/js/bootstrap.min.js"></script>-->
+<script src="static/js/app.js"></script>
 <script type="text/javascript">
     $('#login').on('click', function () {
         $.get('sso/login', function(data) {
@@ -150,6 +150,9 @@
         });
     });
 
+    $('.treeview-menu').children().on('click', function () {
+        $(this).addClass('active').siblings().removeClass('active');
+    });
 </script>
 </body>
 </html>

+ 758 - 11
donate-console/src/main/webapp/resources/js/app.js

@@ -1,11 +1,758 @@
-angular.module("sportStore").constant("dataUrl","http://localhost:8085")
-.controller("sportStoreCtrl",function ($scope,$http,dataUrl) {
-    $scope.data={};
-    $http.get(dataUrl)
-        .success(function (data) {
-            $scope.data.products=data;
-        })
-        .error(function(error){
-            $scope.data.error=error;
-        })
-})
+/*! AdminLTE app.js
+ * ================
+ * Main JS application file for AdminLTE v2. This file
+ * should be included in all pages. It controls some layout
+ * options and implements exclusive AdminLTE plugins.
+ *
+ * @Author  Almsaeed Studio
+ * @Support <http://www.almsaeedstudio.com>
+ * @Email   <support@almsaeedstudio.com>
+ * @version 2.3.2
+ * @license MIT <http://opensource.org/licenses/MIT>
+ */
+
+//Make sure jQuery has been loaded before app.js
+if (typeof jQuery === "undefined") {
+  throw new Error("AdminLTE requires jQuery");
+}
+
+/* AdminLTE
+ *
+ * @type Object
+ * @description $.AdminLTE is the main object for the template's app.
+ *              It's used for implementing functions and options related
+ *              to the template. Keeping everything wrapped in an object
+ *              prevents conflict with other plugins and is a better
+ *              way to organize our code.
+ */
+$.AdminLTE = {};
+
+/* --------------------
+ * - AdminLTE Options -
+ * --------------------
+ * Modify these options to suit your implementation
+ */
+$.AdminLTE.options = {
+  //Add slimscroll to navbar menus
+  //This requires you to load the slimscroll plugin
+  //in every page before app.js
+  navbarMenuSlimscroll: true,
+  navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar
+  navbarMenuHeight: "200px", //The height of the inner menu
+  //General animation speed for JS animated elements such as box collapse/expand and
+  //sidebar treeview slide up/down. This options accepts an integer as milliseconds,
+  //'fast', 'normal', or 'slow'
+  animationSpeed: 'fast',
+  //Sidebar push menu toggle button selector
+  sidebarToggleSelector: "[data-toggle='offcanvas']",
+  //Activate sidebar push menu
+  sidebarPushMenu: true,
+  //Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin)
+  sidebarSlimScroll: true,
+  //Enable sidebar expand on hover effect for sidebar mini
+  //This option is forced to true if both the fixed layout and sidebar mini
+  //are used together
+  sidebarExpandOnHover: false,
+  //BoxRefresh Plugin
+  enableBoxRefresh: true,
+  //Bootstrap.js tooltip
+  enableBSToppltip: true,
+  BSTooltipSelector: "[data-toggle='tooltip']",
+  //Enable Fast Click. Fastclick.js creates a more
+  //native touch experience with touch devices. If you
+  //choose to enable the plugin, make sure you load the script
+  //before AdminLTE's app.js
+  enableFastclick: true,
+  //Control Sidebar Options
+  enableControlSidebar: true,
+  controlSidebarOptions: {
+    //Which button should trigger the open/close event
+    toggleBtnSelector: "[data-toggle='control-sidebar']",
+    //The sidebar selector
+    selector: ".control-sidebar",
+    //Enable slide over content
+    slide: true
+  },
+  //Box Widget Plugin. Enable this plugin
+  //to allow boxes to be collapsed and/or removed
+  enableBoxWidget: true,
+  //Box Widget plugin options
+  boxWidgetOptions: {
+    boxWidgetIcons: {
+      //Collapse icon
+      collapse: 'fa-minus',
+      //Open icon
+      open: 'fa-plus',
+      //Remove icon
+      remove: 'fa-times'
+    },
+    boxWidgetSelectors: {
+      //Remove button selector
+      remove: '[data-widget="remove"]',
+      //Collapse button selector
+      collapse: '[data-widget="collapse"]'
+    }
+  },
+  //Direct Chat plugin options
+  directChat: {
+    //Enable direct chat by default
+    enable: true,
+    //The button to open and close the chat contacts pane
+    contactToggleSelector: '[data-widget="chat-pane-toggle"]'
+  },
+  //Define the set of colors to use globally around the website
+  colors: {
+    lightBlue: "#3c8dbc",
+    red: "#f56954",
+    green: "#00a65a",
+    aqua: "#00c0ef",
+    yellow: "#f39c12",
+    blue: "#0073b7",
+    navy: "#001F3F",
+    teal: "#39CCCC",
+    olive: "#3D9970",
+    lime: "#01FF70",
+    orange: "#FF851B",
+    fuchsia: "#F012BE",
+    purple: "#8E24AA",
+    maroon: "#D81B60",
+    black: "#222222",
+    gray: "#d2d6de"
+  },
+  //The standard screen sizes that bootstrap uses.
+  //If you change these in the variables.less file, change
+  //them here too.
+  screenSizes: {
+    xs: 480,
+    sm: 768,
+    md: 992,
+    lg: 1200
+  }
+};
+
+/* ------------------
+ * - Implementation -
+ * ------------------
+ * The next block of code implements AdminLTE's
+ * functions and plugins as specified by the
+ * options above.
+ */
+$(function () {
+  "use strict";
+
+  //Fix for IE page transitions
+  $("body").removeClass("hold-transition");
+
+  //Extend options if external options exist
+  if (typeof AdminLTEOptions !== "undefined") {
+    $.extend(true,
+        $.AdminLTE.options,
+        AdminLTEOptions);
+  }
+
+  //Easy access to options
+  var o = $.AdminLTE.options;
+
+  //Set up the object
+  _init();
+
+  //Activate the layout maker
+  $.AdminLTE.layout.activate();
+
+  //Enable sidebar tree view controls
+  $.AdminLTE.tree('.sidebar');
+
+  //Enable control sidebar
+  if (o.enableControlSidebar) {
+    $.AdminLTE.controlSidebar.activate();
+  }
+
+  //Add slimscroll to navbar dropdown
+  if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
+    $(".navbar .menu").slimscroll({
+      height: o.navbarMenuHeight,
+      alwaysVisible: false,
+      size: o.navbarMenuSlimscrollWidth
+    }).css("width", "100%");
+  }
+
+  //Activate sidebar push menu
+  if (o.sidebarPushMenu) {
+    $.AdminLTE.pushMenu.activate(o.sidebarToggleSelector);
+  }
+
+  //Activate Bootstrap tooltip
+  // if (o.enableBSToppltip) {
+  //   $('body').tooltip({
+  //     selector: o.BSTooltipSelector
+  //   });
+  // }
+
+  //Activate box widget
+  if (o.enableBoxWidget) {
+    $.AdminLTE.boxWidget.activate();
+  }
+
+  //Activate fast click
+  if (o.enableFastclick && typeof FastClick != 'undefined') {
+    FastClick.attach(document.body);
+  }
+
+  //Activate direct chat widget
+  if (o.directChat.enable) {
+    $(document).on('click', o.directChat.contactToggleSelector, function () {
+      var box = $(this).parents('.direct-chat').first();
+      box.toggleClass('direct-chat-contacts-open');
+    });
+  }
+
+  /*
+   * INITIALIZE BUTTON TOGGLE
+   * ------------------------
+   */
+  $('.btn-group[data-toggle="btn-toggle"]').each(function () {
+    var group = $(this);
+    $(this).find(".btn").on('click', function (e) {
+      group.find(".btn.active").removeClass("active");
+      $(this).addClass("active");
+      e.preventDefault();
+    });
+
+  });
+});
+
+/* ----------------------------------
+ * - Initialize the AdminLTE Object -
+ * ----------------------------------
+ * All AdminLTE functions are implemented below.
+ */
+function _init() {
+  'use strict';
+  /* Layout
+   * ======
+   * Fixes the layout height in case min-height fails.
+   *
+   * @type Object
+   * @usage $.AdminLTE.layout.activate()
+   *        $.AdminLTE.layout.fix()
+   *        $.AdminLTE.layout.fixSidebar()
+   */
+  $.AdminLTE.layout = {
+    activate: function () {
+      var _this = this;
+      _this.fix();
+      _this.fixSidebar();
+      $(window, ".wrapper").resize(function () {
+        _this.fix();
+        _this.fixSidebar();
+      });
+    },
+    fix: function () {
+      //Get window height and the wrapper height
+      var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
+      var window_height = $(window).height();
+      var sidebar_height = $(".sidebar").height();
+      //Set the min-height of the content and sidebar based on the
+      //the height of the document.
+      if ($("body").hasClass("fixed")) {
+        $(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight());
+      } else {
+        var postSetWidth;
+        if (window_height >= sidebar_height) {
+          $(".content-wrapper, .right-side").css('min-height', window_height - neg);
+          postSetWidth = window_height - neg;
+        } else {
+          $(".content-wrapper, .right-side").css('min-height', sidebar_height);
+          postSetWidth = sidebar_height;
+        }
+
+        //Fix for the control sidebar height
+        var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector);
+        if (typeof controlSidebar !== "undefined") {
+          if (controlSidebar.height() > postSetWidth)
+            $(".content-wrapper, .right-side").css('min-height', controlSidebar.height());
+        }
+
+      }
+    },
+    fixSidebar: function () {
+      //Make sure the body tag has the .fixed class
+      if (!$("body").hasClass("fixed")) {
+        if (typeof $.fn.slimScroll != 'undefined') {
+          $(".sidebar").slimScroll({destroy: true}).height("auto");
+        }
+        return;
+      } else if (typeof $.fn.slimScroll == 'undefined' && window.console) {
+        window.console.error("Error: the fixed layout requires the slimscroll plugin!");
+      }
+      //Enable slimscroll for fixed layout
+      if ($.AdminLTE.options.sidebarSlimScroll) {
+        if (typeof $.fn.slimScroll != 'undefined') {
+          //Destroy if it exists
+          $(".sidebar").slimScroll({destroy: true}).height("auto");
+          //Add slimscroll
+          $(".sidebar").slimscroll({
+            height: ($(window).height() - $(".main-header").height()) + "px",
+            color: "rgba(0,0,0,0.2)",
+            size: "3px"
+          });
+        }
+      }
+    }
+  };
+
+  /* PushMenu()
+   * ==========
+   * Adds the push menu functionality to the sidebar.
+   *
+   * @type Function
+   * @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
+   */
+  $.AdminLTE.pushMenu = {
+    activate: function (toggleBtn) {
+      //Get the screen sizes
+      var screenSizes = $.AdminLTE.options.screenSizes;
+
+      //Enable sidebar toggle
+      $(document).on('click', toggleBtn, function (e) {
+        e.preventDefault();
+
+        //Enable sidebar push menu
+        if ($(window).width() > (screenSizes.sm - 1)) {
+          if ($("body").hasClass('sidebar-collapse')) {
+            $("body").removeClass('sidebar-collapse').trigger('expanded.pushMenu');
+          } else {
+            $("body").addClass('sidebar-collapse').trigger('collapsed.pushMenu');
+          }
+        }
+        //Handle sidebar push menu for small screens
+        else {
+          if ($("body").hasClass('sidebar-open')) {
+            $("body").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');
+          } else {
+            $("body").addClass('sidebar-open').trigger('expanded.pushMenu');
+          }
+        }
+      });
+
+      $(".content-wrapper").click(function () {
+        //Enable hide menu when clicking on the content-wrapper on small screens
+        if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
+          $("body").removeClass('sidebar-open');
+        }
+      });
+
+      //Enable expand on hover for sidebar mini
+      if ($.AdminLTE.options.sidebarExpandOnHover
+          || ($('body').hasClass('fixed')
+          && $('body').hasClass('sidebar-mini'))) {
+        this.expandOnHover();
+      }
+    },
+    expandOnHover: function () {
+      var _this = this;
+      var screenWidth = $.AdminLTE.options.screenSizes.sm - 1;
+      //Expand sidebar on hover
+      $('.main-sidebar').hover(function () {
+        if ($('body').hasClass('sidebar-mini')
+            && $("body").hasClass('sidebar-collapse')
+            && $(window).width() > screenWidth) {
+          _this.expand();
+        }
+      }, function () {
+        if ($('body').hasClass('sidebar-mini')
+            && $('body').hasClass('sidebar-expanded-on-hover')
+            && $(window).width() > screenWidth) {
+          _this.collapse();
+        }
+      });
+    },
+    expand: function () {
+      $("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');
+    },
+    collapse: function () {
+      if ($('body').hasClass('sidebar-expanded-on-hover')) {
+        $('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse');
+      }
+    }
+  };
+
+  /* Tree()
+   * ======
+   * Converts the sidebar into a multilevel
+   * tree view menu.
+   *
+   * @type Function
+   * @Usage: $.AdminLTE.tree('.sidebar')
+   */
+  $.AdminLTE.tree = function (menu) {
+    var _this = this;
+    var animationSpeed = $.AdminLTE.options.animationSpeed;
+    $(menu).on('click', 'li a', function (e) {
+      //Get the clicked link and the next element
+      var $this = $(this);
+      var checkElement = $this.next();
+
+      //Check if the next element is a menu and is visible
+      if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {
+        //Close the menu
+        checkElement.slideUp(animationSpeed, function () {
+          checkElement.removeClass('menu-open');
+          //Fix the layout in case the sidebar stretches over the height of the window
+          //_this.layout.fix();
+        });
+        checkElement.parent("li").removeClass("active");
+      }
+      //If the menu is not visible
+      else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
+        //Get the parent menu
+        var parent = $this.parents('ul').first();
+        //Close all open menus within the parent
+        var ul = parent.find('ul:visible').slideUp(animationSpeed);
+        //Remove the menu-open class from the parent
+        ul.removeClass('menu-open');
+        //Get the parent li
+        var parent_li = $this.parent("li");
+
+        //Open the target menu and add the menu-open class
+        checkElement.slideDown(animationSpeed, function () {
+          //Add the class active to the parent li
+          checkElement.addClass('menu-open');
+          parent.find('li.active').removeClass('active');
+          parent_li.addClass('active');
+          //Fix the layout in case the sidebar stretches over the height of the window
+          _this.layout.fix();
+        });
+      }
+      //if this isn't a link, prevent the page from being redirected
+      if (checkElement.is('.treeview-menu')) {
+        e.preventDefault();
+      }
+    });
+  };
+
+  /* ControlSidebar
+   * ==============
+   * Adds functionality to the right sidebar
+   *
+   * @type Object
+   * @usage $.AdminLTE.controlSidebar.activate(options)
+   */
+  $.AdminLTE.controlSidebar = {
+    //instantiate the object
+    activate: function () {
+      //Get the object
+      var _this = this;
+      //Update options
+      var o = $.AdminLTE.options.controlSidebarOptions;
+      //Get the sidebar
+      var sidebar = $(o.selector);
+      //The toggle button
+      var btn = $(o.toggleBtnSelector);
+
+      //Listen to the click event
+      btn.on('click', function (e) {
+        e.preventDefault();
+        //If the sidebar is not open
+        if (!sidebar.hasClass('control-sidebar-open')
+            && !$('body').hasClass('control-sidebar-open')) {
+          //Open the sidebar
+          _this.open(sidebar, o.slide);
+        } else {
+          _this.close(sidebar, o.slide);
+        }
+      });
+
+      //If the body has a boxed layout, fix the sidebar bg position
+      var bg = $(".control-sidebar-bg");
+      _this._fix(bg);
+
+      //If the body has a fixed layout, make the control sidebar fixed
+      if ($('body').hasClass('fixed')) {
+        _this._fixForFixed(sidebar);
+      } else {
+        //If the content height is less than the sidebar's height, force max height
+        if ($('.content-wrapper, .right-side').height() < sidebar.height()) {
+          _this._fixForContent(sidebar);
+        }
+      }
+    },
+    //Open the control sidebar
+    open: function (sidebar, slide) {
+      //Slide over content
+      if (slide) {
+        sidebar.addClass('control-sidebar-open');
+      } else {
+        //Push the content by adding the open class to the body instead
+        //of the sidebar itself
+        $('body').addClass('control-sidebar-open');
+      }
+    },
+    //Close the control sidebar
+    close: function (sidebar, slide) {
+      if (slide) {
+        sidebar.removeClass('control-sidebar-open');
+      } else {
+        $('body').removeClass('control-sidebar-open');
+      }
+    },
+    _fix: function (sidebar) {
+      var _this = this;
+      if ($("body").hasClass('layout-boxed')) {
+        sidebar.css('position', 'absolute');
+        sidebar.height($(".wrapper").height());
+        $(window).resize(function () {
+          _this._fix(sidebar);
+        });
+      } else {
+        sidebar.css({
+          'position': 'fixed',
+          'height': 'auto'
+        });
+      }
+    },
+    _fixForFixed: function (sidebar) {
+      sidebar.css({
+        'position': 'fixed',
+        'max-height': '100%',
+        'overflow': 'auto',
+        'padding-bottom': '50px'
+      });
+    },
+    _fixForContent: function (sidebar) {
+      $(".content-wrapper, .right-side").css('min-height', sidebar.height());
+    }
+  };
+
+  /* BoxWidget
+   * =========
+   * BoxWidget is a plugin to handle collapsing and
+   * removing boxes from the screen.
+   *
+   * @type Object
+   * @usage $.AdminLTE.boxWidget.activate()
+   *        Set all your options in the main $.AdminLTE.options object
+   */
+  $.AdminLTE.boxWidget = {
+    selectors: $.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors,
+    icons: $.AdminLTE.options.boxWidgetOptions.boxWidgetIcons,
+    animationSpeed: $.AdminLTE.options.animationSpeed,
+    activate: function (_box) {
+      var _this = this;
+      if (!_box) {
+        _box = document; // activate all boxes per default
+      }
+      //Listen for collapse event triggers
+      $(_box).on('click', _this.selectors.collapse, function (e) {
+        e.preventDefault();
+        _this.collapse($(this));
+      });
+
+      //Listen for remove event triggers
+      $(_box).on('click', _this.selectors.remove, function (e) {
+        e.preventDefault();
+        _this.remove($(this));
+      });
+    },
+    collapse: function (element) {
+      var _this = this;
+      //Find the box parent
+      var box = element.parents(".box").first();
+      //Find the body and the footer
+      var box_content = box.find("> .box-body, > .box-footer, > form  >.box-body, > form > .box-footer");
+      if (!box.hasClass("collapsed-box")) {
+        //Convert minus into plus
+        element.children(":first")
+            .removeClass(_this.icons.collapse)
+            .addClass(_this.icons.open);
+        //Hide the content
+        box_content.slideUp(_this.animationSpeed, function () {
+          box.addClass("collapsed-box");
+        });
+      } else {
+        //Convert plus into minus
+        element.children(":first")
+            .removeClass(_this.icons.open)
+            .addClass(_this.icons.collapse);
+        //Show the content
+        box_content.slideDown(_this.animationSpeed, function () {
+          box.removeClass("collapsed-box");
+        });
+      }
+    },
+    remove: function (element) {
+      //Find the box parent
+      var box = element.parents(".box").first();
+      box.slideUp(this.animationSpeed);
+    }
+  };
+}
+
+/* ------------------
+ * - Custom Plugins -
+ * ------------------
+ * All custom plugins are defined below.
+ */
+
+/*
+ * BOX REFRESH BUTTON
+ * ------------------
+ * This is a custom plugin to use with the component BOX. It allows you to add
+ * a refresh button to the box. It converts the box's state to a loading state.
+ *
+ * @type plugin
+ * @usage $("#box-widget").boxRefresh( options );
+ */
+(function ($) {
+
+  "use strict";
+
+  $.fn.boxRefresh = function (options) {
+
+    // Render options
+    var settings = $.extend({
+      //Refresh button selector
+      trigger: ".refresh-btn",
+      //File source to be loaded (e.g: ajax/src.php)
+      source: "",
+      //Callbacks
+      onLoadStart: function (box) {
+        return box;
+      }, //Right after the button has been clicked
+      onLoadDone: function (box) {
+        return box;
+      } //When the source has been loaded
+
+    }, options);
+
+    //The overlay
+    var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');
+
+    return this.each(function () {
+      //if a source is specified
+      if (settings.source === "") {
+        if (window.console) {
+          window.console.log("Please specify a source first - boxRefresh()");
+        }
+        return;
+      }
+      //the box
+      var box = $(this);
+      //the button
+      var rBtn = box.find(settings.trigger).first();
+
+      //On trigger click
+      rBtn.on('click', function (e) {
+        e.preventDefault();
+        //Add loading overlay
+        start(box);
+
+        //Perform ajax call
+        box.find(".box-body").load(settings.source, function () {
+          done(box);
+        });
+      });
+    });
+
+    function start(box) {
+      //Add overlay and loading img
+      box.append(overlay);
+
+      settings.onLoadStart.call(box);
+    }
+
+    function done(box) {
+      //Remove overlay and loading img
+      box.find(overlay).remove();
+
+      settings.onLoadDone.call(box);
+    }
+
+  };
+
+})(jQuery);
+
+ /*
+ * EXPLICIT BOX CONTROLS
+ * -----------------------
+ * This is a custom plugin to use with the component BOX. It allows you to activate
+ * a box inserted in the DOM after the app.js was loaded, toggle and remove box.
+ *
+ * @type plugin
+ * @usage $("#box-widget").activateBox();
+ * @usage $("#box-widget").toggleBox();
+ * @usage $("#box-widget").removeBox();
+ */
+(function ($) {
+
+  'use strict';
+
+  $.fn.activateBox = function () {
+    $.AdminLTE.boxWidget.activate(this);
+  };
+
+  $.fn.toggleBox = function(){
+    var button = $($.AdminLTE.boxWidget.selectors.collapse, this);
+    $.AdminLTE.boxWidget.collapse(button);
+  };
+
+  $.fn.removeBox = function(){
+    var button = $($.AdminLTE.boxWidget.selectors.remove, this);
+    $.AdminLTE.boxWidget.remove(button);
+  };
+
+})(jQuery);
+
+/*
+ * TODO LIST CUSTOM PLUGIN
+ * -----------------------
+ * This plugin depends on iCheck plugin for checkbox and radio inputs
+ *
+ * @type plugin
+ * @usage $("#todo-widget").todolist( options );
+ */
+(function ($) {
+
+  'use strict';
+
+  $.fn.todolist = function (options) {
+    // Render options
+    var settings = $.extend({
+      //When the user checks the input
+      onCheck: function (ele) {
+        return ele;
+      },
+      //When the user unchecks the input
+      onUncheck: function (ele) {
+        return ele;
+      }
+    }, options);
+
+    return this.each(function () {
+
+      if (typeof $.fn.iCheck != 'undefined') {
+        $('input', this).on('ifChecked', function () {
+          var ele = $(this).parents("li").first();
+          ele.toggleClass("done");
+          settings.onCheck.call(ele);
+        });
+
+        $('input', this).on('ifUnchecked', function () {
+          var ele = $(this).parents("li").first();
+          ele.toggleClass("done");
+          settings.onUncheck.call(ele);
+        });
+      } else {
+        $('input', this).on('change', function () {
+          var ele = $(this).parents("li").first();
+          ele.toggleClass("done");
+          if ($('input', ele).is(":checked")) {
+            settings.onCheck.call(ele);
+          } else {
+            settings.onUncheck.call(ele);
+          }
+        });
+      }
+    });
+  };
+}(jQuery));

+ 0 - 0
donate-console/src/main/webapp/resources/lib/js/app.min.js → donate-console/src/main/webapp/resources/js/app.min.js


+ 202 - 34
donate-console/src/main/webapp/resources/js/index/app.js

@@ -205,7 +205,8 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     app.controller('ProjectListCtrl', ['$scope', '$rootScope', 'toaster', 'ngTableParams', 'BaseService', 'Project', '$modal',
         function ($scope, $rootScope, toaster, ngTableParams, BaseService, Project, $modal) {
             BaseService.scrollBackToTop();
-
+            $rootScope.tree = 'project';
+            $rootScope.thief = 'list';
             var getProjectState = function (active) {
                 var fn = 'getAudited';
                 switch (active) {
@@ -563,9 +564,12 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     /**
      * 机构入驻选择
      */
-    app.controller('SelectInstitutionsNatureCtrl', ['$scope', 'toaster', 'Organization', '$location', 'AuthenticationService',
-        function ($scope, toaster, Organization, $location, AuthenticationService) {
+    app.controller('SelectInstitutionsNatureCtrl', ['$scope', 'toaster', 'Organization', '$location', 'AuthenticationService', 'BaseService', '$rootScope',
+        function ($scope, toaster, Organization, $location, AuthenticationService, BaseService, $rootScope) {
             $scope.loading = true;
+            BaseService.scrollBackToTop();
+            $rootScope.tree = 'user';
+            $rootScope.thief = 'newOrg';
             // 获取当前账户注册机构情况
             AuthenticationService.getAuthentication().success(function (data) {
                 if (data.content) {
@@ -698,9 +702,12 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     /**
      * 机构入驻同意协议
      */
-    app.controller('CertificationStep0Ctrl', ['$scope', 'toaster', 'Organization', '$location', 'AuthenticationService',
-        function ($scope, toaster, Organization, $location, AuthenticationService) {
+    app.controller('CertificationStep0Ctrl', ['$scope', 'toaster', 'Organization', '$location', 'AuthenticationService', 'BaseService', '$rootScope',
+        function ($scope, toaster, Organization, $location, AuthenticationService, BaseService, $rootScope) {
             $scope.loading = true;
+            BaseService.scrollBackToTop();
+            $rootScope.tree = 'user';
+            $rootScope.thief = 'newOrg';
             $scope.checked = true;
             $scope.changeChecked = function() {
                 $scope.checked = !$scope.checked;
@@ -746,6 +753,9 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     app.controller('CertificationStep1Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', '$filter', 'toaster', 'Organization', 'AuthenticationService',
         function ($scope, BaseService, $http, $rootScope, $timeout, $location, $filter, toaster, Organization, AuthenticationService) {
             $scope.loading = true;
+            BaseService.scrollBackToTop();
+            $rootScope.tree = 'user';
+            $rootScope.thief = 'newOrg';
             // 主要领域
             // $scope.areas = ['疾病援助', '扶贫/救灾', '教育/助学' , '环境/动物保护', '其他'];
             $scope.org = {
@@ -861,6 +871,9 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     app.controller('CertificationStep2Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization', 'AuthenticationService',
         function ($scope, BaseService, $http, $rootScope, $timeout, $location, toaster, Organization, AuthenticationService) {
             $scope.loading = true;
+            BaseService.scrollBackToTop();
+            $rootScope.tree = 'user';
+            $rootScope.thief = 'newOrg';
             var orgCopy;
             // 获取当前账户注册机构情况
             AuthenticationService.getAuthentication().success(function (data) {
@@ -938,6 +951,9 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     app.controller('CertificationStep3Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization', 'BaseService', 'AuthenticationService',
         function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization, BaseService, AuthenticationService) {
             $scope.loading = true;
+            BaseService.scrollBackToTop();
+            $rootScope.tree = 'user';
+            $rootScope.thief = 'newOrg';
             var orgCopy;
             // 获取当前账户注册机构情况
             AuthenticationService.getAuthentication().success(function (data) {
@@ -1202,6 +1218,9 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     app.controller('PublicCertificationStep4Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization', 'AuthenticationService',
         function ($scope, BaseService, $http, $rootScope, $timeout, $location, toaster, Organization, AuthenticationService) {
             $scope.loading = true;
+            BaseService.scrollBackToTop();
+            $rootScope.tree = 'user';
+            $rootScope.thief = 'newOrg';
             var orgCopy;
             // 获取当前账户注册机构情况
             AuthenticationService.getAuthentication().success(function (data) {
@@ -1386,7 +1405,10 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
      */
     app.controller('ProjectNewCtrl', ['$scope', 'BaseService', 'Project', '$http', 'toaster', '$stateParams', '$rootScope',
         function($scope, BaseService, Project, $http, toaster, $stateParams, $rootScope) {
-
+        $scope.loading = true;
+        BaseService.scrollBackToTop();
+        $rootScope.tree = 'project';
+        $rootScope.thief = 'new';
         // 默认捐助领域
         $scope.defaultAreas = ['疾病援助', '扶贫/救灾', '教育/助学' , '环境/动物保护', '其他'];
 
@@ -1413,6 +1435,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
             });
 
             Project.getSavedProject({}, {}, function(data) {
+                $scope.loading = false;
                 if(angular.isObject(data)) {
                     $scope.project = data;
                     $scope.pcImgUrl = data.pcImg;
@@ -1424,6 +1447,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
 
             if (!angular.isUndefined($stateParams.id)) {
               Project.getDetailById({id : $stateParams.id}, {}, function(data) {
+                  $scope.loading = false;
                   $scope.project = data;
                   $scope.pcImgUrl = data.pcImg;
                   $scope.mobileImgUrl = data.mobileImg;
@@ -1480,20 +1504,22 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
                 BaseService.scrollBackToTop();
                 return;
             }
-            if (project.startTime == project.endTime) {
-               toaster.pop('info', '项目开始时间与结束时间不能相同,请修改之后再保存');
-            } else {
-                Project.saveBaseInfo({}, project, function(data) {
-                    $scope.project = data;
-                    var proId = $scope.project.id;
-                    if(proId) {
-                        BaseService.scrollBackToTop();
-                        window.location.href = '#/launchProject/detail/' + proId;
-                    }
-                },function(res) {
-                    toaster.pop('error', '出现错误,操作失败');
-                });
-            }
+            // if (project.startTime == project.endTime) {
+            //    toaster.pop('info', '项目开始时间与结束时间不能相同,请修改之后再保存');
+            // } else {
+            $scope.loading = true;
+            Project.saveBaseInfo({}, project, function(data) {
+                $scope.project = data;
+                var proId = $scope.project.id;
+                if(proId) {
+                    $scope.loading = false;
+                    BaseService.scrollBackToTop();
+                    window.location.href = '#/launchProject/detail/' + proId;
+                }
+            },function(res) {
+                toaster.pop('error', '出现错误,操作失败');
+            });
+            // }
         };
 
         // 删除
@@ -1629,7 +1655,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
                 BaseService.scrollBackToTop();
                 return;
             }
-
+            $scope.loading = true;
             var data = new FormData();      //以下为像后台提交图片数据
             data.append('pcImg', $scope.pcImg);
             data.append('mobileImg', $scope.mobileImg);
@@ -1654,6 +1680,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
                 url : url,
                 data: data
             }).success(function (data) {
+                $scope.loading = false;
                 if (type) {
                     toaster.pop('success', '发布成功');
                     $rootScope.active = 'unaudited';
@@ -1674,9 +1701,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     /**
      * 财务披露项目列表
      */
-    app.controller('ProjectFinanceListCtrl', ['$scope', 'toaster', 'ngTableParams', 'BaseService', 'Project', '$modal',
-        function ($scope, toaster, ngTableParams, BaseService, Project, $modal) {
-
+    app.controller('ProjectFinanceListCtrl', ['$scope', 'toaster', 'ngTableParams', 'BaseService', 'Project', '$modal', '$rootScope',
+        function ($scope, toaster, ngTableParams, BaseService, Project, $modal, $rootScope) {
+            BaseService.scrollBackToTop();
+            $rootScope.tree = 'project';
+            $rootScope.thief = 'finance';
             $scope.keyword = '';
 
             $scope.reload = function() {
@@ -1753,9 +1782,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     /**
      * 财务披露详情框
      */
-    app.controller('ProjectFinanceDetailCtrl', ['$scope', 'Project', 'toaster', '$modalInstance', 'BaseService', 'id', '$upload', '$http',
-        function($scope, Project, toaster, $modalInstance, BaseService, id, $upload, $http) {
-
+    app.controller('ProjectFinanceDetailCtrl', ['$scope', 'Project', 'toaster', '$modalInstance', 'BaseService', 'id', '$upload', '$http', '$rootScope',
+        function($scope, Project, toaster, $modalInstance, BaseService, id, $upload, $http, $rootScope) {
+            BaseService.scrollBackToTop();
+            $rootScope.tree = 'project';
+            $rootScope.thief = 'report';
             $scope.newFinance = {
                 amount: null,
                 path: null,
@@ -1865,9 +1896,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     /**
      * 报告填写项目列表
      */
-    app.controller('ProjectReportListCtrl', ['$scope', 'toaster', 'ngTableParams', 'BaseService', 'Project', '$modal', '$http',
-        function ($scope, toaster, ngTableParams, BaseService, Project, $modal, $http) {
-
+    app.controller('ProjectReportListCtrl', ['$scope', 'toaster', 'ngTableParams', 'BaseService', 'Project', '$modal', '$rootScope',
+        function ($scope, toaster, ngTableParams, BaseService, Project, $modal, $rootScope) {
+            BaseService.scrollBackToTop();
+            $rootScope.tree = 'project';
+            $rootScope.thief = 'manage';
             $scope.keyword = '';
             $scope.selectedArea = '全部';
 
@@ -2164,6 +2197,8 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     app.controller('ActivityListCtrl', ['$scope', '$rootScope', 'toaster', 'ngTableParams', 'BaseService', 'Activity', '$modal',
         function ($scope, $rootScope, toaster, ngTableParams, BaseService, Activity, $modal) {
             BaseService.scrollBackToTop();
+            $rootScope.tree = 'activity';
+            $rootScope.thief = 'list';
 
             var getActivityState = function (active) {
                 // 正在进行
@@ -2328,9 +2363,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     /**
      * 活动发起
      */
-    app.controller('ActivityNewCtrl', ['$scope', 'BaseService', 'toaster', 'Activity', '$http', '$upload',
-        function($scope, BaseService, toaster, Activity, $http, $upload) {
-
+    app.controller('ActivityNewCtrl', ['$scope', 'BaseService', 'toaster', 'Activity', '$http', '$upload', '$rootScope',
+        function($scope, BaseService, toaster, Activity, $http, $upload, $rootScope) {
+        BaseService.scrollBackToTop();
+        $rootScope.tree = 'activity';
+        $rootScope.thief = 'new';
         $scope.loading = true;
         $scope.activity = {
             awards:[],
@@ -2727,7 +2764,9 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
      */
     app.controller('OrgListCtrl', ['$scope', '$rootScope', 'toaster', 'ngTableParams', 'BaseService', 'Organization', '$modal',
         function ($scope, $rootScope, toaster, ngTableParams, BaseService, Organization, $modal) {
-
+            BaseService.scrollBackToTop();
+            $rootScope.tree = 'user';
+            $rootScope.thief = 'organization';
             var getOrgState = function (active) {
                 var fn = 'getAudited';
                 switch (active) {
@@ -2928,5 +2967,134 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
         };
     }]);
 
+    /**
+     * 用户列表
+     */
+    app.controller('UserListCtrl', ['$scope', '$rootScope', 'toaster', 'ngTableParams', 'BaseService', 'User', '$modal',
+        function ($scope, $rootScope, toaster, ngTableParams, BaseService, User, $modal) {
+            BaseService.scrollBackToTop();
+            $rootScope.tree = 'user';
+            $rootScope.thief = 'userList';
+            // var getOrgState = function (active) {
+            //     var fn = 'getAudited';
+            //     switch (active) {
+            //         // 已审核
+            //         case 'audited':
+            //             fn = 'getAudited';
+            //             break;
+            //         // 未审核
+            //         case 'unaudited':
+            //             fn = 'getUnaudited';
+            //             break;
+            //         // 未通过
+            //         case 'disagreed':
+            //             fn = 'getDisagreed';
+            //             break;
+            //     }
+            //     return fn;
+            // };
+            //
+            // $scope.active = 'done';
+            // if ($rootScope.active) {
+            //     $scope.active = $rootScope.active;
+            // }
+            // $scope.keyword = '';
+            //
+            // /**
+            //  * 修改分类
+            //  * @param value
+            //  */
+            // $scope.setActive = function (value) {
+            //     if ($scope.active != value) {
+            //         $scope.active = value;
+            //         if ($scope.orgParams.page() == 1)
+            //             $scope.orgParams.reload();
+            //         else
+            //             $scope.orgParams.page(1);
+            //     }
+            // };
+            //
+            // $scope.reload = function() {
+            //     if ($scope.orgParams.page() == 1)
+            //         $scope.orgParams.reload();
+            //     else
+            //         $scope.orgParams.page(1);
+            // };
+            //
+            // $scope.orgParams = new ngTableParams({
+            //     page: 1,
+            //     count: 5,
+            //     sorting: {
+            //         'id': 'desc'
+            //     }
+            // }, {
+            //     total: 0,
+            //     counts: [5, 10, 25, 50],
+            //     getData: function ($defer, params) {
+            //         $scope.loading = true;
+            //         var pageParams = params.url();
+            //         var realActive = {};
+            //         pageParams.searchFilter = { // 筛选条件
+            //             keyword: $scope.keyword,
+            //             area: $scope.selectedArea,
+            //             type: $scope.selectedType
+            //         };
+            //         Organization[getOrgState($scope.active)].call(null, BaseService.parseParams(pageParams), function (page) {
+            //             $scope.loading = false;
+            //             if (page) {
+            //                 params.total(page.totalElements);
+            //                 $defer.resolve(page.content);
+            //                 // $scope.keywordXls = angular.copy($scope.keyword); // 保存当前取值的关键词  做导出时需要的字段
+            //             }
+            //         }, function (response) {
+            //             $scope.loading = false;
+            //             toaster.pop('error', '数据加载失败', response.data);
+            //         });
+            //     }
+            // });
+            //
+            // $scope.onSearch = function () {
+            //     if ($scope.orgParams.page() == 1)
+            //         $scope.orgParams.reload();
+            //     else
+            //         $scope.orgParams.page(1);
+            // };
+            //
+            // var getNum = function() {
+            //     Organization.getOrgsNum({}, {}, function(data) {
+            //         $scope.auditedNum = data.auditedNum;
+            //         $scope.unauditedNum = data.unauditedNum;
+            //         $scope.disagreedNum = data.disagreedNum;
+            //     });
+            // };
+            // getNum();
+            //
+            // // 弹出详情页模态框
+            // $scope.showDetail = function (id) {
+            //     var modalInstance = $modal.open({
+            //         templateUrl: 'static/view/user/organization_detail.html',
+            //         controller: 'OrgDetailCtrl',
+            //         size: 'lg',
+            //         resolve: {
+            //             id: function () {
+            //                 return id;
+            //             }
+            //         }
+            //     });
+            //
+            //     modalInstance.result.then(function(data){
+            //         if (data.success) {
+            //             toaster.pop('success', '操作成功');
+            //         }
+            //         $scope.orgParams.reload();
+            //     }, function(){
+            //
+            //     });
+            //
+            // };
+
+
+        }]);
+
     return app;
 });

+ 1 - 1
donate-console/src/main/webapp/resources/js/index/services/Organization.js

@@ -44,7 +44,7 @@ define ([ 'ngResource' ], function() {
             },
             // 获取各种类机构数目
             getOrgsNum: {
-                url: 'org/getOrgNums',
+                url: 'org/getOrgsNum',
                 method: 'GET'
             }
         });

+ 0 - 758
donate-console/src/main/webapp/resources/lib/js/app.js

@@ -1,758 +0,0 @@
-/*! AdminLTE app.js
- * ================
- * Main JS application file for AdminLTE v2. This file
- * should be included in all pages. It controls some layout
- * options and implements exclusive AdminLTE plugins.
- *
- * @Author  Almsaeed Studio
- * @Support <http://www.almsaeedstudio.com>
- * @Email   <support@almsaeedstudio.com>
- * @version 2.3.2
- * @license MIT <http://opensource.org/licenses/MIT>
- */
-
-//Make sure jQuery has been loaded before app.js
-if (typeof jQuery === "undefined") {
-  throw new Error("AdminLTE requires jQuery");
-}
-
-/* AdminLTE
- *
- * @type Object
- * @description $.AdminLTE is the main object for the template's app.
- *              It's used for implementing functions and options related
- *              to the template. Keeping everything wrapped in an object
- *              prevents conflict with other plugins and is a better
- *              way to organize our code.
- */
-$.AdminLTE = {};
-
-/* --------------------
- * - AdminLTE Options -
- * --------------------
- * Modify these options to suit your implementation
- */
-$.AdminLTE.options = {
-  //Add slimscroll to navbar menus
-  //This requires you to load the slimscroll plugin
-  //in every page before app.js
-  navbarMenuSlimscroll: true,
-  navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar
-  navbarMenuHeight: "200px", //The height of the inner menu
-  //General animation speed for JS animated elements such as box collapse/expand and
-  //sidebar treeview slide up/down. This options accepts an integer as milliseconds,
-  //'fast', 'normal', or 'slow'
-  animationSpeed: 'fast',
-  //Sidebar push menu toggle button selector
-  sidebarToggleSelector: "[data-toggle='offcanvas']",
-  //Activate sidebar push menu
-  sidebarPushMenu: true,
-  //Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin)
-  sidebarSlimScroll: true,
-  //Enable sidebar expand on hover effect for sidebar mini
-  //This option is forced to true if both the fixed layout and sidebar mini
-  //are used together
-  sidebarExpandOnHover: false,
-  //BoxRefresh Plugin
-  enableBoxRefresh: true,
-  //Bootstrap.js tooltip
-  enableBSToppltip: true,
-  BSTooltipSelector: "[data-toggle='tooltip']",
-  //Enable Fast Click. Fastclick.js creates a more
-  //native touch experience with touch devices. If you
-  //choose to enable the plugin, make sure you load the script
-  //before AdminLTE's app.js
-  enableFastclick: true,
-  //Control Sidebar Options
-  enableControlSidebar: true,
-  controlSidebarOptions: {
-    //Which button should trigger the open/close event
-    toggleBtnSelector: "[data-toggle='control-sidebar']",
-    //The sidebar selector
-    selector: ".control-sidebar",
-    //Enable slide over content
-    slide: true
-  },
-  //Box Widget Plugin. Enable this plugin
-  //to allow boxes to be collapsed and/or removed
-  enableBoxWidget: true,
-  //Box Widget plugin options
-  boxWidgetOptions: {
-    boxWidgetIcons: {
-      //Collapse icon
-      collapse: 'fa-minus',
-      //Open icon
-      open: 'fa-plus',
-      //Remove icon
-      remove: 'fa-times'
-    },
-    boxWidgetSelectors: {
-      //Remove button selector
-      remove: '[data-widget="remove"]',
-      //Collapse button selector
-      collapse: '[data-widget="collapse"]'
-    }
-  },
-  //Direct Chat plugin options
-  directChat: {
-    //Enable direct chat by default
-    enable: true,
-    //The button to open and close the chat contacts pane
-    contactToggleSelector: '[data-widget="chat-pane-toggle"]'
-  },
-  //Define the set of colors to use globally around the website
-  colors: {
-    lightBlue: "#3c8dbc",
-    red: "#f56954",
-    green: "#00a65a",
-    aqua: "#00c0ef",
-    yellow: "#f39c12",
-    blue: "#0073b7",
-    navy: "#001F3F",
-    teal: "#39CCCC",
-    olive: "#3D9970",
-    lime: "#01FF70",
-    orange: "#FF851B",
-    fuchsia: "#F012BE",
-    purple: "#8E24AA",
-    maroon: "#D81B60",
-    black: "#222222",
-    gray: "#d2d6de"
-  },
-  //The standard screen sizes that bootstrap uses.
-  //If you change these in the variables.less file, change
-  //them here too.
-  screenSizes: {
-    xs: 480,
-    sm: 768,
-    md: 992,
-    lg: 1200
-  }
-};
-
-/* ------------------
- * - Implementation -
- * ------------------
- * The next block of code implements AdminLTE's
- * functions and plugins as specified by the
- * options above.
- */
-$(function () {
-  "use strict";
-
-  //Fix for IE page transitions
-  $("body").removeClass("hold-transition");
-
-  //Extend options if external options exist
-  if (typeof AdminLTEOptions !== "undefined") {
-    $.extend(true,
-        $.AdminLTE.options,
-        AdminLTEOptions);
-  }
-
-  //Easy access to options
-  var o = $.AdminLTE.options;
-
-  //Set up the object
-  _init();
-
-  //Activate the layout maker
-  $.AdminLTE.layout.activate();
-
-  //Enable sidebar tree view controls
-  $.AdminLTE.tree('.sidebar');
-
-  //Enable control sidebar
-  if (o.enableControlSidebar) {
-    $.AdminLTE.controlSidebar.activate();
-  }
-
-  //Add slimscroll to navbar dropdown
-  if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
-    $(".navbar .menu").slimscroll({
-      height: o.navbarMenuHeight,
-      alwaysVisible: false,
-      size: o.navbarMenuSlimscrollWidth
-    }).css("width", "100%");
-  }
-
-  //Activate sidebar push menu
-  if (o.sidebarPushMenu) {
-    $.AdminLTE.pushMenu.activate(o.sidebarToggleSelector);
-  }
-
-  //Activate Bootstrap tooltip
-  if (o.enableBSToppltip) {
-    $('body').tooltip({
-      selector: o.BSTooltipSelector
-    });
-  }
-
-  //Activate box widget
-  if (o.enableBoxWidget) {
-    $.AdminLTE.boxWidget.activate();
-  }
-
-  //Activate fast click
-  if (o.enableFastclick && typeof FastClick != 'undefined') {
-    FastClick.attach(document.body);
-  }
-
-  //Activate direct chat widget
-  if (o.directChat.enable) {
-    $(document).on('click', o.directChat.contactToggleSelector, function () {
-      var box = $(this).parents('.direct-chat').first();
-      box.toggleClass('direct-chat-contacts-open');
-    });
-  }
-
-  /*
-   * INITIALIZE BUTTON TOGGLE
-   * ------------------------
-   */
-  $('.btn-group[data-toggle="btn-toggle"]').each(function () {
-    var group = $(this);
-    $(this).find(".btn").on('click', function (e) {
-      group.find(".btn.active").removeClass("active");
-      $(this).addClass("active");
-      e.preventDefault();
-    });
-
-  });
-});
-
-/* ----------------------------------
- * - Initialize the AdminLTE Object -
- * ----------------------------------
- * All AdminLTE functions are implemented below.
- */
-function _init() {
-  'use strict';
-  /* Layout
-   * ======
-   * Fixes the layout height in case min-height fails.
-   *
-   * @type Object
-   * @usage $.AdminLTE.layout.activate()
-   *        $.AdminLTE.layout.fix()
-   *        $.AdminLTE.layout.fixSidebar()
-   */
-  $.AdminLTE.layout = {
-    activate: function () {
-      var _this = this;
-      _this.fix();
-      _this.fixSidebar();
-      $(window, ".wrapper").resize(function () {
-        _this.fix();
-        _this.fixSidebar();
-      });
-    },
-    fix: function () {
-      //Get window height and the wrapper height
-      var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
-      var window_height = $(window).height();
-      var sidebar_height = $(".sidebar").height();
-      //Set the min-height of the content and sidebar based on the
-      //the height of the document.
-      if ($("body").hasClass("fixed")) {
-        $(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight());
-      } else {
-        var postSetWidth;
-        if (window_height >= sidebar_height) {
-          $(".content-wrapper, .right-side").css('min-height', window_height - neg);
-          postSetWidth = window_height - neg;
-        } else {
-          $(".content-wrapper, .right-side").css('min-height', sidebar_height);
-          postSetWidth = sidebar_height;
-        }
-
-        //Fix for the control sidebar height
-        var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector);
-        if (typeof controlSidebar !== "undefined") {
-          if (controlSidebar.height() > postSetWidth)
-            $(".content-wrapper, .right-side").css('min-height', controlSidebar.height());
-        }
-
-      }
-    },
-    fixSidebar: function () {
-      //Make sure the body tag has the .fixed class
-      if (!$("body").hasClass("fixed")) {
-        if (typeof $.fn.slimScroll != 'undefined') {
-          $(".sidebar").slimScroll({destroy: true}).height("auto");
-        }
-        return;
-      } else if (typeof $.fn.slimScroll == 'undefined' && window.console) {
-        window.console.error("Error: the fixed layout requires the slimscroll plugin!");
-      }
-      //Enable slimscroll for fixed layout
-      if ($.AdminLTE.options.sidebarSlimScroll) {
-        if (typeof $.fn.slimScroll != 'undefined') {
-          //Destroy if it exists
-          $(".sidebar").slimScroll({destroy: true}).height("auto");
-          //Add slimscroll
-          $(".sidebar").slimscroll({
-            height: ($(window).height() - $(".main-header").height()) + "px",
-            color: "rgba(0,0,0,0.2)",
-            size: "3px"
-          });
-        }
-      }
-    }
-  };
-
-  /* PushMenu()
-   * ==========
-   * Adds the push menu functionality to the sidebar.
-   *
-   * @type Function
-   * @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
-   */
-  $.AdminLTE.pushMenu = {
-    activate: function (toggleBtn) {
-      //Get the screen sizes
-      var screenSizes = $.AdminLTE.options.screenSizes;
-
-      //Enable sidebar toggle
-      $(document).on('click', toggleBtn, function (e) {
-        e.preventDefault();
-
-        //Enable sidebar push menu
-        if ($(window).width() > (screenSizes.sm - 1)) {
-          if ($("body").hasClass('sidebar-collapse')) {
-            $("body").removeClass('sidebar-collapse').trigger('expanded.pushMenu');
-          } else {
-            $("body").addClass('sidebar-collapse').trigger('collapsed.pushMenu');
-          }
-        }
-        //Handle sidebar push menu for small screens
-        else {
-          if ($("body").hasClass('sidebar-open')) {
-            $("body").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');
-          } else {
-            $("body").addClass('sidebar-open').trigger('expanded.pushMenu');
-          }
-        }
-      });
-
-      $(".content-wrapper").click(function () {
-        //Enable hide menu when clicking on the content-wrapper on small screens
-        if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
-          $("body").removeClass('sidebar-open');
-        }
-      });
-
-      //Enable expand on hover for sidebar mini
-      if ($.AdminLTE.options.sidebarExpandOnHover
-          || ($('body').hasClass('fixed')
-          && $('body').hasClass('sidebar-mini'))) {
-        this.expandOnHover();
-      }
-    },
-    expandOnHover: function () {
-      var _this = this;
-      var screenWidth = $.AdminLTE.options.screenSizes.sm - 1;
-      //Expand sidebar on hover
-      $('.main-sidebar').hover(function () {
-        if ($('body').hasClass('sidebar-mini')
-            && $("body").hasClass('sidebar-collapse')
-            && $(window).width() > screenWidth) {
-          _this.expand();
-        }
-      }, function () {
-        if ($('body').hasClass('sidebar-mini')
-            && $('body').hasClass('sidebar-expanded-on-hover')
-            && $(window).width() > screenWidth) {
-          _this.collapse();
-        }
-      });
-    },
-    expand: function () {
-      $("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');
-    },
-    collapse: function () {
-      if ($('body').hasClass('sidebar-expanded-on-hover')) {
-        $('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse');
-      }
-    }
-  };
-
-  /* Tree()
-   * ======
-   * Converts the sidebar into a multilevel
-   * tree view menu.
-   *
-   * @type Function
-   * @Usage: $.AdminLTE.tree('.sidebar')
-   */
-  $.AdminLTE.tree = function (menu) {
-    var _this = this;
-    var animationSpeed = $.AdminLTE.options.animationSpeed;
-    $(menu).on('click', 'li a', function (e) {
-      //Get the clicked link and the next element
-      var $this = $(this);
-      var checkElement = $this.next();
-
-      //Check if the next element is a menu and is visible
-      if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {
-        //Close the menu
-        checkElement.slideUp(animationSpeed, function () {
-          checkElement.removeClass('menu-open');
-          //Fix the layout in case the sidebar stretches over the height of the window
-          //_this.layout.fix();
-        });
-        checkElement.parent("li").removeClass("active");
-      }
-      //If the menu is not visible
-      else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
-        //Get the parent menu
-        var parent = $this.parents('ul').first();
-        //Close all open menus within the parent
-        var ul = parent.find('ul:visible').slideUp(animationSpeed);
-        //Remove the menu-open class from the parent
-        ul.removeClass('menu-open');
-        //Get the parent li
-        var parent_li = $this.parent("li");
-
-        //Open the target menu and add the menu-open class
-        checkElement.slideDown(animationSpeed, function () {
-          //Add the class active to the parent li
-          checkElement.addClass('menu-open');
-          parent.find('li.active').removeClass('active');
-          parent_li.addClass('active');
-          //Fix the layout in case the sidebar stretches over the height of the window
-          _this.layout.fix();
-        });
-      }
-      //if this isn't a link, prevent the page from being redirected
-      if (checkElement.is('.treeview-menu')) {
-        e.preventDefault();
-      }
-    });
-  };
-
-  /* ControlSidebar
-   * ==============
-   * Adds functionality to the right sidebar
-   *
-   * @type Object
-   * @usage $.AdminLTE.controlSidebar.activate(options)
-   */
-  $.AdminLTE.controlSidebar = {
-    //instantiate the object
-    activate: function () {
-      //Get the object
-      var _this = this;
-      //Update options
-      var o = $.AdminLTE.options.controlSidebarOptions;
-      //Get the sidebar
-      var sidebar = $(o.selector);
-      //The toggle button
-      var btn = $(o.toggleBtnSelector);
-
-      //Listen to the click event
-      btn.on('click', function (e) {
-        e.preventDefault();
-        //If the sidebar is not open
-        if (!sidebar.hasClass('control-sidebar-open')
-            && !$('body').hasClass('control-sidebar-open')) {
-          //Open the sidebar
-          _this.open(sidebar, o.slide);
-        } else {
-          _this.close(sidebar, o.slide);
-        }
-      });
-
-      //If the body has a boxed layout, fix the sidebar bg position
-      var bg = $(".control-sidebar-bg");
-      _this._fix(bg);
-
-      //If the body has a fixed layout, make the control sidebar fixed
-      if ($('body').hasClass('fixed')) {
-        _this._fixForFixed(sidebar);
-      } else {
-        //If the content height is less than the sidebar's height, force max height
-        if ($('.content-wrapper, .right-side').height() < sidebar.height()) {
-          _this._fixForContent(sidebar);
-        }
-      }
-    },
-    //Open the control sidebar
-    open: function (sidebar, slide) {
-      //Slide over content
-      if (slide) {
-        sidebar.addClass('control-sidebar-open');
-      } else {
-        //Push the content by adding the open class to the body instead
-        //of the sidebar itself
-        $('body').addClass('control-sidebar-open');
-      }
-    },
-    //Close the control sidebar
-    close: function (sidebar, slide) {
-      if (slide) {
-        sidebar.removeClass('control-sidebar-open');
-      } else {
-        $('body').removeClass('control-sidebar-open');
-      }
-    },
-    _fix: function (sidebar) {
-      var _this = this;
-      if ($("body").hasClass('layout-boxed')) {
-        sidebar.css('position', 'absolute');
-        sidebar.height($(".wrapper").height());
-        $(window).resize(function () {
-          _this._fix(sidebar);
-        });
-      } else {
-        sidebar.css({
-          'position': 'fixed',
-          'height': 'auto'
-        });
-      }
-    },
-    _fixForFixed: function (sidebar) {
-      sidebar.css({
-        'position': 'fixed',
-        'max-height': '100%',
-        'overflow': 'auto',
-        'padding-bottom': '50px'
-      });
-    },
-    _fixForContent: function (sidebar) {
-      $(".content-wrapper, .right-side").css('min-height', sidebar.height());
-    }
-  };
-
-  /* BoxWidget
-   * =========
-   * BoxWidget is a plugin to handle collapsing and
-   * removing boxes from the screen.
-   *
-   * @type Object
-   * @usage $.AdminLTE.boxWidget.activate()
-   *        Set all your options in the main $.AdminLTE.options object
-   */
-  $.AdminLTE.boxWidget = {
-    selectors: $.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors,
-    icons: $.AdminLTE.options.boxWidgetOptions.boxWidgetIcons,
-    animationSpeed: $.AdminLTE.options.animationSpeed,
-    activate: function (_box) {
-      var _this = this;
-      if (!_box) {
-        _box = document; // activate all boxes per default
-      }
-      //Listen for collapse event triggers
-      $(_box).on('click', _this.selectors.collapse, function (e) {
-        e.preventDefault();
-        _this.collapse($(this));
-      });
-
-      //Listen for remove event triggers
-      $(_box).on('click', _this.selectors.remove, function (e) {
-        e.preventDefault();
-        _this.remove($(this));
-      });
-    },
-    collapse: function (element) {
-      var _this = this;
-      //Find the box parent
-      var box = element.parents(".box").first();
-      //Find the body and the footer
-      var box_content = box.find("> .box-body, > .box-footer, > form  >.box-body, > form > .box-footer");
-      if (!box.hasClass("collapsed-box")) {
-        //Convert minus into plus
-        element.children(":first")
-            .removeClass(_this.icons.collapse)
-            .addClass(_this.icons.open);
-        //Hide the content
-        box_content.slideUp(_this.animationSpeed, function () {
-          box.addClass("collapsed-box");
-        });
-      } else {
-        //Convert plus into minus
-        element.children(":first")
-            .removeClass(_this.icons.open)
-            .addClass(_this.icons.collapse);
-        //Show the content
-        box_content.slideDown(_this.animationSpeed, function () {
-          box.removeClass("collapsed-box");
-        });
-      }
-    },
-    remove: function (element) {
-      //Find the box parent
-      var box = element.parents(".box").first();
-      box.slideUp(this.animationSpeed);
-    }
-  };
-}
-
-/* ------------------
- * - Custom Plugins -
- * ------------------
- * All custom plugins are defined below.
- */
-
-/*
- * BOX REFRESH BUTTON
- * ------------------
- * This is a custom plugin to use with the component BOX. It allows you to add
- * a refresh button to the box. It converts the box's state to a loading state.
- *
- * @type plugin
- * @usage $("#box-widget").boxRefresh( options );
- */
-(function ($) {
-
-  "use strict";
-
-  $.fn.boxRefresh = function (options) {
-
-    // Render options
-    var settings = $.extend({
-      //Refresh button selector
-      trigger: ".refresh-btn",
-      //File source to be loaded (e.g: ajax/src.php)
-      source: "",
-      //Callbacks
-      onLoadStart: function (box) {
-        return box;
-      }, //Right after the button has been clicked
-      onLoadDone: function (box) {
-        return box;
-      } //When the source has been loaded
-
-    }, options);
-
-    //The overlay
-    var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');
-
-    return this.each(function () {
-      //if a source is specified
-      if (settings.source === "") {
-        if (window.console) {
-          window.console.log("Please specify a source first - boxRefresh()");
-        }
-        return;
-      }
-      //the box
-      var box = $(this);
-      //the button
-      var rBtn = box.find(settings.trigger).first();
-
-      //On trigger click
-      rBtn.on('click', function (e) {
-        e.preventDefault();
-        //Add loading overlay
-        start(box);
-
-        //Perform ajax call
-        box.find(".box-body").load(settings.source, function () {
-          done(box);
-        });
-      });
-    });
-
-    function start(box) {
-      //Add overlay and loading img
-      box.append(overlay);
-
-      settings.onLoadStart.call(box);
-    }
-
-    function done(box) {
-      //Remove overlay and loading img
-      box.find(overlay).remove();
-
-      settings.onLoadDone.call(box);
-    }
-
-  };
-
-})(jQuery);
-
- /*
- * EXPLICIT BOX CONTROLS
- * -----------------------
- * This is a custom plugin to use with the component BOX. It allows you to activate
- * a box inserted in the DOM after the app.js was loaded, toggle and remove box.
- *
- * @type plugin
- * @usage $("#box-widget").activateBox();
- * @usage $("#box-widget").toggleBox();
- * @usage $("#box-widget").removeBox();
- */
-(function ($) {
-
-  'use strict';
-
-  $.fn.activateBox = function () {
-    $.AdminLTE.boxWidget.activate(this);
-  };
-
-  $.fn.toggleBox = function(){
-    var button = $($.AdminLTE.boxWidget.selectors.collapse, this);
-    $.AdminLTE.boxWidget.collapse(button);
-  };
-
-  $.fn.removeBox = function(){
-    var button = $($.AdminLTE.boxWidget.selectors.remove, this);
-    $.AdminLTE.boxWidget.remove(button);
-  };
-
-})(jQuery);
-
-/*
- * TODO LIST CUSTOM PLUGIN
- * -----------------------
- * This plugin depends on iCheck plugin for checkbox and radio inputs
- *
- * @type plugin
- * @usage $("#todo-widget").todolist( options );
- */
-(function ($) {
-
-  'use strict';
-
-  $.fn.todolist = function (options) {
-    // Render options
-    var settings = $.extend({
-      //When the user checks the input
-      onCheck: function (ele) {
-        return ele;
-      },
-      //When the user unchecks the input
-      onUncheck: function (ele) {
-        return ele;
-      }
-    }, options);
-
-    return this.each(function () {
-
-      if (typeof $.fn.iCheck != 'undefined') {
-        $('input', this).on('ifChecked', function () {
-          var ele = $(this).parents("li").first();
-          ele.toggleClass("done");
-          settings.onCheck.call(ele);
-        });
-
-        $('input', this).on('ifUnchecked', function () {
-          var ele = $(this).parents("li").first();
-          ele.toggleClass("done");
-          settings.onUncheck.call(ele);
-        });
-      } else {
-        $('input', this).on('change', function () {
-          var ele = $(this).parents("li").first();
-          ele.toggleClass("done");
-          if ($('input', ele).is(":checked")) {
-            settings.onCheck.call(ele);
-          } else {
-            settings.onUncheck.call(ele);
-          }
-        });
-      }
-    });
-  };
-}(jQuery));

+ 7 - 5
donate-console/src/main/webapp/resources/view/activity/activity_launch.html

@@ -17,7 +17,7 @@
         background: #ffffff;
         margin-bottom: 20px;
         width: 100%;
-        min-height: 1700px;
+        /*min-height: 1700px;*/
         border: 1px solid #dcdcdc;
         box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
     }
@@ -754,10 +754,12 @@
                         <div class="prise fl">
                             <div class="prise-list" ng-repeat="award in awards">
                                 <div class="prise-detail">
-                                    <div class="award"> <input type="text" ng-model="award.awardName" class="activePrice"></div>
+                                    <div class="award"> <input type="text" ng-model="award.awardName" ng-class="{'showEmpty' : submited && !award.awardName}" class="activePrice">
+                                    </div>
                                     <span>{{$index + 1}}</span>
                                     <a ng-click="deleteAward($index)">删除</a>
                                 </div>
+                                <span class="error" ng-show="submited && !award.awardName">*活动奖品的名称不能为空</span>
                                 <div class="award-detail clearfix">
                                     <span class="fl">简介</span>
                                     <input type="text" ng-model="award.awardSummary" maxlength="100" class="fl form-control" required
@@ -768,7 +770,7 @@
                                 <div class="award-detail clearfix">
                                     <span class="fl">数量</span>
                                     <input ng-pattern="/^[1-9]\d*$/" type="text" name="awardAmount" ng-model="award.amount" class="fl form-control" required
-                                           ng-class="{'showEmpty' : submited && activityForm.awardAmount.$error.required}"/>
+                                           ng-class="{'showEmpty': submited && activityForm.awardAmount.$error.required || submited && activityForm.awardAmount.$error.pattern}"/>
 
                                     <span class="error" ng-show="submited && activityForm.awardAmount.$error.required">*活动奖品的数量不能为空</span>
                                     <span class="error" ng-show="submited && activityForm.awardAmount.$error.pattern">*活动奖品的数量不正确</span>
@@ -776,7 +778,7 @@
                                 <div class="award-detail clearfix">
                                     <span class="fl">奖品等级</span>
                                     <input type="text" ng-model="award.awardLevel" maxlength="10" class="fl form-control" required
-                                                       ng-class="{'showEmpty' : submited && !award.awardLevel}"/>
+                                                       ng-class="{'showEmpty': submited && !award.awardLevel}"/>
 
                                     <span class="error" ng-show="submited && !award.awardLevel">*活动奖品的奖品等级不能为空</span>
                                 </div>
@@ -820,7 +822,7 @@
                             <div class="add-project" data-target="#setting" data-toggle="modal">
                                 <span>+选择项目</span>
                             </div>
-                            <div class="button">
+                            <div class="button" style="margin: 30px 0;">
                                 <button ng-click="submit(true, activityForm.$invalid || !activity.summary || !actImgUrl ||
                                 !bannerUrl || !awards || !selectedProjects)" class="launch">发布</button>
                                 <button ng-click="submit(false)" ng-disabled="!activityForm.$dirty" class="draft">存为草稿</button>

+ 1 - 1
donate-console/src/main/webapp/resources/view/project/project_detail.html

@@ -14,7 +14,7 @@
     <!--<div class="container">-->
     <div class="right-header clearfix">
         <div class="fl"><span ng-bind="project.name"></span>
-            <a href="lj.ubtob.com/project#/detail/{{project.id}}" target="_blank" ng-if="project.status== 1">查看网页</a>
+            <a href="http://lj.ubtob.com/project#/detail/{{project.id}}" target="_blank" ng-if="project.status== 1">查看网页</a>
         </div>
         <div class="fr close" id="cancel" ng-click="cancel()">&times;</div>
     </div>

+ 26 - 6
donate-console/src/main/webapp/resources/view/project/project_launch_1.html

@@ -803,7 +803,22 @@
         height: 16px;
         background: #626262;
     }
+    .showEmpty{
+        border: 1px dashed red;
+    }
+    .form .form-group input[type='text']:focus {
+        border: 1px solid #66afe9 !important ;
+        outline: 0;
+        -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
+        box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
+    }
+    .form .form-group span.error{
+        color: red;
+    }
 </style>
+<!-- loading start -->
+<div class="loading in" ng-class="{'in': loading}"><i></i></div>
+<!-- loading end -->
 <div class="content-wrapper" style="min-height: 924px;; z-index: 50;">
     <!-- Main content -->
     <section class="content">
@@ -824,7 +839,8 @@
                             <form action="" class="form" name="baseInfoForm">
                                 <div class="form-group clearfix">
                                     <label for="" class="fl">项目名称</label>
-                                    <input type="text" ng-model="project.name" class="form-control fl" name="projectName" ng-maxlength="9" required>
+                                    <input type="text" ng-model="project.name" class="form-control fl" name="projectName" ng-maxlength="9" required
+                                                       ng-class="{'showEmpty': submited && baseInfoForm.projectName.$error.required ||submited && baseInfoForm.projectName.$error.maxlength}">
                                     <span class="fl help-txt">(不超过9个字)</span>
 
                                     <span class="error" ng-show="submited && baseInfoForm.projectName.$error.required">*项目名称不能为空</span>
@@ -839,7 +855,8 @@
                                                ng-required="true" max-date="project.endTime"
                                                current-text="今天" clear-text="清除" close-text="关闭"
                                                datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-                                               ng-click="openDatePicker($event, project, '$startTimeOpened')">
+                                               ng-click="openDatePicker($event, project, '$startTimeOpened')"
+                                               ng-class="{'showEmpty': submited && project.startTime == null}"/>
                                         <span class="fl" style="margin-left: 10px;margin-right: 10px;">至</span>
                                         <input type="text" ng-model="project.endTime" readonly required
                                                class="date-choose f1 form-control" placeholder="结束时间"
@@ -847,11 +864,12 @@
                                                ng-required="true"
                                                current-text="今天" clear-text="清除" close-text="关闭"
                                                datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-                                               ng-click="openDatePicker($event, project, '$endTimeOpened')">
+                                               ng-click="openDatePicker($event, project, '$endTimeOpened')"
+                                               ng-class="{'showEmpty': submited && project.endTime == null}"/>
 
                                         <span class="error" ng-show="submited && project.startTime == null">*请选择活动开始时间</span>
                                         <span class="error" ng-show="submited && project.endTime == null">*请选择活动结束时间</span>
-                                        <span class="error" ng-show="submited && project.startTime != null && project.endTime != null && project.startTime.getTime() == project.endTime.getTime()">*项目开始时间与结束时间不能相同</span>
+                                        <span class="error" ng-show="submited && project.startTime != null && project.endTime != null && project.startTime == project.endTime">*项目开始时间与结束时间不能相同</span>
                                     </div>
                                 </div>
                                 <div class="form-group clearfix">
@@ -908,7 +926,8 @@
 
                                 <div class="form-group clearfix">
                                     <label for="" class="fl">筹款目标</label>
-                                    <input type="text" ng-model="project.target" class="form-control fl" name="projectTarget" ng-pattern="/^[1-9]\d{0,8}$/" required>
+                                    <input type="text" ng-model="project.target" class="form-control fl" name="projectTarget" ng-pattern="/^[1-9]\d{0,8}$/" required
+                                    ng-class="{'showEmpty': submited && baseInfoForm.projectTarget.$error.required || submited && baseInfoForm.projectTarget.$error.pattern}"/>
                                     <span class="fl help-txt">(请输入整数金额,例如:5000)</span>
 
                                     <span class="error" ng-show="submited && baseInfoForm.projectTarget.$error.required">*筹款目标金额不能为空</span>
@@ -925,7 +944,8 @@
                                 </div>
                                 <div class="form-group clearfix">
                                     <label for="" class="fl">发起缘由</label>
-                                    <textarea style="max-height: 200px; max-width: 600px;" ng-model="project.reason" ng-maxlength="54" name="projectReason" id="" cols="30" rows="10" class="fl" required></textarea>
+                                    <textarea style="max-height: 200px; max-width: 600px;" ng-model="project.reason" ng-maxlength="54" name="projectReason" id="" cols="30" rows="10" class="fl" required
+                                    ng-class="{'showEmpty': submited && baseInfoForm.projectReason.$error.required || submited && baseInfoForm.projectReason.$error.maxlength}"></textarea>
                                     <span class="txt">提示文字:请您填写真实的身份信息,与受助对象的关系,以及该项目的简要介绍,54字以内。</span>
 
                                     <span class="error" ng-show="submited && baseInfoForm.projectReason.$error.required">*发起缘由不能为空</span>

+ 48 - 16
donate-console/src/main/webapp/resources/view/project/project_launch_2.html

@@ -260,7 +260,13 @@
         font-size: 12px;
         color: #969696;
     }
+    .detail .list-item div.fl .computer span.error{
+        width: 115px;
+        font-size: 12px;
+        color: red;
+    }
     .detail .list-item div.fl .showImg{
+        position: relative ;
         margin: 16px 0 0 120px;
         width: 180px;
         height: 180px;
@@ -561,7 +567,24 @@
         font-size: 16px;
         color: #1968f9;
     }
+    .showEmpty{
+        border: 1px dashed red;
+    }
+    .detail .list-item div.fl .item span.error{
+        font-size: 12px;
+        color: #f00;
+    }
+    .detail .list-item div.fl .item span.marginL100{
+        margin-left: 100px;
+    }
+    .detail .list-item .simple span.error{
+        font-size: 12px;
+        color: #f00;
+    }
 </style>
+<!-- loading start -->
+<div class="loading in" ng-class="{'in': loading}"><i></i></div>
+<!-- loading end -->
 <div class="content-wrapper" style="min-height: 924px;; z-index: 50;">
     <!-- Main content -->
     <section class="content">
@@ -584,7 +607,8 @@
                                     <div class="computer">
                                         <span>PC端主图</span>
                                         <button type="button">上传图片</button>
-                                        <input type="file" ng-multiple="false" id="pcImg" accept="image/*" onchange='angular.element(this).scope().fileChanged(this, 0)'>
+                                        <input type="file" ng-multiple="false" id="pcImg" accept="image/*" onchange='angular.element(this).scope().fileChanged(this, 0)'
+                                                           ng-class="{'showEmpty': submited && pcImgUrl == null && project.pcImg == null}"/>
                                         <em>(最能代表项目的焦点图,图片尺寸不小于500*280px,支持jpg,gif,png格式,不超过10MB)</em>
                                         <div ng-if="null != pcImgUrl" class="showImg">
                                             <img src="{{pcImgUrl}}">
@@ -594,12 +618,13 @@
                                             </span>
                                         </div>
 
-                                        <span class="error" ng-show="submited && pcImgUrl == null && project.pcImg == null">*请上传PC端主图</span>
+                                        <span class="error" ng-show="submited && mobileImgUrl == null && project.mobileImg == null">*请上传PC端主图</span>
                                     </div>
                                     <div class="computer">
                                         <span>手机端主图</span>
                                         <button>上传图片</button>
-                                        <input type="file" ng-multiple="false" id="mobileImg" accept="image/*" onchange='angular.element(this).scope().fileChanged(this, 1)'>
+                                        <input type="file" ng-multiple="false" id="mobileImg" accept="image/*" onchange='angular.element(this).scope().fileChanged(this, 1)'
+                                                           ng-class="{'showEmpty': submited && pcImgUrl == null && project.pcImg == null}"/>
                                         <em>(最能代表项目的焦点图,图片尺寸不小于500*280px,支持jpg,gif,png格式,不超过10MB)</em>
                                         <div ng-if="null != mobileImgUrl" class="showImg">
                                             <img src="{{mobileImgUrl}}">
@@ -618,7 +643,8 @@
                                 <div class="fl">
                                     <div class="computer uploadImg">
                                         <button>上传图片</button>
-                                        <input type="file" ng-multiple="false" id="mobileListImg" accept="image/*" onchange='angular.element(this).scope().fileChanged(this, 2)'>
+                                        <input type="file" ng-multiple="false" id="mobileListImg" accept="image/*" onchange='angular.element(this).scope().fileChanged(this, 2)'
+                                                           ng-class="{'showEmpty': submited && mobileListImgUrl == null && project.mobileListImg == null}"/>
                                         <em>(最能代表项目的焦点图,图片尺寸不小于500*375像素以上,支持jpg,gif,png格式,不超过10MB)</em>
                                         <div ng-if="null != mobileListImgUrl" class="showImg" style="margin-left: -15px;">
                                             <img src="{{mobileListImgUrl}}">
@@ -638,7 +664,8 @@
                                     <span class="intro"></span>
                                     <div class="item clearfix">
                                         <span class="fl">姓名</span>
-                                        <input type="text" class="form-control fl" name="projectPersonName" ng-maxlength="20" ng-model="project.personName" placeholder="不超过二十个字" required>
+                                        <input type="text" class="form-control fl" name="projectPersonName" ng-maxlength="20" ng-model="project.personName" placeholder="不超过二十个字" required
+                                        ng-class="{'showEmpty': submited && detailForm.projectPersonName.$error.required || submited && detailForm.projectPersonName.$error.maxlength}"/>
 
                                         <span class="error" ng-show="submited && detailForm.projectPersonName.$error.required">*姓名不能为空</span>
                                         <span class="error" ng-show="submited && detailForm.projectPersonName.$error.maxlength">*姓名字数过长</span>
@@ -647,7 +674,8 @@
                                         <span class="fl">头像</span>
                                         <div class="button fl">
                                             <button>上传图片</button>
-                                            <input type="file" ng-multiple="false" id="logo" accept="image/*" onchange='angular.element(this).scope().fileChanged(this, 3)'>
+                                            <input type="file" ng-multiple="false" id="logo" accept="image/*" onchange='angular.element(this).scope().fileChanged(this, 3)'
+                                                               ng-class="{'showEmpty': submited && logoUrl == null && project.logo == null}"/>
                                             <em>(图片尺寸不小于500*500px,不超过2MB)</em>
                                             <div ng-if="null != logoUrl" class="showImg" style="margin-left: 40px;">
                                                 <img src="{{logoUrl}}">
@@ -662,41 +690,45 @@
                                     </div>
                                     <div class="item clearfix">
                                         <span class="fl">工作单位</span>
-                                        <input type="text" class="form-control fl" name="projectWorkunit" ng-model="project.workunit" ng-maxlength="20" placeholder="不超过二十个字" required/>
+                                        <input type="text" class="form-control fl" name="projectWorkunit" ng-model="project.workunit" ng-maxlength="20" placeholder="不超过二十个字" required
+                                                                                                           ng-class="{'showEmpty': submited && detailForm.projectWorkunit.$error.required || submited && detailForm.projectWorkunit.$error.maxlength}"/>
 
                                         <span class="error" ng-show="submited && detailForm.projectWorkunit.$error.required">*工作单位不能为空</span>
                                         <span class="error" ng-show="submited && detailForm.projectWorkunit.$error.maxlength">*工作单位字数过长</span>
                                     </div>
                                     <div class="item clearfix">
                                         <span class="fl">联系电话</span>
-                                        <input type="text" class="form-control fl" name="projectPersonTel" ng-model="project.personTel" ng-maxlength="20" placeholder="填写联系电话" required/>
+                                        <input type="text" class="form-control fl" name="projectPersonTel" ng-model="project.personTel" ng-maxlength="20" placeholder="填写联系电话" required
+                                                                                                           ng-class="{'showEmpty': submited && detailForm.projectPersonTel.$error.required || submited && detailForm.projectPersonTel.$error.maxlength}"/>
 
                                         <span class="error" ng-show="submited && detailForm.projectPersonTel.$error.required">*联系电话不能为空</span>
                                         <span class="error" ng-show="submited && detailForm.projectPersonTel.$error.maxlength">*联系电话过长</span>
                                     </div>
                                     <div class="item clearfix">
                                         <span class="fl">个人简介</span>
-                                        <textarea name="projectSummary" id="" cols="30" rows="10" ng-model="project.summary" ng-maxlength="60" placeholder="不超过六十个字" required></textarea>
-
-                                        <span class="error" ng-show="submited && detailForm.projectSummary.$error.required">*个人简介不能为空</span>
-                                        <span class="error" ng-show="submited && detailForm.projectSummary.$error.maxlength">*个人简介过长</span>
+                                        <textarea name="projectSummary" id="" cols="30" rows="10" ng-model="project.summary" ng-maxlength="60" placeholder="不超过六十个字" required
+                                                                                                  ng-class="{'showEmpty': submited && detailForm.projectSummary.$error.required || submited && detailForm.projectSummary.$error.maxlength}"></textarea>
+                                        <br/>
+                                        <span class="error marginL100" ng-show="submited && detailForm.projectSummary.$error.required">*个人简介不能为空</span>
+                                        <span class="error marginL100" ng-show="submited && detailForm.projectSummary.$error.maxlength">*个人简介过长</span>
                                     </div>
                                 </div>
                             </div>
                             <div class="list-item clearfix">
                                 <span class="fl">项目简介</span>
                                 <div class="fl simple">
-                                    <textarea name="projectProSummary" cols="30" rows="10" ng-model="project.proSummary" ng-maxlength="27" placeholder="目的简单介绍,不超过27个字" required></textarea>
-
+                                    <textarea name="projectProSummary" cols="30" rows="10" ng-model="project.proSummary" ng-maxlength="27" placeholder="目的简单介绍,不超过27个字" required
+                                                                                           ng-class="{'showEmpty': submited && detailForm.projectProSummary.$error.required || submited && detailForm.projectProSummary.$error.maxlength}"></textarea>
+                                    <br/>
                                     <span class="error" ng-show="submited && detailForm.projectProSummary.$error.required">*项目简介不能为空</span>
                                     <span class="error" ng-show="submited && detailForm.projectProSummary.$error.maxlength">*项目简介过长</span>
-                                    <br/>
                                 </div>
                             </div>
                             <div class="list-item clearfix">
                                 <span class="fl">项目介绍</span>
                                 <div class="fl simple">
-                                    <summernote lang="zh-CN" ng-model="project.introduction" height="300px">
+                                    <summernote lang="zh-CN" ng-model="project.introduction" height="300px"
+                                                             ng-class="{'showEmpty': submited && project.introduction == null}">
                                         请填写介绍
                                     </summernote>
 

+ 853 - 1
donate-console/src/main/webapp/resources/view/user/user_list.html

@@ -1 +1,853 @@
-<!-- 用户列表 -->
+<style>
+    body{
+        font-family: "Microsoft Yahei", "微软雅黑";
+        box-sizing: border-box;
+    }
+    .clearfix {
+        clear: both;
+    }
+    .skin-blue .content-wrapper .content-header{
+        margin: 0 0 -15px 3px;
+    }
+    .content-header div.all{
+        float: left;
+        margin: 23px 0 30px 0;
+        width: 700px;
+    }
+    .content-header div.all span{
+        position: relative;
+        margin-right: 28px;
+        font-size: 14px;
+        color: #787878;
+        cursor: pointer ;
+    }
+    .content-header div.all span em{
+        font-size: 14px;
+        font-style: normal;
+        color: #787878;
+    }
+    .content-header div.all span.active,.content-header div.all span:hover{
+        font-weight: bold;
+        color: #367fa9;
+    }
+    .content-header div.all span.active em,.content-header div.all span:hover em{
+        font-weight: bold;
+        color: #367fa9;
+    }
+    .content-header div.all span b.line:after{
+        content: '';
+        position: absolute;
+        top: 5px;
+        right: -14px;
+        width: 1px;
+        height: 12px;
+        background: #d2d2d2;
+    }
+    .content-header .form-horizontal{
+        float: right;
+    }
+    .content .boxes {
+        position: relative;
+        border-radius: 3px;
+        background: #ffffff;
+        margin-bottom: 20px;
+        width: 100%;
+        height: 700px;
+        border: 1px solid #dcdcdc;
+        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+    }
+    .content .boxes-body table{
+        width: 100%;
+        max-width: 100%;
+    }
+    .content .boxes-body table tr{
+        text-align: center;
+        vertical-align: middle ;
+    }
+    .content .boxes-body table tr td:nth-child(2),.content .boxes-body table tr td:nth-child(3){
+        text-align: left;
+    }
+    .content .boxes-body table thead{
+        height: 40px;
+        line-height: 40px;
+        text-align: center;
+    }
+    .content .boxes-body table thead tr{
+        border-bottom: 1px solid #dcdcdc;
+    }
+    .content .boxes-body table thead tr td{
+        font-size: 14px;
+        color: #8c8c8c;
+        font-weight: bold;
+    }
+    .content .boxes-body table tbody{
+        height: 655px;
+    }
+    .content .boxes-body table tbody tr{
+        height: 60px;
+        vertical-align: middle ;
+        cursor: pointer;
+    }
+    .content .boxes-body table tbody tr:nth-child(even){
+        background: #f7f7f7;
+    }
+    .content .boxes-body table tbody tr:hover{
+        background: #f1f5ff;
+    }
+    .content .boxes-body table tbody tr td{
+        padding-top: 6px;
+        font-size: 14px;
+        color: #323232;
+    }
+    .content .boxes-body table tbody tr td div.name{
+        width: 100px;
+    }
+    .content .boxes-body table tbody tr td div.name p{
+        font-size: 14px;
+        font-weight: bold;
+        color: #323232;
+    }
+    .content .boxes-body table tbody tr td div.name:hover p{
+        text-decoration: underline;
+    }
+    .content .boxes-body table tbody tr td div.name div{
+        display: none;
+    }
+    .content .boxes-body table tbody tr:hover td div.name div{
+        margin-top: 5px;
+        display: block;
+    }
+    .content .boxes-body table tbody tr td div.name span{
+        margin-right: 25px;
+        font-size: 14px;
+        color: #367bcf;
+        cursor: pointer;
+    }
+    .content .boxes-body table tbody tr td div.name span:last-child {
+        margin-right: 0;
+    }
+    /*右侧内容部分*/
+    .content-right{
+        margin-top: 50px;
+        position: absolute;
+        top: 0;
+        right: 0;
+        /*width: 50%;*/
+        width: 905px;
+        height: 924px;
+        background: #fff;
+        z-index: 100;
+        box-shadow: -5px 2px 2px #f0f0f0;
+        -moz-box-shadow: -5px 2px 2px #f0f0f0;
+        -o-box-shadow: -5px 2px 2px #f0f0f0;
+        -webkit-box-shadow: -5px 2px 2px #f0f0f0 ;
+    }
+    .right-header{
+        padding: 0 25px;
+        width: 100%;
+        height: 64px;
+        line-height: 64px;
+    }
+    .right-header span{
+        margin-right: 17px;
+        font-size: 24px;
+        color: #333;
+    }
+    .right-header a{
+        font-size: 14px;
+        color: #1a6eb5;
+    }
+    .right-header .close{
+        font-size: 40px;
+    }
+    .right-nav{
+        padding-left: 50px;
+        margin-bottom: 14px;
+        width: 100%;
+        height: 34px;
+        line-height: 34px;
+        background: #e8f0f7;
+    }
+    .right-nav span{
+        margin-right: 50px;
+        padding-bottom: 5px;
+        font-size: 14px;
+        color: #333333;
+        cursor: pointer;
+    }
+    .right-nav span:first-child{
+        margin-left: -73px;
+    }
+    .right-nav span:hover,.right-nav span.active{
+        border-bottom: 2px solid #3c8dbc;
+    }
+    .content-right .right-list{
+        width: 100%;
+    }
+    .content-right .right-list table{
+        width: 100%;
+        table-layout: fixed ;
+    }
+
+    .content-right .right-list table thead{
+        width: 100%;
+        height: 40px;
+        line-height: 40px;
+        border: 1px solid #dcdcdc;
+    }
+    .content-right .right-list table thead tr{
+        border: 1px solid #dcdcdc;
+    }
+    .content-right .right-list table thead th{
+        font-size: 14px;
+        color: #8c8c8c;
+        text-align: center;
+    }
+    .content-right .right-list table thead th:nth-child(2){
+        text-align: left;
+    }
+    .content-right .right-list table tbody tr{
+        height: 60px;
+        cursor: pointer;
+    }
+    .content-right .right-list table tbody tr:nth-child(even){
+        background: #f7f7f7;
+    }
+    .content-right .right-list table tbody tr:hover{
+        background: #f1f5ff;
+    }
+    .content-right .right-list table tbody tr td{
+        font-size: 14px;
+        color: #333;
+        text-align: center;
+    }
+    .content-right .right-list table tbody tr td:nth-child(2) {
+        font-weight: bold;
+        text-align: left;
+    }
+    .content-right .right-list table tbody tr td:nth-child(3) {
+        padding-right: 20px;
+        text-align: right;
+    }
+    /*用户信息*/
+    .right-list .list-message{
+        padding: 0 20px 0 25px;
+    }
+    .right-list .list-header{
+        position: relative;
+        width: 100%;
+        height: 43px;
+        text-align: left;
+        border-bottom: 1px solid #dcdcdc;
+    }
+    .right-list .list-header:first-child {
+        margin-top: -10px;
+    }
+    .right-list .list-header span{
+        margin-left: 15px;
+        font-size: 15px;
+        color: #000;
+    }
+    .right-list .list-header span:before {
+        content: '';
+        position: absolute;
+        top: 13px;
+        left: 0;
+        width: 4px;
+        height: 16px;
+        background: #626262;
+    }
+    .right-list .list-body{
+        margin-top: 17px;
+    }
+    .right-list .list-body .msg-list{
+        margin-bottom: 20px;
+        overflow: hidden;
+    }
+    .right-list .list-body .msg-list span:first-child{
+        margin-right: 30px;
+        width: 60px;
+        font-family: "SimHei"!important;
+        font-size: 14px;
+        color: #8da8b8;
+    }
+    .right-list .list-body .msg-list span:last-child{
+        width: 340px;
+        font-size: 14px;
+        color: #323232;
+    }
+    .content-right{
+        display: none;
+    }
+    .right-list{
+        display: none
+    }
+    .show{
+        display: block;
+    }
+    .boxes{
+        display: none;
+    }
+    /*用户信息编辑弹出框*/
+    .userMsg .modal-content{
+        width: 540px;
+        height: 630px;
+    }
+    .userMsg .header{
+        margin-bottom: 10px;
+        width: 100%;
+        height: 44px;
+    }
+    .userMsg .header p{
+        font-family: 'SimHei'!important ;
+        font-size: 16px;
+        color: #323232;
+    }
+    .userMsg .header div.close{
+        margin-top: -15px;
+        font-size: 40px;
+    }
+    .userMsg .body .form-group {
+        margin-bottom: 12px;
+        height: 30px;
+        line-height: 30px;
+    }
+    .userMsg .body .form-group label{
+        font-family: 'SimHei'!important ;
+        margin-right: 22px;
+        width: 60px;
+        font-size: 14px;
+        font-weight: normal ;
+        color: #8da8b8;
+    }
+    .userMsg .body .form-group input{
+        width: 405px;
+        height: 30px;
+        border-radius: 0;
+    }
+    .userMsg .body .form-group div select{
+        padding-left: 10px;
+        height: 30px;
+        border-radius: 0;
+    }
+    .userMsg .body .form-group div select.province {
+        margin-right: 12px;
+        width: 140px;
+    }
+    .userMsg .body .form-group div select.city {
+        width: 255px;
+    }
+    .userMsg .body .info{
+        padding-bottom: 14px;
+        margin: 30px 0 20px 0;
+        position: relative;
+        width: 100%;
+        text-align: left;
+        border-bottom: 1px solid #dcdcdc;
+    }
+    .userMsg .body .info span {
+        margin-left: 15px;
+        font-size: 15px;
+        color: #000;
+    }
+    .userMsg .body .info span:before {
+        content: '';
+        position: absolute;
+        top: 3px;
+        left: 0;
+        width: 4px;
+        height: 16px;
+        background: #626262;
+    }
+    .userMsg .body .form-group div input.bank {
+        padding-left: 10px;
+        width: 255px;
+        height: 30px;
+    }
+    .form-control{
+        padding: 0 10px;
+        font-size: 14px;
+        color: #323232;
+    }
+    .userMsg .footer{
+        width: 100%;
+        height: 50px;
+        background:#f4f4f4;
+    }
+    .userMsg .footer a {
+        font-family: 'SimHei'!important ;
+        display: inline-block;
+        height: 30px;
+        line-height: 30px;
+        font-size: 16px;
+        text-align: center;
+        letter-spacing: 4px;
+        border-radius: 3px;
+    }
+    .userMsg .footer a:first-child{
+        margin-right: 10px;
+        width: 120px;
+        color: #fff;
+        background: #3c8dbc;
+    }
+    .userMsg .footer a:last-child{
+        width: 80px;
+        border: 1px solid #dcdcdc;
+        color: #959595;
+        background: #fff;
+    }
+    .modal-footer {
+        padding: 10px;
+    }
+</style>
+<body class="skin-blue sidebar-mini  pace-done">
+<div class="pace  pace-inactive">
+    <div class="pace-progress" data-progress-text="100%" data-progress="99" style="transform: translate3d(100%, 0px, 0px);">
+        <div class="pace-progress-inner"></div>
+    </div>
+    <div class="pace-activity"></div>
+</div>
+<div class="wrapper">
+    <!--主体内容-->
+    <div class="content-wrapper" style="min-height: 924px; z-index: 50;">
+        <section class="content-header clearfix">
+            <h1>用户列表</h1>
+            <div class="all">
+                <span class="active">全部用户<em>(182211)</em><b class="line"></b></span>
+                <span>管理员<em>(12)</em><b class="line"></b></span>
+                <span>机构用户<em>(15172)</em><b class="line"></b></span>
+                <span>机构操作员<em>(118)</em></span>
+            </div>
+            <form class="form-horizontal" method="POST" action="">
+                <div class="input-group input-group-sm">
+                    <input id="post-search-input" class="form-control" type="search" value="" name="" placeholder="请输入关键词">&nbsp;&nbsp;
+                    <input id="search-submit" class="btn btn-default btn-sm" type="submit" value="搜索">
+                </div>
+            </form>
+        </section>
+        <!-- Main content -->
+        <section class="content">
+            <!--全部用户-->
+            <div class="boxes show">
+                <div class="boxes-body">
+                    <form action="" method="" id="form">
+                        <input type="hidden" name="" value="">
+                        <table class="" style="word-break:break-all">
+                            <thead>
+                            <tr>
+                                <td width="45"></td>
+                                <td width="140">用户姓名</td>
+                                <td width="170">优软账号</td>
+                                <td width="240">工作单位</td>
+                                <td width="180">常驻地址</td>
+                                <td width="180">参加项目数</td>
+                                <td width="160">捐赠善款</td>
+                                <td width="160">个人电话</td>
+                                <td width="300"></td>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr>
+                                <td><input type="checkbox"></td>
+                                <td>
+                                    <div class="name">
+                                        <p>钟勇斌</p>
+                                        <!--<div><span>编辑</span><span>删除</span></div>-->
+                                    </div>
+                                </td>
+                                <td>U126165</td>
+                                <td>深圳市优软科技有限公司</td>
+                                <td>吉林 长春</td>
+                                <td>8</td>
+                                <td>112.00</td>
+                                <td>13222222222</td>
+                                <td></td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </form>
+                </div>
+            </div>
+            <!--管理员-->
+            <div class="boxes">
+                <div class="boxes-body">
+                    <form action="" method="" id="form">
+                        <input type="hidden" name="" value="">
+                        <table class="" style="word-break:break-all">
+                            <thead>
+                            <tr>
+                                <td width="45"></td>
+                                <td width="140">用户姓名</td>
+                                <td width="170">优软账号</td>
+                                <td width="240">工作单位</td>
+                                <td width="180">常驻地址</td>
+                                <td width="180">参加项目数</td>
+                                <td width="160">捐赠善款</td>
+                                <td width="160">个人电话</td>
+                                <td width="300"></td>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr>
+                                <td><input type="checkbox"></td>
+                                <td>
+                                    <div class="name">
+                                        <p>钟勇斌</p>
+                                        <!--<div><span>编辑</span><span>删除</span></div>-->
+                                    </div>
+                                </td>
+                                <td>U126165</td>
+                                <td>深圳市优软科技有限公司</td>
+                                <td>吉林 长春</td>
+                                <td>8</td>
+                                <td>112.00</td>
+                                <td>13222222222</td>
+                                <td></td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </form>
+                </div>
+            </div>
+            <!--机构用户-->
+            <div class="boxes">
+                <div class="boxes-body">
+                    <form action="" method="" id="form">
+                        <input type="hidden" name="" value="">
+                        <table class="" style="word-break:break-all">
+                            <thead>
+                            <tr>
+                                <td width="45"></td>
+                                <td width="140">用户姓名</td>
+                                <td width="170">优软账号</td>
+                                <td width="240">工作单位</td>
+                                <td width="180">常驻地址</td>
+                                <td width="180">参加项目数</td>
+                                <td width="160">捐赠善款</td>
+                                <td width="160">个人电话</td>
+                                <td width="160">用户权限</td>
+                                <td width="170"></td>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr>
+                                <td><input type="checkbox"></td>
+                                <td>
+                                    <div class="name">
+                                        <p>钟勇斌</p>
+                                        <!--<div><span>编辑</span><span>删除</span></div>-->
+                                    </div>
+                                </td>
+                                <td>U126165</td>
+                                <td>深圳市优软科技有限公司</td>
+                                <td>吉林 长春</td>
+                                <td>8</td>
+                                <td>112.00</td>
+                                <td>13222222222</td>
+                                <td>操作人</td>
+                                <td></td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </form>
+                </div>
+            </div>
+            <!--机构操作员-->
+            <div class="boxes">
+                <div class="boxes-body">
+                    <form action="" method="" id="form">
+                        <input type="hidden" name="" value="">
+                        <table class="" style="word-break:break-all">
+                            <thead>
+                            <tr>
+                                <td width="45"></td>
+                                <td width="140">用户姓名</td>
+                                <td width="170">优软账号</td>
+                                <td width="240">工作单位</td>
+                                <td width="180">常驻地址</td>
+                                <td width="180">参加项目数</td>
+                                <td width="160">捐赠善款</td>
+                                <td width="160">个人电话</td>
+                                <td width="160">用户权限</td>
+                                <td width="170"></td>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr>
+                                <td><input type="checkbox"></td>
+                                <td>
+                                    <div class="name">
+                                        <p>钟勇斌</p>
+                                        <!--<div><span>编辑</span><span>删除</span></div>-->
+                                    </div>
+                                </td>
+                                <td>U126165</td>
+                                <td>深圳市优软科技有限公司</td>
+                                <td>吉林 长春</td>
+                                <td>8</td>
+                                <td>112.00</td>
+                                <td>13222222222</td>
+                                <td>操作人</td>
+                                <td></td>
+                            </tr>
+                            </tbody>
+                        </table>
+                    </form>
+                </div>
+            </div>
+        </section>
+    </div>
+    <!--右侧内容部分-->
+    <aside class="content-right">
+        <!--<div class="container">-->
+        <div class="right-header clearfix">
+            <div class="fl"><span>钟勇斌</span><a href="" data-toggle="modal" data-target="#userMsg">编辑</a></div>
+            <div class="fr close">&times;</div>
+        </div>
+        <div class="right-nav"><span class="active">用户信息</span><span>参与项目</span><span>参与活动</span></div>
+        <!--用户信息-->
+        <div class="right-list show">
+            <div class="list-message">
+                <div class="list-header">
+                    <span>基本信息</span>
+                </div>
+                <div class="list-body clearfix">
+                    <div class="msg-list fl">
+                        <span class="fl">优软账号</span>
+                        <span class="fl">13800001111</span>
+                    </div>
+                    <div class="msg-list fl">
+                        <span class="fl">身份证号</span>
+                        <span class="fl">456194689162198465</span>
+                    </div>
+                    <div class="msg-list fl">
+                        <span class="fl">所在地</span>
+                        <span class="fl">广东 深圳</span>
+                    </div>
+                    <div class="msg-list fl">
+                        <span class="fl">详细地址</span>
+                        <span class="fl">南山区高新技术产业园科技南五路英唐大厦6楼</span>
+                    </div>
+                    <div class="msg-list fl">
+                        <span class="fl">工作单位</span>
+                        <span class="fl">深圳市优软科技有限公司</span>
+                    </div>
+                    <div class="msg-list fl">
+                        <span class="fl">个人手机</span>
+                        <span class="fl">456194689162198465</span>
+                    </div>
+                    <div class="msg-list fl">
+                        <span class="fl">用户权限</span>
+                        <span class="fl">个人用户</span>
+                    </div>
+                </div>
+            </div>
+            <div class="list-message">
+                <div class="list-header">
+                    <span>银行信息</span>
+                </div>
+                <div class="list-body clearfix">
+                    <div class="msg-list fl">
+                        <span class="fl">开户支行</span>
+                        <span class="fl">招商银行 蛇口支行</span>
+                    </div>
+                    <div class="msg-list fl">
+                        <span class="fl">银行账号</span>
+                        <span class="fl">456194689162198465</span>
+                    </div>
+                </div>
+            </div>
+            <div class="list-message">
+                <div class="list-header">
+                    <span>募捐信息</span>
+                </div>
+                <div class="list-body clearfix">
+                    <div class="msg-list fl">
+                        <span class="fl">参加项目</span>
+                        <span class="fl">8个</span>
+                    </div>
+                    <div class="msg-list fl">
+                        <span class="fl">捐赠善款</span>
+                        <span class="fl">15616.00元</span>
+                    </div>
+                    <div class="msg-list fl">
+                        <span class="fl">参加活动</span>
+                        <span class="fl">2个</span>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <!--参与项目-->
+        <div class="right-list">
+            <table>
+                <thead>
+                <tr>
+                    <th width="30"></th>
+                    <th width="210">项目名称</th>
+                    <th width="120">捐款金额(元)</th>
+                    <th width="120">捐款时间</th>
+                    <th width="120">捐款方式</th>
+                    <th width="240"></th>
+                </tr>
+                </thead>
+                <tbody>
+                <tr>
+                    <td></td>
+                    <td>让寒门学子多回趟家</td>
+                    <td>1.00</td>
+                    <td>2017-08-20 14:23:11</td>
+                    <td>微信支付</td>
+                    <td></td>
+                </tr>
+                <tr>
+                    <td></td>
+                    <td>让寒门学子多回趟家</td>
+                    <td>1.00</td>
+                    <td>2017-08-20 14:23:11</td>
+                    <td>微信支付</td>
+                    <td></td>
+                </tr>
+                <tr>
+                    <td></td>
+                    <td>让寒门学子多回趟家</td>
+                    <td>1.00</td>
+                    <td>2017-08-20 14:23:11</td>
+                    <td>微信支付</td>
+                    <td></td>
+                </tr>
+                <tr>
+                    <td></td>
+                    <td>让寒门学子多回趟家</td>
+                    <td>1.00</td>
+                    <td>2017-08-20 14:23:11</td>
+                    <td>微信支付</td>
+                    <td></td>
+                </tr>
+                </tbody>
+            </table>
+        </div>
+        <!--参与活动-->
+        <div class="right-list">
+            <table>
+                <thead>
+                <tr>
+                    <th width="30"></th>
+                    <th width="210">活动名称</th>
+                    <th width="120">活动时间</th>
+                    <th width="120">参与时间</th>
+                    <th width="350"></th>
+                </tr>
+                </thead>
+                <tbody>
+                <tr>
+                    <td></td>
+                    <td>优软一元捐感恩回馈01</td>
+                    <td>2017-08-20<br/>至2017-09-20</td>
+                    <td>2017-08-20 14:23:11</td>
+                    <td></td>
+                </tr>
+                <tr>
+                    <td></td>
+                    <td>优软一元捐感恩回馈01</td>
+                    <td>2017-08-20<br/>至2017-09-20</td>
+                    <td>2017-08-20 14:23:11</td>
+                    <td></td>
+                </tr>
+                </tbody>
+            </table>
+        </div>
+        <!--</div>-->
+    </aside>
+</div>
+<!--用户信息编辑弹出框-->
+<div class="userMsg modal" role='dialog' id='userMsg'>
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="header modal-header clearfix">
+                <p class="fl">用户信息编辑</p>
+                <div class="close fr" data-dismiss="modal">&times;</div>
+            </div>
+            <div class="body modal-body">
+                <form action="">
+                    <div class="form-group clearfix">
+                        <label for="" class="control-label fl">真实姓名</label>
+                        <input type="text" class="form-control fl"/>
+                    </div>
+                    <div class="form-group clearfix">
+                        <label for="" class="control-label fl">优软账号</label>
+                        <input type="text" class="form-control fl"/>
+                    </div>
+                    <div class="form-group clearfix">
+                        <label for="" class="control-label fl">身份证号</label>
+                        <input type="text" class="form-control fl"/>
+                    </div>
+                    <div class="form-group clearfix">
+                        <label for="" class="control-label fl">所在地</label>
+                        <div class="fl">
+                            <select name="" id="" class="form-control fl province">
+                                <option value="">陕西</option>
+                            </select>
+                            <select name="" id="" class="form-control fl city">
+                                <option value="">西安</option>
+                            </select>
+                        </div>
+                    </div>
+                    <div class="form-group clearfix">
+                        <label for="" class="control-label fl">详细地址</label>
+                        <input type="text" class="form-control fl"/>
+                    </div>
+                    <div class="form-group clearfix">
+                        <label for="" class="control-label fl">工作单位</label>
+                        <input type="text" class="form-control fl"/>
+                    </div>
+                    <div class="form-group clearfix">
+                        <label for="" class="control-label fl">个人手机</label>
+                        <input type="text" class="form-control fl"/>
+                    </div>
+                    <div class="form-group clearfix">
+                        <label for="" class="control-label fl">用户权限</label>
+                        <input type="text" class="form-control fl"/>
+                    </div>
+                </form>
+                <div class="info">
+                    <span>银行信息</span>
+                </div>
+                <form action="">
+                    <div class="form-group clearfix">
+                        <label for="" class="control-label fl">开户支行</label>
+                        <div class="fl">
+                            <select name="" id="" class="form-control fl province">
+                                <option value="">平安银行</option>
+                            </select>
+                            <input type="text" class="form-control fl bank">
+                        </div>
+                    </div>
+                    <div class="form-group clearfix">
+                        <label for="" class="control-label fl">银行账号</label>
+                        <input type="text" class="form-control fl"/>
+                    </div>
+                </form>
+            </div>
+            <div class="footer modal-footer text-right">
+                <a href="">确认</a><a href="">取消</a>
+            </div>
+        </div>
+    </div>
+</div>
+<!--js begin-->
+<script src="static/lib/jquery/jquery.min.js"></script>
+<script src="static/lib/bootstrap/js/bootstrap.min.js"></script>
+<script src="static/lib/js/app.min.js"></script>
+<script>
+    $('.all').on('click', 'span', function () {
+        var index = $(this).index();
+        $(this).addClass('active').siblings().removeClass('active');
+        $('.boxes').eq(index).addClass('show').siblings().removeClass('show');
+    });
+    $('.right-nav').on('click', 'span', function () {
+        var index = $(this).index();
+        $(this).addClass('active').siblings().removeClass('active');
+        $('.right-list').eq(index).addClass('show').siblings().removeClass('show');
+    });
+</script>
+</body>

+ 3 - 15
donate-service/src/main/java/com/uas/service/donate/controller/ActivityController.java

@@ -6,8 +6,6 @@ import com.uas.service.donate.model.ActivityRecode;
 import com.uas.service.donate.service.ActivityService;
 import com.uas.service.donate.service.AwardService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageRequest;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
@@ -84,25 +82,15 @@ public class ActivityController {
         return activityService.findEndActivities();
     }
 
-
-
-    @ResponseBody
-    @RequestMapping("/test")
-    public Page<Activity> findAll(@RequestParam(defaultValue = "0")int page,
-                                  @RequestParam(defaultValue = "7")int size){
-        PageRequest pageRequest=new PageRequest(page,size);
-        return activityService.findAll(pageRequest);
-    }
-
     /**
      * 获取当前登录用户参加活动资格
      * @param id
      * @return 0无资格  1有已参加
      */
     @ResponseBody
-    @RequestMapping(value = "/getActivityRecord/{id}",method = RequestMethod.GET)
-    public ActivityRecode getActivityRecord(@PathVariable("id") Long id) {
-        return activityService.getActivityRecord(id);
+    @RequestMapping(value = "/record/{id}",method = RequestMethod.GET)
+    public ModelMap getActivityRecord(@PathVariable("id") Long id) {
+        return new ModelMap ("record", activityService.getActivityRecord(id));
     }
 
     /**

+ 1 - 1
donate-service/src/main/java/com/uas/service/donate/model/ProjectRecode.java

@@ -9,7 +9,7 @@ import java.util.Date;
 @Table(name="donate$projectrecode")
 public class ProjectRecode implements Serializable{
     private static final long serialVersionUID = 1L;
-    private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+    private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
     @Id
     @GeneratedValue(strategy= GenerationType.IDENTITY)

+ 4 - 2
donate-service/src/main/java/com/uas/service/donate/service/impl/ActivityServiceImpl.java

@@ -95,15 +95,17 @@ public class ActivityServiceImpl implements ActivityService {
         Long userUU = SystemSession.getUser().getUserUU();
         if (userUU != record.getUuid()) {
             map.put("error", "当前登陆用户与领奖人不符!");
+            return map;
         }
-        if (record.getIsGetAward() != 2) {
+        if (2 != record.getIsGetAward()) {
             map.put("error", "没有领取奖品资格!");
             return map;
         }
-        if (record.getStatus() == 3) {
+        if (3 == record.getStatus()) {
             map.put("error", "奖品已失效!");
             return map;
         }
+        //TODO 领奖功能
         record.setStatus(2);
         activityRecodeDao.save(record);
         map.put("success", "领奖成功!");

+ 3 - 0
donate-service/src/main/webapp/resources/css/base.css

@@ -4,6 +4,9 @@ html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
 h1,h2,h3,h4,h5,h6{
 	margin: 0 !important;
 }
+body {
+	padding-right: 0!important;
+}
 a{text-decoration: none;}
 a:hover{text-decoration: none !important;}
 img{border: none; vertical-align: middle}

+ 3 - 3
donate-service/src/main/webapp/resources/js/activity/controllers/ActivityDetailCtrl.js

@@ -19,12 +19,12 @@ define([ 'app/app' ], function(app) {
         // 验证领奖
         $scope.verifyAward = function() {
             Activity.getActivityRecord({id: $stateParams.id}, {}, function(data) {
-                if (null == data) {
+                if (!data.record) {
                     $scope.modalStatus = 'fail';
                 } else {
-                    $scope.activityRecord = data;
+                    $scope.activityRecord = data.record;
                     // 未领取
-                    if (data.status === 1) {
+                    if (data.record.status === 1) {
                         $scope.modalStatus = 'layer';
                     }
                 }

+ 2 - 5
donate-service/src/main/webapp/resources/js/common/query/Activity.js

@@ -35,11 +35,8 @@ define ([ 'ngResource' ], function() {
             },
             // 领奖
             takeAward: {
-                url: 'activity/takeAward/:id',
-                method: 'POST',
-                params: {
-                    id: 'id'
-                }
+                url: 'activity/takeAward',
+                method: 'POST'
             }
         });
     }]);

+ 22 - 13
donate-service/src/main/webapp/resources/js/mobile/controllers/MobileActivityDetailCtrl.js

@@ -1,8 +1,8 @@
 define([ 'app/app' ], function(app) {
     'use strict';
 
-    app.register.controller('MobileActivityDetailCtrl', ['$scope', 'Activity', '$stateParams', '$http', 'toaster',
-        function ($scope, Activity, $stateParams, $http, toaster) {
+    app.register.controller('MobileActivityDetailCtrl', ['$scope', 'Activity', '$stateParams', '$http', 'toaster', 'User',
+        function ($scope, Activity, $stateParams, $http, toaster, User) {
 
         var id = $stateParams.id;
         var imId = $stateParams.imId;
@@ -21,14 +21,14 @@ define([ 'app/app' ], function(app) {
         //TODO 验证领奖
         $scope.verifyAward = function() {
             Activity.getActivityRecord({id: id}, {}, function(data) {
-                if (null == data) {
+                if (!data.record) {
                     $scope.modalStatus = 'fail';
                 } else {
                     // 未领取
-                    if (data.status != 2) {
+                    if (data.record.status != 2) {
                         $scope.modalStatus = 'layer';
                     }
-                    $scope.activityRecord = data;
+                    $scope.activityRecord = data.record;
                 }
             });
         };
@@ -41,15 +41,24 @@ define([ 'app/app' ], function(app) {
         });
 
         //TODO 确认领奖
-        $scope.takeAward = function() {
-            Activity.takeAward({id: id, imId: imId}, {}, function(data) {
-                if (data.success) {
-                    $scope.awardStatus = 'success';
-                }
-            }, function(response) {
-                console.log(response.data);
-                toaster.pop("error", "出现异常,领取失败");
+        $scope.takeAward = function(record) {
+            var userUU = null;
+            User.getUserUUByImId({imId: imId}, {}, function(data) {
+                    userUU = data.userUU;
             });
+            if (null === userUU) {
+                toaster.pop('info', '未找到相关帐号信息');
+            } else {
+                record.uuid = userUU;
+                Activity.takeAward({}, record, function(data) {
+                    if (data.success) {
+                        $scope.awardStatus = 'success';
+                    }
+                }, function(response) {
+                    console.log(response.data);
+                    toaster.pop("error", "出现异常,领取失败");
+                });
+            }
         }
     }]);
 

+ 3 - 0
donate-service/src/main/webapp/resources/js/mobile/controllers/MobileProjectDetailCtrl.js

@@ -6,15 +6,18 @@ define([ 'app/app' ], function(app) {
         var id = $stateParams.id;
         $scope.outTradeNo = $stateParams.outTradeNo;
         $scope.imId = null;
+        $scope.loading = true;
         if (!angular.isUndefined($stateParams.imId)) {
             $scope.imId = $stateParams.imId;
         }
         var init = function () {
 
             Project.getDetailById({ id: id}, {}, function (data) {
+                $scope.loading = false;
                 $scope.project = data;
                 $scope.styCode = $scope.project.introduction;
                 $scope.introduction = $sce.trustAsHtml($scope.styCode);
+                alert($scope.introduction.length());
                 $scope.organization = data.organization;
                 $scope.percentage = data.totalAmount / data.target;
                 // document.write('<script type="text/javascript" src="static/js/mobile/detail.js"></script>');

+ 2 - 3
donate-service/src/main/webapp/resources/js/pay.js

@@ -6,9 +6,8 @@
 // var amount;
 // var payWay;//0支付宝 1微信 2银联
 // var uuid = "10041166";
-
-const userAgent = navigator.userAgent;
-const isMobile = /(iPhone|iPad|Opera Mini|Android.*Mobile|NetFront|PSP|BlackBerry|Windows Phone)/ig.test(userAgent);
+var userAgent = navigator.userAgent;
+var isMobile = /(iPhone|iPad|Opera Mini|Android.*Mobile|NetFront|PSP|BlackBerry|Windows Phone)/ig.test(userAgent);
 
 var pay =function (proId, amount, payWay, imid) {
      var customAmount = $("#custom-amount" + proId).val();

+ 5 - 0
donate-service/src/main/webapp/resources/js/project/controllers/ProjectDetailCtrl.js

@@ -83,6 +83,11 @@ define([ 'app/app' ], function(app) {
             $scope.donation = null;
         };
 
+        // 设置加载状态
+        $scope.setLoading = function(value) {
+            $scope.loading = value;
+        };
+
         // 输入金额
         $scope.inputMoney = function() {
             $scope.projectRecord.amount = $scope.donation;

+ 6 - 5
donate-service/src/main/webapp/resources/view/activity/activity_detail.html

@@ -595,7 +595,7 @@
                     </p>
                     <!-- 处于待兑奖状态才显示领奖 -->
                     <!--<a ng-if="activity.stage == 2" data-toggle="modal" data-target="#{{modalStatus}}" ng-click="verifyAward()">领奖</a>-->
-                    <a data-toggle="modal" data-target="#layer" ng-click="verifyAward()">领奖</a>
+                    <a data-toggle="modal" data-target="#{{modalStatus}}" ng-click="verifyAward()">领奖</a>
                 </div>
                 <div class="intro-item">
                     <h3>奖品介绍</h3>
@@ -605,8 +605,9 @@
                             <!--<span ng-if="award.awardLevel == 2">二等奖:</span>-->
                             <!--<span ng-if="award.awardLevel == 3">三等奖:</span>-->
                             <!--<span ng-if="award.awardLevel != 1 && award.awardLevel != 2 && award.awardLevel != 3">参与奖:</span>-->
-                            <span ng-bind="award.awardLevel"></span>
-                            <span ng-bind="award.awardSummary"></span>
+                            <span><strong>奖品名称</strong>:{{award.awardName}}</span>
+                            <span style="padding-left: 20px;"><strong>奖品等级</strong>:{{award.awardLevel}}</span>
+                            <span style="padding-left: 20px;"><strong>奖品简介</strong>:{{award.awardSummary}}</span>
                         </p>
                     </div>
                 </div>
@@ -638,10 +639,10 @@
                     <p class="title">活动项目</p>
                     <div class="item-list clearfix" ng-repeat="project in activity.projects">
                         <div class="img fl">
-                            <a href="/project#/detail/{{project.proId}}"><img src="{{project.pcImg}}" alt="项目缩略图" title="{{project.name}}"></a>
+                            <a href="/project#/detail/{{project.id}}"><img src="{{project.pcImg}}" alt="项目缩略图" title="{{project.name}}"></a>
                         </div>
                         <div class="txt fl">
-                            <p><a href="/project#/detail/{{project.proId}}">{{project.name}}</a></p>
+                            <p><a href="/project#/detail/{{project.id}}">{{project.name}}</a></p>
                             <span>{{project.projectSummary}}</span>
                         </div>
                     </div>

+ 1 - 1
donate-service/src/main/webapp/resources/view/mobile/mobile_activity_detail.html

@@ -259,7 +259,7 @@
         <div class="footer">
             <a class="attend" ng-if="qualification == 0">未参加活动</a>
             <a class="attend doing" ng-if="qualification == 1 && activity.stage != '兑奖中'">{{activity.stage}}</a>
-            <a class="attend opening" ng-click="takeAward()" ng-if="qualification == 1 && activity.stage == '兑奖中'">领奖</a>
+            <a class="attend opening" ng-click="takeAward(activityRecord)" ng-if="qualification == 1 && activity.stage == '兑奖中'">领奖</a>
         </div>
     </div>
 </div>

+ 29 - 7
donate-service/src/main/webapp/resources/view/mobile/mobile_project_detail.html

@@ -119,6 +119,8 @@
     }
     .banner img{
         width: 100%;
+        height: 5.2rem;
+        margin: 0 auto;
     }
     .banner .carousel-indicators{
         bottom: 0;
@@ -250,12 +252,23 @@
         font-size: .24rem;
         color: #969696;
     }
+    .project-item .intro-date p.time{
+        float: left;
+        margin-left: .2rem;
+        width: 4.5rem;
+        text-align: left;
+        font-size: .24rem;
+        color: #969696;
+    }
     .project-intro {
         padding: 0 .3rem;
         margin-top: .2rem;
         background: #fff;
         text-align: left;
     }
+    .project-init{
+        margin-bottom: 1.55rem;
+    }
     .project-first{
         margin-top: 0;
     }
@@ -286,6 +299,10 @@
         font-size: .28rem !important ;
         color: #666;
     }
+    .project-intro .bottom .list-show .show-all div{
+        font-size: .28rem !important ;
+        color: #666;
+    }
     .project-intro .bottom .list-show .show-all a{
         width: 100% !important;
     }
@@ -684,6 +701,7 @@
         -webkit-overflow-scrolling: touch;
         outline: 0;
         background: rgba(0,0,0,.5);
+        display: none;
     }
     #myModal{
         display: table;
@@ -754,7 +772,7 @@
                 </div>
                 <div class="intro-detail">
                     <div class="intro-date">
-                        <span>筹款截止日期</span>
+                        <span>筹款时间</span>
                         <p class="time">{{project.startTime | date:'yyyy-MM-dd'}}至&nbsp;{{project.endTime | date:'yyyy-MM-dd'}}</p>
                     </div>
                 </div>
@@ -796,7 +814,7 @@
                     <!--</p>-->
                 <!--</div>-->
             <!--</div>-->
-            <div class="project-intro">
+            <div class="project-intro project-init">
                 <div class="top">
                     <span>执行机构</span>
                 </div>
@@ -810,7 +828,7 @@
             </div>
             <div class="footer">
                 <!--<a href="" class="look"><img src="../static/images/mobile/list-ul.png" alt=""/>查看同类其他项目</a>-->
-                <button type="button" class="attend" ng-disabled="project.overdue == '已结束'">我要捐款</button>
+                <button type="button" class="attend" ng-disabled="project.overdue == '已结束' || loading">我要捐款</button>
             </div>
         </div>
         <!--进度-->
@@ -890,7 +908,7 @@
                     </p>
                 </div>
             </div>
-            <div class="project-intro">
+            <div class="project-intro project-init">
                 <div class="top">
                     <span>机构信息</span>
                 </div>
@@ -957,9 +975,12 @@
                         <div ng-bind-html="introduction">
 
                         </div>
-                        <div class="btnClick">
+                        <div class="btnClick btnDown" style="display:none">
                             展开全文<i class="fa fa-angle-down"></i>
                         </div>
+                        <div class="btnClick btnUp" style="display:none">
+                            收起<i class="fa fa-angle-up"></i>
+                        </div>
                     </div>
                 </div>
             </div>
@@ -982,7 +1003,7 @@
                     <!--</p>-->
                 <!--</div>-->
             <!--</div>-->
-            <div class="project-intro">
+            <div class="project-intro project-init">
                 <div class="top">
                     <span>执行机构</span>
                 </div>
@@ -1061,7 +1082,8 @@
         var $showAll = $('.show-all');
 
         var $height = document.documentElement.clientHeight;
-        console.log($height)
+//        alert($height);
+//        alert($showAll.height());
         if ($height > 700) {
             $showAll.css({
                 'height': '6rem',

+ 4 - 2
donate-service/src/main/webapp/resources/view/project/donateQrcode.html

@@ -127,6 +127,10 @@
             font-size: 14px;
             color: #8c8c8c;
         }
+        .modal-backdrop{
+            position: static !important ;
+            background-color: transparent !important ;
+        }
     </style>
 </head>
 <body>
@@ -148,7 +152,5 @@
 <!--js begin-->
 <script src="/static/lib/jquery/jquery.min.js"></script>
 <script src="/static/lib/bootstrap/js/bootstrap.min.js"></script>
-<script>
-</script>
 </body>
 </html>

+ 24 - 17
donate-service/src/main/webapp/resources/view/project/project_detail.html

@@ -670,6 +670,9 @@
     .show{
         display: block;
     }
+    /*.modal-backdrop{*/
+        /*background-color: transparent !important ;*/
+    /*}*/
 </style>
 <body>
 <!-- loading start -->
@@ -751,7 +754,7 @@
                         <span>已筹款:<em ng-bind="project.totalAmount || 0 | number: 2"></em>元<span>({{percentage * 100 || 0 | number: 2}}%)</span></span>
                     </div>
                     <!--我要捐款-->
-                    <button class="button" data-toggle="modal" data-target="#layer" ng-disabled="!canDonate">我要捐款</button>
+                    <button class="button" data-toggle="modal" data-target="#layer" ng-disabled="!canDonate" data-dismiss="modal">我要捐款</button>
                 </div>
             </div>
         </div>
@@ -777,7 +780,7 @@
                         <p>联系电话:<span ng-bind="project.personTel"></span></p>
                     </div>
                     <div class="button">
-                        <button class="button" data-toggle="modal" data-target="#layer"  ng-disabled="cannotDonate">我要捐款</button>
+                        <button class="button" data-toggle="modal" data-target="#layer"  ng-disabled="!canDonate" data-dismiss="modal">我要捐款</button>
                     </div>
                 </div>
                 <div ng-include src="'static/view/project/project_detail_side.html'"></div>
@@ -845,28 +848,32 @@
                             <input type="checkbox" class="fl" required ng-checked="checked" ng-click="changeChecked()"><span class="fl">同意并接受《<a href="/userAgreement" target="_blank" style="color: #5078cb;">优软一元捐用户协议</a>》</span>
                         </div>
                     </div>
-                    <button type="button" ng-disabled="donationForm.$invalid || !checked || projectRecord.amount == 0" onclick="pay(angular.element(this).scope().project.id, angular.element(this).scope().projectRecord.amount, angular.element(this).scope().projectRecord.way)" style="margin-top: 15px;">确认捐款</button>
+                    <button type="button" ng-disabled="donationForm.$invalid || !checked || projectRecord.amount == 0" data-dismiss="modal" ng-click="setLoading(true)"
+                            onclick="pay(angular.element(this).scope().project.id, angular.element(this).scope().projectRecord.amount, angular.element(this).scope().projectRecord.way);" style="margin-top: 15px;">确认捐款</button>
                 </div>
             </form>
         </div>
     </div>
 </div>
 <script>
-    //    点击切换
-    $('#top').on('click', '.tabNav', function () {
-        var index = $(this).index();
-        $(this).addClass('active').siblings().removeClass('active');
-        $('.bottom').eq(index).addClass('show').siblings().removeClass('show');
-    });
+    $(function(){
 
-    $('.select-money').on('click', function () {
-        $(this).addClass('active').siblings().removeClass('active');
-    });
-    $('.select-way').on('click', function () {
-        $(this).addClass('active').siblings().removeClass('active');
-    });
-    $('.input-money').on('focus', function () {
-        $('.select-money').removeClass('active');
+        //    点击切换
+        $('#top').on('click', '.tabNav', function () {
+            var index = $(this).index();
+            $(this).addClass('active').siblings().removeClass('active');
+            $('.bottom').eq(index).addClass('show').siblings().removeClass('show');
+        });
+
+        $('.select-money').on('click', function () {
+            $(this).addClass('active').siblings().removeClass('active');
+        });
+        $('.select-way').on('click', function () {
+            $(this).addClass('active').siblings().removeClass('active');
+        });
+        $('.input-money').on('focus', function () {
+            $('.select-money').removeClass('active');
+        });
     });
 </script>
 <script type="text/javascript" src="static/js/pay.js"></script>