Browse Source

部分bug修改

dongbw 8 years ago
parent
commit
a62a3ad741
40 changed files with 480 additions and 274 deletions
  1. 15 15
      donate-console/src/main/java/com/uas/console/donate/controller/ProjectController.java
  2. 2 2
      donate-console/src/main/java/com/uas/console/donate/controller/ProjectEvolveController.java
  3. 4 2
      donate-console/src/main/java/com/uas/console/donate/controller/ProjectFinanceController.java
  4. 3 2
      donate-console/src/main/java/com/uas/console/donate/controller/ProjectRecodeController.java
  5. 2 7
      donate-console/src/main/java/com/uas/console/donate/service/impl/ActivityServiceImpl.java
  6. 2 2
      donate-console/src/main/java/com/uas/console/donate/service/impl/ProjectServiceImpl.java
  7. 4 0
      donate-console/src/main/java/com/uas/console/donate/web/filter/SSOInterceptor.java
  8. 5 0
      donate-console/src/main/webapp/resources/css/base.css
  9. 102 37
      donate-console/src/main/webapp/resources/js/index/app.js
  10. 19 7
      donate-console/src/main/webapp/resources/js/index/services/Project.js
  11. 13 0
      donate-console/src/main/webapp/resources/jsondata/classify.json
  12. 53 69
      donate-console/src/main/webapp/resources/view/project/project_finance.html
  13. 21 0
      donate-console/src/main/webapp/resources/view/project/project_list_finance.html
  14. 21 0
      donate-console/src/main/webapp/resources/view/project/project_list_management.html
  15. 23 0
      donate-console/src/main/webapp/resources/view/project/project_list_report.html
  16. 16 13
      donate-console/src/main/webapp/resources/view/project/project_management.html
  17. 15 21
      donate-console/src/main/webapp/resources/view/project/project_report.html
  18. 1 0
      donate-service/src/main/java/com/uas/service/donate/controller/AlipayController.java
  19. 4 4
      donate-service/src/main/java/com/uas/service/donate/controller/AuthenticationController.java
  20. 6 6
      donate-service/src/main/java/com/uas/service/donate/controller/ProjectConcludeController.java
  21. 12 0
      donate-service/src/main/java/com/uas/service/donate/controller/UserController.java
  22. 5 1
      donate-service/src/main/java/com/uas/service/donate/controller/WxpayController.java
  23. 18 13
      donate-service/src/main/java/com/uas/service/donate/core/support/SystemSession.java
  24. 4 3
      donate-service/src/main/java/com/uas/service/donate/model/ProjectRecode.java
  25. 0 26
      donate-service/src/main/java/com/uas/service/donate/model/SystemSession.java
  26. 0 8
      donate-service/src/main/java/com/uas/service/donate/model/UserInfo.java
  27. 7 0
      donate-service/src/main/java/com/uas/service/donate/service/UserService.java
  28. 1 1
      donate-service/src/main/java/com/uas/service/donate/service/impl/ActivityServiceImpl.java
  29. 18 0
      donate-service/src/main/java/com/uas/service/donate/service/impl/UserServiceImpl.java
  30. 19 4
      donate-service/src/main/java/com/uas/service/donate/web/filter/SSOInterceptor.java
  31. 4 4
      donate-service/src/main/resources/dev/account.properties
  32. 4 4
      donate-service/src/main/resources/test/account.properties
  33. 6 0
      donate-service/src/main/webapp/resources/css/base.css
  34. 1 2
      donate-service/src/main/webapp/resources/js/common/query/Project.js
  35. 8 0
      donate-service/src/main/webapp/resources/js/common/query/User.js
  36. 2 2
      donate-service/src/main/webapp/resources/js/mobile/app.js
  37. 6 2
      donate-service/src/main/webapp/resources/js/mobile/controllers/MobileProjectDetailCtrl.js
  38. 1 1
      donate-service/src/main/webapp/resources/js/project/controllers/ProjectDetailCtrl.js
  39. 4 5
      donate-service/src/main/webapp/resources/view/mobile/mobile_project_detail.html
  40. 29 11
      donate-service/src/main/webapp/resources/view/project/project_detail.html

+ 15 - 15
donate-console/src/main/java/com/uas/console/donate/controller/ProjectController.java

@@ -285,12 +285,12 @@ public class ProjectController {
 
 
     @RequestMapping(value = "/save/finance/{id}", method = RequestMethod.POST)
     @RequestMapping(value = "/save/finance/{id}", method = RequestMethod.POST)
     @ResponseBody
     @ResponseBody
-    public ModelMap saveFinance(@RequestBody String json, @PathVariable("id") Long id ,FileUpload uploadItem) {
+    public ModelMap saveFinance(String json, @PathVariable("id") Long id ,MultipartFile img) throws IOException {
         ProjectFinance finance = JSONObject.parseObject(json, ProjectFinance.class);
         ProjectFinance finance = JSONObject.parseObject(json, ProjectFinance.class);
-        if (uploadItem != null && uploadItem.getFile() != null) {
-            Attach attach = attachService.upload(uploadItem, "", "一元捐财务披露发票图");
-            if (null != attach) {
-                finance.setPath(attach.getPath());
+        if (img != null) {
+            String path = fileClient.upload(img.getBytes(), img.getSize(), "jpg", null);
+            if (null != path) {
+                finance.setPath(path);
             }
             }
         }
         }
         return projectService.saveFinance(finance, id);
         return projectService.saveFinance(finance, id);
@@ -304,12 +304,12 @@ public class ProjectController {
 
 
     @RequestMapping(value = "/save/report/{id}", method = RequestMethod.POST)
     @RequestMapping(value = "/save/report/{id}", method = RequestMethod.POST)
     @ResponseBody
     @ResponseBody
-    public ModelMap saveReport(@RequestBody String json, @PathVariable("id") Long id ,FileUpload uploadItem) {
+    public ModelMap saveReport(@RequestBody String json, @PathVariable("id") Long id ,MultipartFile img) throws IOException {
         ProjectReport report = JSONObject.parseObject(json, ProjectReport.class);
         ProjectReport report = JSONObject.parseObject(json, ProjectReport.class);
-        if (uploadItem != null && uploadItem.getFile() != null) {
-            Attach attach = attachService.upload(uploadItem, "", "一元捐进度报告附图");
-            if (null != attach) {
-                report.setPath(attach.getPath());
+        if (img != null) {
+            String path = fileClient.upload(img.getBytes(), img.getSize(), "jpg", null);
+            if (null != path) {
+                report.setPath(path);
             }
             }
         }
         }
         return projectService.saveReport(report, id);
         return projectService.saveReport(report, id);
@@ -336,12 +336,12 @@ public class ProjectController {
      */
      */
     @RequestMapping(value = "/save/conclude/{id}", method = RequestMethod.POST)
     @RequestMapping(value = "/save/conclude/{id}", method = RequestMethod.POST)
     @ResponseBody
     @ResponseBody
-    public ModelMap saveConclude(@RequestBody String json, @PathVariable("id") Long id ,FileUpload uploadItem) {
+    public ModelMap saveConclude(@RequestBody String json, @PathVariable("id") Long id ,MultipartFile img) throws IOException {
         ProjectConclude conclude = JSONObject.parseObject(json, ProjectConclude.class);
         ProjectConclude conclude = JSONObject.parseObject(json, ProjectConclude.class);
-        if (uploadItem != null && uploadItem.getFile() != null) {
-            Attach attach = attachService.upload(uploadItem, "", "一元捐结项报告附图");
-            if (null != attach) {
-                conclude.setPath(attach.getPath());
+        if (img != null) {
+            String path = fileClient.upload(img.getBytes(), img.getSize(), "jpg", null);
+            if (null != path) {
+                conclude.setPath(path);
             }
             }
         }
         }
         return projectService.saveConclude(conclude, id);
         return projectService.saveConclude(conclude, id);

+ 2 - 2
donate-console/src/main/java/com/uas/console/donate/controller/ProjectEvolveController.java

@@ -64,8 +64,8 @@ public class ProjectEvolveController {
     }
     }
     //查找某项目所有的项目进度
     //查找某项目所有的项目进度
     @ResponseBody
     @ResponseBody
-    @RequestMapping("/getSchedules")
-    public List<ProjectEvolve> findAll(Long proId){
+    @RequestMapping(value = "/getSchedules/{proId}", method = RequestMethod.GET)
+    public List<ProjectEvolve> findAll(@PathVariable("proId")Long proId){
         return projectEvolveService.findAll(proId);
         return projectEvolveService.findAll(proId);
     }
     }
 
 

+ 4 - 2
donate-console/src/main/java/com/uas/console/donate/controller/ProjectFinanceController.java

@@ -9,7 +9,9 @@ import com.uas.dfs.service.FileClient;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
@@ -62,8 +64,8 @@ public class ProjectFinanceController {
      * @return
      * @return
      */
      */
     @ResponseBody
     @ResponseBody
-    @RequestMapping("/getFinance")
-    public ModelMap getFinance(Long proId){
+    @RequestMapping(value = "/getFinance/{proId}", method = RequestMethod.GET)
+    public ModelMap getFinance(@PathVariable("proId") Long proId){
         ModelMap map = new ModelMap();
         ModelMap map = new ModelMap();
         // 项目所有支出明细
         // 项目所有支出明细
         List<ProjectFinance> finances = projectFinanceService.findByProId(proId);
         List<ProjectFinance> finances = projectFinanceService.findByProId(proId);

+ 3 - 2
donate-console/src/main/java/com/uas/console/donate/controller/ProjectRecodeController.java

@@ -4,6 +4,7 @@ import com.uas.console.donate.model.ProjectRecode;
 import com.uas.console.donate.service.ProjectRecodeService;
 import com.uas.console.donate.service.ProjectRecodeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestMethod;
 
 
@@ -19,8 +20,8 @@ public class ProjectRecodeController {
     /**
     /**
      * 查询所有捐款记录
      * 查询所有捐款记录
      */
      */
-    @RequestMapping(value="/getRecords", method = RequestMethod.GET)
-    public List<ProjectRecode> getRecords(Long proId) {
+    @RequestMapping(value="/getRecords/{proId}", method = RequestMethod.GET)
+    public List<ProjectRecode> getRecords(@PathVariable("proId")Long proId) {
         return projectRecodeService.findProjectDetail(proId);
         return projectRecodeService.findProjectDetail(proId);
     }
     }
 
 

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

@@ -57,12 +57,8 @@ public class ActivityServiceImpl implements ActivityService{
      */
      */
     @Override
     @Override
     public Activity show(){
     public Activity show(){
-        Long userUU = 10000L;
-        if(activityDao.findDraft(userUU)!=null){
-            return activityDao.findDraft(userUU);
-        }else{
-            return null;
-        }
+        Long userUU = SystemSession.getUser().getUserUU();
+        return activityDao.findDraft(userUU);
     }
     }
     /**
     /**
      * 保存活动
      * 保存活动
@@ -83,7 +79,6 @@ public class ActivityServiceImpl implements ActivityService{
     }
     }
 
 
     private Activity submitOrSave(Activity activity) {
     private Activity submitOrSave(Activity activity) {
-        //TODO 加入账户信息
         activity.setUserUU(SystemSession.getUser().getUserUU());
         activity.setUserUU(SystemSession.getUser().getUserUU());
         activity.setPerson(SystemSession.getUser().getName());
         activity.setPerson(SystemSession.getUser().getName());
         activity.setSumconnect(activity.getProjects().size());
         activity.setSumconnect(activity.getProjects().size());

+ 2 - 2
donate-console/src/main/java/com/uas/console/donate/service/impl/ProjectServiceImpl.java

@@ -1,6 +1,7 @@
 package com.uas.console.donate.service.impl;
 package com.uas.console.donate.service.impl;
 
 
 
 
+import com.uas.console.donate.core.support.SystemSession;
 import com.uas.console.donate.dao.OrgDao;
 import com.uas.console.donate.dao.OrgDao;
 import com.uas.console.donate.dao.ProjectDao;
 import com.uas.console.donate.dao.ProjectDao;
 import com.uas.console.donate.dao.ProjectFinanceDao;
 import com.uas.console.donate.dao.ProjectFinanceDao;
@@ -288,8 +289,7 @@ public class ProjectServiceImpl implements ProjectService {
      */
      */
     @Override
     @Override
     public Project getSavedProject() {
     public Project getSavedProject() {
-        //TODO 获取登陆用户userUU
-        Long userUU = 10000L;
+        Long userUU = SystemSession.getUser().getUserUU();
         List<Project> projects = projectDao.findByPublishAndUserUU(1, userUU);
         List<Project> projects = projectDao.findByPublishAndUserUU(1, userUU);
         return !CollectionUtils.isEmpty(projects) ? projects.get(0) : null;
         return !CollectionUtils.isEmpty(projects) ? projects.get(0) : null;
     }
     }

+ 4 - 0
donate-console/src/main/java/com/uas/console/donate/web/filter/SSOInterceptor.java

@@ -38,6 +38,10 @@ public class SSOInterceptor extends AbstractSSOInterceptor {
 			if (user != null) {
 			if (user != null) {
 				request.getSession().setAttribute("user", user);
 				request.getSession().setAttribute("user", user);
 				User u = userDao.findOne(Long.valueOf(user.getDialectUID()));
 				User u = userDao.findOne(Long.valueOf(user.getDialectUID()));
+				if (null == u) {
+					u = new User(user);
+					u = userDao.save(u);
+				}
                 SystemSession.setUser(u);
                 SystemSession.setUser(u);
 			}
 			}
 		} else {
 		} else {

+ 5 - 0
donate-console/src/main/webapp/resources/css/base.css

@@ -251,4 +251,9 @@ button[disabled] {
 	background: url("../images/loading.gif") no-repeat center center;
 	background: url("../images/loading.gif") no-repeat center center;
 	width: 66px;
 	width: 66px;
 	height: 66px;
 	height: 66px;
+}
+
+input.ng-invalid.ng-dirty, textarea.ng-invalid.ng-dirty {
+	box-shadow: 0 0 2px #f00;
+	border: #f00 1px solid;
 }
 }

+ 102 - 37
donate-console/src/main/webapp/resources/js/index/app.js

@@ -1131,8 +1131,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     /**
     /**
      * 新建项目
      * 新建项目
      */
      */
-    app.controller('ProjectNewCtrl', ['$scope', 'BaseService', 'Project', '$http', 'toaster', '$stateParams',
-        function($scope, BaseService, Project, $http, toaster, $stateParams) {
+    app.controller('ProjectNewCtrl', ['$scope', 'BaseService', 'Project', '$http', 'toaster', '$stateParams', '$rootScope',
+        function($scope, BaseService, Project, $http, toaster, $stateParams, $rootScope) {
+        if ($rootScope.active) {
+            $rootScope.active = 'done';
+        }
 
 
         // 默认捐助领域
         // 默认捐助领域
         $scope.defaultAreas = ['疾病援助', '扶贫/救灾', '教育/助学' , '环境/动物保护', '其他'];
         $scope.defaultAreas = ['疾病援助', '扶贫/救灾', '教育/助学' , '环境/动物保护', '其他'];
@@ -1160,7 +1163,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
             });
             });
 
 
             Project.getSavedProject({}, {}, function(data) {
             Project.getSavedProject({}, {}, function(data) {
-                if(!angular.isObject(data)) {
+                if(angular.isObject(data)) {
                     $scope.project = data;
                     $scope.project = data;
                     $scope.pcImgUrl = data.pcImg;
                     $scope.pcImgUrl = data.pcImg;
                     $scope.mobileImgUrl = data.mobileImg;
                     $scope.mobileImgUrl = data.mobileImg;
@@ -1383,6 +1386,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
                 if (type) {
                 if (type) {
                     toaster.pop('success', '发布成功');
                     toaster.pop('success', '发布成功');
                     BaseService.scrollBackToTop();
                     BaseService.scrollBackToTop();
+                    $rootScope.active = 'todo';
                     window.location.href='#/launchProject/success';
                     window.location.href='#/launchProject/success';
                 } else {
                 } else {
                     toaster.pop('success', '保存成功');
                     toaster.pop('success', '保存成功');
@@ -1478,8 +1482,8 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
     /**
     /**
      * 财务披露详情框
      * 财务披露详情框
      */
      */
-    app.controller('ProjectFinanceDetailCtrl', ['$scope', 'Project', 'toaster', '$modalInstance', 'BaseService', 'id', '$upload',
-        function($scope, Project, toaster, $modalInstance, BaseService, id, $upload) {
+    app.controller('ProjectFinanceDetailCtrl', ['$scope', 'Project', 'toaster', '$modalInstance', 'BaseService', 'id', '$upload', '$http',
+        function($scope, Project, toaster, $modalInstance, BaseService, id, $upload, $http) {
 
 
             $scope.newFinance = {
             $scope.newFinance = {
                 amount: null,
                 amount: null,
@@ -1487,6 +1491,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
                 description: null,
                 description: null,
                 type : null
                 type : null
             };
             };
+            $scope.imgUrl = null;
 
 
             var loadData = function() {
             var loadData = function() {
                 // 获取项目详情
                 // 获取项目详情
@@ -1495,11 +1500,8 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
                 }, function() {
                 }, function() {
                     toaster.pop('error', '详情加载失败');
                     toaster.pop('error', '详情加载失败');
                 });
                 });
-            };
-            loadData();
 
 
-            // 获取当前项目财务信息
-            $scope.getFinance = function() {
+                // 获取当前项目财务信息
                 Project.getFinance({id:id}, {}, function(data) {
                 Project.getFinance({id:id}, {}, function(data) {
                     $scope.projectFinance = data.projectFinance;
                     $scope.projectFinance = data.projectFinance;
                     $scope.totalCost = data.totalCost;
                     $scope.totalCost = data.totalCost;
@@ -1509,21 +1511,75 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
                     toaster.pop('error','财务明细加载失败');
                     toaster.pop('error','财务明细加载失败');
                 });
                 });
             };
             };
+            loadData();
 
 
             $scope.cancel= function() {
             $scope.cancel= function() {
                 $modalInstance.dismiss();
                 $modalInstance.dismiss();
             };
             };
 
 
+            $scope.fileChanged = function(ele) {
+                $scope.newFinance.file = ele.files[0];
+                $scope.imgUrl = getObjectURL(ele.files[0]);
+            };
+
+            //建立一个可存取到该file的url
+            var getObjectURL = function (file) {
+                var url = null;
+                if (window.createObjectURL != undefined) { // basic
+                    url = window.createObjectURL(file);
+                } else if (window.URL != undefined) { // mozilla(firefox)
+                    url = window.URL.createObjectURL(file);
+                } else if (window.webkitURL != undefined) { // webkit or chrome
+                    url = window.webkitURL.createObjectURL(file);
+                }
+                return url;
+            };
+
+            // // 查看范例
+            // $scope.showImg = function () {
+            //     var imgUrl = $scope.imgUrl;
+            //     if (imgUrl != null) {
+            //         var src = imgUrl, box = $('#image-box');
+            //         box.show();
+            //         box.find('img').attr('src', src);
+            //         box.find('a').click(function () {
+            //             box.hide();
+            //         });
+            //         box.dblclick(function () {
+            //             box.hide();
+            //         });
+            //     }
+            // };
+
+            // 删除活动图或banner
+            $scope.clearFile = function (type) {
+                $scope.newFinance.file = null;
+                $scope.imgUrl = null;
+                // 清空input框的内容
+                var file=document.getElementById(type);
+                //IE,Safari,chrome
+                if(file.outerHTML){
+                    file.outerHTML=file.outerHTML;
+                }
+                else{      //FF
+                    file.value="";
+                }
+            };
+
             // 发布
             // 发布
             $scope.saveFinance = function(finance) {
             $scope.saveFinance = function(finance) {
-                var file = finance.file;
-                $upload.upload({
-                    url: 'project/save/finance' + id,
-                    file: file,
+                var data = new FormData();
+                data.append('json', JSON.stringify(finance));
+                data.append('img', finance.file);
+                $http({
+                    headers: {
+                        'Content-Type': undefined
+                    },
                     method: 'POST',
                     method: 'POST',
-                    data: {
-                        json: finance
-                    }
+                    processData: false,
+                    async: false,
+                    url: 'project/save/finance/' + id,
+                    data: data
                 }).success(function(data){
                 }).success(function(data){
                     toaster.pop('success', '发布财务信息成功');
                     toaster.pop('success', '发布财务信息成功');
                 }).error(function(data){
                 }).error(function(data){
@@ -1635,13 +1691,11 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
                 });
                 });
 
 
                 // 获取当前项目所有进度
                 // 获取当前项目所有进度
-                $scope.getSchedules = function() {
-                    Project.getSchedules({id : id}, {}, function(data) {
-                        $scope.schedules = data;
-                    }, function() {
-                        toaster.pop('error', '项目进度加载失败');
-                    });
-                };
+                Project.getSchedules({id : id}, {}, function(data) {
+                    $scope.schedules = data;
+                }, function() {
+                    toaster.pop('error', '项目进度加载失败');
+                });
             };
             };
             loadData();
             loadData();
 
 
@@ -1651,14 +1705,18 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
 
 
             // 发布
             // 发布
             $scope.saveReport = function(report) {
             $scope.saveReport = function(report) {
-                var file = report.file;
-                $upload.upload({
-                    url: 'project/save/report' + id,
-                    file: file,
+                var data = new FormData();
+                data.append('json', JSON.stringify(report));
+                data.append('img', report.file);
+                $http({
+                    headers: {
+                        'Content-Type': undefined
+                    },
                     method: 'POST',
                     method: 'POST',
-                    data: {
-                        json: report
-                    }
+                    processData: false,
+                    async: false,
+                    url: 'project/save/report/' + id,
+                    data: data
                 }).success(function(data){
                 }).success(function(data){
                     toaster.pop('success', '发布进度信息成功');
                     toaster.pop('success', '发布进度信息成功');
                 }).error(function(data){
                 }).error(function(data){
@@ -1786,14 +1844,18 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
 
 
             // 发布
             // 发布
             $scope.saveConclude = function(conclude) {
             $scope.saveConclude = function(conclude) {
-                var file = conclude.file ? conclude.file : null;
-                $upload.upload({
-                    url: 'project/save/conclude' + id,
-                    file: file,
+                var data = new FormData();
+                data.append('json', JSON.stringify(conclude));
+                data.append('img', conclude.file);
+                $http({
+                    headers: {
+                        'Content-Type': undefined
+                    },
                     method: 'POST',
                     method: 'POST',
-                    data: {
-                        json: conclude
-                    }
+                    processData: false,
+                    async: false,
+                    url: 'project/save/conclude/' + id,
+                    data: data
                 }).success(function(data){
                 }).success(function(data){
                     toaster.pop('success', '发布结项信息成功');
                     toaster.pop('success', '发布结项信息成功');
                 }).error(function(data){
                 }).error(function(data){
@@ -2324,6 +2386,9 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
             };
             };
 
 
             $scope.active = 'done';
             $scope.active = 'done';
+            if ($rootScope.active) {
+                $scope.active = $rootScope.active;
+            }
             $scope.keyword = '';
             $scope.keyword = '';
 
 
             /**
             /**

+ 19 - 7
donate-console/src/main/webapp/resources/js/index/services/Project.js

@@ -33,8 +33,11 @@ define ([ 'ngResource' ], function() {
             },
             },
             // 获取所有项目进度
             // 获取所有项目进度
             getSchedules: {
             getSchedules: {
-                url:'projectEvolve/getSchedules',
-                method: 'GET'
+                url:'projectEvolve/getSchedules/:id',
+                method: 'GET',
+                params: {
+                    id: 'id'
+                }
             },
             },
             // 删除项目进度
             // 删除项目进度
             deleteSchedule: {
             deleteSchedule: {
@@ -46,13 +49,19 @@ define ([ 'ngResource' ], function() {
             },
             },
             // 获取项目所有捐款明细
             // 获取项目所有捐款明细
             getRecords: {
             getRecords: {
-                url:'projectrecode/getRecords',
-                method:'GET'
+                url:'projectrecode/getRecords/:proId',
+                method:'GET',
+                params: {
+                    id: 'proId'
+                }
             },
             },
             // 获取财务支出
             // 获取财务支出
             getFinance: {
             getFinance: {
-                url:'projectFinance/getFinance',
-                method: 'GET'
+                url:'projectFinance/getFinance/:id',
+                method: 'GET',
+                params: {
+                    id: 'id'
+                }
             },
             },
             // 重新申请
             // 重新申请
             reapply: {
             reapply: {
@@ -77,7 +86,10 @@ define ([ 'ngResource' ], function() {
             // 获取执行天数和更新次数
             // 获取执行天数和更新次数
             getConcludeData: {
             getConcludeData: {
                 url: 'project/getConclude/:id',
                 url: 'project/getConclude/:id',
-                method: 'GET'
+                method: 'GET',
+                params: {
+                    id: 'id'
+                }
             },
             },
             // 获取已保存的项目
             // 获取已保存的项目
             getSavedProject: {
             getSavedProject: {

+ 13 - 0
donate-console/src/main/webapp/resources/jsondata/classify.json

@@ -69,6 +69,19 @@
     "其他"
     "其他"
   ],
   ],
   "其他": [
   "其他": [
+    "公益倡导",
+    "传统文化",
+    "文物保护",
+    "社区公益",
+    "工艺发展",
+    "公益梦想",
+    "社会创新",
+    "特殊关爱",
+    "生命权益",
+    "人文关怀",
+    "平等就业",
+    "心理陪护",
+    "工艺挑战",
     "其他"
     "其他"
   ]
   ]
 }
 }

+ 53 - 69
donate-console/src/main/webapp/resources/view/project/project_finance.html

@@ -15,23 +15,23 @@
             <div class="list-body clearfix">
             <div class="list-body clearfix">
                 <div class="msg-list fl">
                 <div class="msg-list fl">
                     <span class="fl">项目总募款</span>
                     <span class="fl">项目总募款</span>
-                    <span class="fl info mCount" ng-bind="project.totalAmount"></span>
+                    <span class="fl info mCount" ng-bind="project.totalAmount || 0 | number: 2"></span>
                 </div>
                 </div>
                 <div class="msg-list fl">
                 <div class="msg-list fl">
                     <span class="fl">善款总支出</span>
                     <span class="fl">善款总支出</span>
-                    <span class="fl">{{totalCost | number:2}}元</span>
+                    <span class="fl">{{totalCost || 0 | number:2}}元</span>
                 </div>
                 </div>
                 <div class="msg-list fl">
                 <div class="msg-list fl">
                     <span class="fl">执行进度</span>
                     <span class="fl">执行进度</span>
-                    <span class="fl">{{totalCost / totalAmount * 100 | number:2}}%</span>
+                    <span class="fl">{{totalCost / totalAmount * 100 || 0 | number:2}}%</span>
                 </div>
                 </div>
                 <div class="msg-list fl">
                 <div class="msg-list fl">
                     <span class="fl">执行成本</span>
                     <span class="fl">执行成本</span>
-                    <span class="fl">{{executeCost | number:2}}({{executeCost/totalCost * 100 | number:2}}%)</span>
+                    <span class="fl">{{executeCost || 0 | number:2}}({{executeCost/totalCost * 100 || 0 | number:2}}%)</span>
                 </div>
                 </div>
                 <div class="msg-list fl">
                 <div class="msg-list fl">
                     <span class="fl">项目支出</span>
                     <span class="fl">项目支出</span>
-                    <span class="fl">{{projectCost | number:2}}({{projectCost/totalCost * 100 | number:2}}%)</span>
+                    <span class="fl">{{projectCost || 0 | number:2}}({{projectCost/totalCost * 100 || 0 | number:2 || 0}}%)</span>
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
@@ -40,41 +40,6 @@
                 <span>支出明细</span>
                 <span>支出明细</span>
             </div>
             </div>
             <div class="list-body clearfix">
             <div class="list-body clearfix">
-                <!--<div class="msg-list">-->
-                    <!--<span class="fl">2017-09-10</span>-->
-                    <!--<div class="spending-detail fl">-->
-                        <!--<span class="detail">项目支出</span>-->
-                        <!--<div><b>3758.00元</b><span>购买XXX*35,购买学生节日补贴小礼品(包括粽子50个,水果10kg,大米5kg)</span></div>-->
-                        <!--<div><b>4200.00元</b><span>购买学生来回车票70张</span></div>-->
-                        <!--<div class="thumbnail-img clearfix">-->
-                            <!--<div class="thumb fl">-->
-                                <!--发票略缩图-->
-                                <!--<input type="file">-->
-                            <!--</div>-->
-                            <!--<div class="thumb fl">-->
-                                <!--发票略缩图-->
-                                <!--<input type="file">-->
-                            <!--</div>-->
-                        <!--</div>-->
-                    <!--</div>-->
-                <!--</div>-->
-                <!--<div class="msg-list">-->
-                    <!--<span class="fl">2017-09-16</span>-->
-                    <!--<div class="spending-detail fl">-->
-                        <!--<span class="detail">执行成本</span>-->
-                        <!--<div><b>1058.00元</b><span>执行人员车票20人*50元,中午用餐费428元,机构管理费48元</span></div>-->
-                        <!--<div class="thumbnail-img clearfix">-->
-                            <!--<div class="thumb fl">-->
-                                <!--发票略缩图-->
-                                <!--<input type="file">-->
-                            <!--</div>-->
-                            <!--<div class="thumb fl">-->
-                                <!--发票略缩图-->
-                                <!--<input type="file">-->
-                            <!--</div>-->
-                        <!--</div>-->
-                    <!--</div>-->
-                <!--</div>-->
                 <div class="msg-list" ng-repeat="finance in projectFinance">
                 <div class="msg-list" ng-repeat="finance in projectFinance">
                     <span class="fl" ng-bind="finace.submitTime | date :'yyyy-MM-dd'"></span>
                     <span class="fl" ng-bind="finace.submitTime | date :'yyyy-MM-dd'"></span>
                     <div class="spending-detail fl">
                     <div class="spending-detail fl">
@@ -82,7 +47,6 @@
                         <div><b>{{finance.amount}}元</b><span ng-bind="finance.description"></span></div>
                         <div><b>{{finance.amount}}元</b><span ng-bind="finance.description"></span></div>
                         <div class="thumbnail-img clearfix">
                         <div class="thumbnail-img clearfix">
                             <div class="thumb fl">
                             <div class="thumb fl">
-                                发票略缩图
                                 <img src="{{finance.path}}" alt="发票缩略图">
                                 <img src="{{finance.path}}" alt="发票缩略图">
                             </div>
                             </div>
                         </div>
                         </div>
@@ -94,43 +58,63 @@
     <!--披露录入-->
     <!--披露录入-->
     <div class="right-list">
     <div class="right-list">
         <div class="list-message">
         <div class="list-message">
-            <div class="list-body clearfix">
-                <div class="msg-list msgs-list fl">
-                    <span class="fl">支出类型</span>
-                    <div class="pay fl">
-                        <select name="" ng-model="newFinance.type" id="" class="form-control" ng-init="newFinance.type = 1">
-                            <option value="1">项目支出</option>
-                            <option value="2">执行成本</option>
-                        </select>
+            <form name="financeForm">
+                <div class="list-body clearfix">
+                    <div class="msg-list msgs-list fl">
+                        <span class="fl">支出类型</span>
+                        <div class="pay fl">
+                            <select name="" ng-model="newFinance.type" id="" class="form-control" ng-init="newFinance.type = 1">
+                                <option value="1">项目支出</option>
+                                <option value="2">执行成本</option>
+                            </select>
+                        </div>
                     </div>
                     </div>
-                </div>
-                <div class="msg-list msgs-list fl">
-                    <span class="fl">支出金额</span>
-                    <div class="fl payment text-right">
-                        <input type="text" ng-model="newFinance.amount" ng-pattern="/^[0-9]+(\.[0-9]{0,2})?$/" class="form-control">
+                    <div class="msg-list msgs-list fl">
+                        <span class="fl">支出金额</span>
+                        <div class="fl payment text-right">
+                            <input type="text" ng-model="newFinance.amount" required ng-pattern="/^\d{0,9}(\.\d{0,2})?$/" class="form-control">
+                        </div>
                     </div>
                     </div>
-                </div>
-                <div class="msg-list clearfix">
-                    <span class="fl">支出说明</span>
-                    <div class="fl pay-state">
-                        <textarea name="" style="resize: none;" ng-model="newFinance.description" class="form-control" id="" cols="30" rows="10" placeholder="请列举并详细说明善款的用途..."></textarea>
+                    <div class="msg-list clearfix">
+                        <span class="fl">支出说明</span>
+                        <div class="fl pay-state">
+                            <textarea name="" style="resize: none;" ng-model="newFinance.description" required class="form-control" cols="30" rows="10" placeholder="请列举并详细说明善款的用途..."></textarea>
+                        </div>
                     </div>
                     </div>
-                </div>
-                <div class="msg-list clearfix">
-                    <span class="fl">发票证明</span>
-                    <div class="fl">
-                        <div class="invoiced">
-                            <img src="static/images/plus.png" alt=""/>
-                            <input type="file" ng-model="newFinance.file" ng-change="uploadBillImg()">
+                    <div class="msg-list clearfix">
+                        <span class="fl">发票证明</span>
+                        <div class="fl">
+                            <div class="invoiced">
+                                <!--<img src="static/images/plus.png" alt=""/>-->
+                                <input type="file" accept="image/*" id="img" onchange='angular.element(this).scope().fileChanged(this)' required
+                                       ng-multiple="false">
+                            </div>
+                            <div class="tip">(请上传发票清晰的正面照,支持jpg,gif,png格式,不超过10MB)</div>
+                            <!--<div ng-if="null != imgUrl" style="max-height: 100px; max-width: 300px">-->
+                                <!--<img style="max-height: 100px; max-width: 100px" src="{{imgUrl}}">-->
+                                <!--<span class="hover-show">-->
+                                    <!--<em style="cursor: pointer;" class="delete" title="删除" ng-click="clearFile('img')"><em class="fa fa-2x fa-trash"></em></em>-->
+                                    <!--&lt;!&ndash;<a ng-click="showImg()" title="点击查看大图"><em class="fa fa-search"></em>查看</a>&ndash;&gt;-->
+                                <!--</span>-->
+                            <!--</div>-->
+                            <div class="release"><button ng-disabled="financeForm.$invalid" ng-click="saveFinance(newFinance)">发布</button></div>
                         </div>
                         </div>
-                        <div class="tip">(请上传发票清晰的正面照,支持jpg,gif,png格式,不超过10MB)</div>
-                        <div class="release"><a ng-click="saveFinance(newFinance)">发布</a></div>
                     </div>
                     </div>
                 </div>
                 </div>
-            </div>
+            </form>
         </div>
         </div>
     </div>
     </div>
     <!--</div>-->
     <!--</div>-->
+    <!--查看大图-->
+    <div id="image-box" style="display: none;">
+        <div class="x-close-wrap" title="关闭">
+            <a href="javascript:void(0);">&times;</a>
+        </div>
+        <div class="x-floating-wrap"></div>
+        <div class="x-floating">
+            <img/>
+        </div>
+    </div>
 </aside>
 </aside>
 
 
 <script>
 <script>

+ 21 - 0
donate-console/src/main/webapp/resources/view/project/project_list_finance.html

@@ -719,6 +719,27 @@
         border-radius: 3px;
         border-radius: 3px;
         letter-spacing: 0;
         letter-spacing: 0;
     }
     }
+
+    .right-list .release button:first-child {
+         margin-right: 27px;
+         background: #3c8dbc;
+     }
+
+    .right-list .release button {
+        display: inline-block;
+        width: 140px;
+        height: 34px;
+        line-height: 34px;
+        color: #fff;
+        letter-spacing: 10px;
+        border-radius: 5px;
+        text-align: center;
+        margin: 20px;
+    }
+
+    .right-list .release button[disabled] {
+        background: #a0a0a0;
+    }
 </style>
 </style>
 <div class="content-wrapper" style="min-height: 1500px;; z-index: 50;">
 <div class="content-wrapper" style="min-height: 1500px;; z-index: 50;">
     <section class="content-header clearfix">
     <section class="content-header clearfix">

+ 21 - 0
donate-console/src/main/webapp/resources/view/project/project_list_management.html

@@ -719,6 +719,27 @@
         border-radius: 3px;
         border-radius: 3px;
         letter-spacing: 0;
         letter-spacing: 0;
     }
     }
+
+    .right-list .release button:first-child {
+        margin-right: 27px;
+        background: #3c8dbc;
+    }
+
+    .right-list .release button {
+        display: inline-block;
+        width: 140px;
+        height: 34px;
+        line-height: 34px;
+        color: #fff;
+        letter-spacing: 10px;
+        border-radius: 5px;
+        text-align: center;
+        margin: 20px;
+    }
+
+    .right-list .release button[disabled] {
+        background: #a0a0a0;
+    }
 </style>
 </style>
 <div class="content-wrapper" style="min-height: 1500px;; z-index: 50;">
 <div class="content-wrapper" style="min-height: 1500px;; z-index: 50;">
     <section class="content-header clearfix">
     <section class="content-header clearfix">

+ 23 - 0
donate-console/src/main/webapp/resources/view/project/project_list_report.html

@@ -165,6 +165,7 @@
         /*width: 50%;*/
         /*width: 50%;*/
         width: 905px;
         width: 905px;
         height: auto;
         height: auto;
+        min-height: 500px;
         background: #fff;
         background: #fff;
         z-index: 100;
         z-index: 100;
         /*box-shadow: -5px 2px 2px #f0f0f0;*/
         /*box-shadow: -5px 2px 2px #f0f0f0;*/
@@ -719,6 +720,28 @@
         border-radius: 3px;
         border-radius: 3px;
         letter-spacing: 0;
         letter-spacing: 0;
     }
     }
+
+
+    .right-list .release button:first-child {
+        margin-right: 27px;
+        background: #3c8dbc;
+    }
+
+    .right-list .release button {
+        display: inline-block;
+        width: 140px;
+        height: 34px;
+        line-height: 34px;
+        color: #fff;
+        letter-spacing: 10px;
+        border-radius: 5px;
+        text-align: center;
+        margin: 20px;
+    }
+
+    .right-list .release button[disabled] {
+        background: #a0a0a0;
+    }
 </style>
 </style>
 <div class="content-wrapper" style="min-height: 1500px;; z-index: 50;">
 <div class="content-wrapper" style="min-height: 1500px;; z-index: 50;">
     <section class="content-header clearfix">
     <section class="content-header clearfix">

+ 16 - 13
donate-console/src/main/webapp/resources/view/project/project_management.html

@@ -15,29 +15,32 @@
                 </div>
                 </div>
                 <div class="msg-list fl">
                 <div class="msg-list fl">
                     <span class="fl">执行天数</span>
                     <span class="fl">执行天数</span>
-                    <span class="fl" ng-bind="executeDays"></span>
+                    <span class="fl" ng-bind="executeDays || 0 | number"></span>
                 </div>
                 </div>
                 <div class="msg-list fl">
                 <div class="msg-list fl">
                     <span class="fl">进度更新</span>
                     <span class="fl">进度更新</span>
-                    <span class="fl" ng-bind="updateTimes"></span>
+                    <span class="fl" ng-bind="updateTimes || 0 | number"></span>
                 </div>
                 </div>
                 <div class="msg-list fl">
                 <div class="msg-list fl">
                     <span class="fl">执行进度</span>
                     <span class="fl">执行进度</span>
-                    <span class="fl">{{project.totalCost}}元({{project.totalCost / project.totalAmount * 100}}%)</span>
+                    <span class="fl">{{project.totalCost || 0 | number:2}}元({{project.totalCost / project.totalAmount * 100 || 0 | number:2}}%)</span>
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
-        <div class="message-detail">
-            <div class="header">
-                <div class="img"><img src="static/images/pic.png" alt="">图片</div>
-                <input type="file" ng-model="conclude.file">
-            </div>
-            <div class="body">
-                <textarea name="" ng-model="conclude.description" class="form-control" id="" cols="30" rows="10" placeholder="详细项目最终执行情况及结果..."></textarea>
+        <form name="endForm">
+            <div class="message-detail">
+                <!-- TODO 加富文本编辑器 -->
+                <div class="header">
+                    <div class="img"><img src="static/images/pic.png" alt="">图片</div>
+                    <input type="file" ng-model="conclude.file">
+                </div>
+                <div class="body">
+                    <textarea name="" ng-model="conclude.description" class="form-control" id="" cols="30" rows="10" placeholder="详细项目最终执行情况及结果..."></textarea>
+                </div>
+                <p class="project-tip">发布结项报告后,项目将自动结束,并且不可再编辑录入。请尽可能在执行进度为100%后再发布结项报告。</p>
+                <div class="release"><button ng-disabled="endForm.$invalid" ng-click="saveConclude(conclude)">发布</button></div>
             </div>
             </div>
-            <p class="project-tip">发布结项报告后,项目将自动结束,并且不可再编辑录入。请尽可能在执行进度为100%后再发布结项报告。</p>
-            <div class="release"><a ng-click="saveConclude(conclude)">发布</a></div>
-        </div>
+        </form>
     </div>
     </div>
 </aside>
 </aside>
 <script>
 <script>

+ 15 - 21
donate-console/src/main/webapp/resources/view/project/project_report.html

@@ -9,19 +9,10 @@
     <div class="right-nav"><span class="active">项目进度</span><span>进度录入</span></div>
     <div class="right-nav"><span class="active">项目进度</span><span>进度录入</span></div>
     <!--项目进度-->
     <!--项目进度-->
     <div class="right-list show">
     <div class="right-list show">
-        <div class="list-message">
-            <p class="first-txt">
-                7月29日,上午辗转几处洽谈,寻找购置商家,由于当初预算课桌椅和餐桌椅报价太低,经反复思索与寻求朋友帮忙,终于找到本地
-                一个爱心老板愿意援手,无偿支持。
-            </p>
-            <p>
-                河南省信阳市平桥区五里镇柿元小学“换个课桌黑板好读书”项目,实际筹款总额:4455.7 元,“一校一梦想”基金配捐:10381
-                元,实际拨付善款:14830元。剩余6.7元用于“一校一梦想”其他项目。
+        <div ng-if="schedules == null" class="list-message">
+            <p class="first-txt" style="text-align: center; color: #a0a0a0; font-size: 22px;">
+                该项目暂无进度!
             </p>
             </p>
-            <div class="img">
-                <img src="static/images/active04.png" alt=""/>
-            </div>
-            <div class="time"><span>2017-11-8 15:42:54</span><a>删除</a></div>
         </div>
         </div>
         <div class="list-message" ng-repeat="schedule in schedules | orderBy : 'date'">
         <div class="list-message" ng-repeat="schedule in schedules | orderBy : 'date'">
             <p class="first-txt">
             <p class="first-txt">
@@ -32,16 +23,19 @@
     </div>
     </div>
     <!--进度录入-->
     <!--进度录入-->
     <div class="right-list">
     <div class="right-list">
-        <div class="message-detail">
-            <div class="header">
-                <div class="img"><img src="static/images/pic.png" alt="">图片</div>
-                <input type="file" ng-model="report.file">
+        <form name="reportForm">
+            <!-- TODO 加富文本编辑器 -->">
+            <div class="message-detail">
+                <div class="header">
+                    <div class="img"><img src="static/images/pic.png" alt="">图片</div>
+                    <input type="file" ng-model="report.file" accept="image/*" ng-multiple="false" onchange='angular.element(this).scope().fileChanged(this)'>
+                </div>
+                <div class="body">
+                    <textarea name="" ng-model="report.description" class="form-control" id="" cols="30" rows="10" placeholder="请输入近期执行进度记录,并上传相关图片..."></textarea>
+                </div>
+                <div class="release"><button ng-disabled="reportForm.$invalid" ng-click="saveReport(report)">发布</button></div>
             </div>
             </div>
-            <div class="body">
-                <textarea name="" ng-model="report.description" class="form-control" id="" cols="30" rows="10" placeholder="请输入近期执行进度记录,并上传相关图片..."></textarea>
-            </div>
-            <div class="release"><a ng-click="saveReport(report)">发布</a></div>
-        </div>
+        </form>
     </div>
     </div>
     <!--</div>-->
     <!--</div>-->
 </aside>
 </aside>

+ 1 - 0
donate-service/src/main/java/com/uas/service/donate/controller/AlipayController.java

@@ -19,6 +19,7 @@ import com.alipay.api.response.AlipayUserInfoShareResponse;
 import com.uas.service.donate.DruidDBConfiguration;
 import com.uas.service.donate.DruidDBConfiguration;
 import com.uas.service.donate.api.AlipayApi;
 import com.uas.service.donate.api.AlipayApi;
 import com.uas.service.donate.config.AlipayConfig;
 import com.uas.service.donate.config.AlipayConfig;
+import com.uas.service.donate.core.support.SystemSession;
 import com.uas.service.donate.model.*;
 import com.uas.service.donate.model.*;
 import com.uas.service.donate.service.AlipayOrderService;
 import com.uas.service.donate.service.AlipayOrderService;
 import com.uas.service.donate.service.AlipayUserService;
 import com.uas.service.donate.service.AlipayUserService;

+ 4 - 4
donate-service/src/main/java/com/uas/service/donate/controller/AuthenticationController.java

@@ -1,8 +1,8 @@
 package com.uas.service.donate.controller;
 package com.uas.service.donate.controller;
 
 
 
 
-import com.uas.service.donate.model.SystemSession;
-import com.uas.service.donate.model.UserInfo;
+import com.uas.service.donate.core.support.SystemSession;
+import com.uas.service.donate.model.User;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
@@ -15,11 +15,11 @@ public class AuthenticationController {
     @RequestMapping(method = RequestMethod.GET, headers = "Accept=application/json")
     @RequestMapping(method = RequestMethod.GET, headers = "Accept=application/json")
     @ResponseBody
     @ResponseBody
     @ResponseStatus(value = HttpStatus.OK)
     @ResponseStatus(value = HttpStatus.OK)
-    public UserInfo getAuthentication(HttpSession session) {
+    public User getAuthentication(HttpSession session) {
         if (SystemSession.getUser() == null) {
         if (SystemSession.getUser() == null) {
             return null;
             return null;
         }
         }
-        return new UserInfo(SystemSession.getUser());
+        return SystemSession.getUser();
     }
     }
 
 
 }
 }

+ 6 - 6
donate-service/src/main/java/com/uas/service/donate/controller/ProjectConcludeController.java

@@ -6,11 +6,11 @@ import com.uas.service.donate.service.ProjectConcludeService;
 import com.uas.service.donate.service.ProjectFinanceService;
 import com.uas.service.donate.service.ProjectFinanceService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 
-import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
 @Controller
 @Controller
@@ -30,13 +30,13 @@ public class ProjectConcludeController {
      */
      */
     @ResponseBody
     @ResponseBody
     @RequestMapping(value = "/conclude",method = RequestMethod.GET)
     @RequestMapping(value = "/conclude",method = RequestMethod.GET)
-    public List<Object> getConclude(Long proId){
+    public ModelMap getConclude(Long proId){
+        ModelMap map = new ModelMap();
         List<ProjectConclude> projectConcludeList=projectConcludeService.findAll(proId);
         List<ProjectConclude> projectConcludeList=projectConcludeService.findAll(proId);
         List<ProjectFinance> projectFinanceList=projectFinanceService.findAll(proId);
         List<ProjectFinance> projectFinanceList=projectFinanceService.findAll(proId);
-        List<Object> list=new ArrayList<Object>();
-        list.add(projectConcludeList);
-        list.add(projectFinanceList);
-        return list;
+        map.put("report", projectConcludeList);
+        map.put("finance", projectFinanceList);
+        return map;
     }
     }
 
 
 
 

+ 12 - 0
donate-service/src/main/java/com/uas/service/donate/controller/UserController.java

@@ -3,12 +3,24 @@ package com.uas.service.donate.controller;
 import com.uas.service.donate.service.UserService;
 import com.uas.service.donate.service.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
 
 
 @Controller
 @Controller
+@RequestMapping("/user")
 public class UserController {
 public class UserController {
 
 
     @Autowired
     @Autowired
     private UserService userService;
     private UserService userService;
 
 
+    @RequestMapping(value = "/getUserUUByImId/{imId}", method = RequestMethod.GET)
+    @ResponseBody
+    public ModelMap getUserUUByImId (@PathVariable("imId") Long imId) {
+        return new ModelMap("userUU", userService.getUserByImId(imId));
+    }
+
 
 
 }
 }

+ 5 - 1
donate-service/src/main/java/com/uas/service/donate/controller/WxpayController.java

@@ -13,7 +13,11 @@ import com.uas.dfs.service.FileClient;
 import com.uas.platform.core.util.HttpUtil;
 import com.uas.platform.core.util.HttpUtil;
 import com.uas.service.donate.api.WxPayApi;
 import com.uas.service.donate.api.WxPayApi;
 import com.uas.service.donate.config.WxConfig;
 import com.uas.service.donate.config.WxConfig;
-import com.uas.service.donate.model.*;
+import com.uas.service.donate.core.support.SystemSession;
+import com.uas.service.donate.model.Project;
+import com.uas.service.donate.model.ProjectRecode;
+import com.uas.service.donate.model.User;
+import com.uas.service.donate.model.WechatOrder;
 import com.uas.service.donate.service.ProjectRecodeService;
 import com.uas.service.donate.service.ProjectRecodeService;
 import com.uas.service.donate.service.ProjectService;
 import com.uas.service.donate.service.ProjectService;
 import com.uas.service.donate.service.WechatOrderService;
 import com.uas.service.donate.service.WechatOrderService;

+ 18 - 13
donate-service/src/main/java/com/uas/service/donate/core/support/SystemSession.java

@@ -1,22 +1,27 @@
 package com.uas.service.donate.core.support;
 package com.uas.service.donate.core.support;
 
 
-import com.uas.account.entity.UserView;
+import com.uas.service.donate.model.User;
 
 
 /**
 /**
- * created by shicr on 2017/11/23
- **/
+ * 每次请求服务器时,用户信息存放在本次线程中
+ * 
+ * @author yingp
+ * 
+ */
 public class SystemSession {
 public class SystemSession {
-    private static ThreadLocal<UserView> local = new ThreadLocal<UserView>();
 
 
-    public static void setUser(UserView session) {
-        local.set(session);
-    }
+	private static ThreadLocal<User> local = new ThreadLocal<User>();
 
 
-    public static UserView getUser() {
-        return local.get();
-    }
+	public static void setUser(User session) {
+		local.set(session);
+	}
+
+	public static User getUser() {
+		return local.get();
+	}
+
+	public static void clear() {
+		local.set(null);
+	}
 
 
-    public static void clear() {
-        local.set(null);
-    }
 }
 }

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

@@ -1,12 +1,13 @@
 package com.uas.service.donate.model;
 package com.uas.service.donate.model;
 
 
 import javax.persistence.*;
 import javax.persistence.*;
+import java.io.Serializable;
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Date;
 
 
 @Entity
 @Entity
 @Table(name="donate$projectrecode")
 @Table(name="donate$projectrecode")
-public class ProjectRecode {
+public class ProjectRecode implements Serializable{
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
     private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm");
     private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH:mm");
 
 
@@ -24,8 +25,8 @@ public class ProjectRecode {
     /**
     /**
      * 项目
      * 项目
      */
      */
-    @OneToOne(cascade = { CascadeType.REFRESH, CascadeType.MERGE })
-    @JoinColumn(name = "pr_pro_id", insertable = false, updatable = false)
+    @OneToOne(cascade = {CascadeType.MERGE, CascadeType.REFRESH}, targetEntity = Project.class)
+    @JoinColumn(name = "pr_pro_id", referencedColumnName = "pro_id", insertable = false, updatable = false)
     private Project project;
     private Project project;
 
 
     /**
     /**

+ 0 - 26
donate-service/src/main/java/com/uas/service/donate/model/SystemSession.java

@@ -1,26 +0,0 @@
-package com.uas.service.donate.model;
-
-
-/**
- * 每次请求服务器时,用户信息存放在本次线程中
- * 
- * @author yingp
- * 
- */
-public class SystemSession {
-
-	private static ThreadLocal<User> local = new ThreadLocal<User>();
-
-	public static void setUser(User session) {
-		local.set(session);
-	}
-
-	public static User getUser() {
-		return local.get();
-	}
-	
-	public static void clear() {
-		local.set(null);
-	}
-
-}

+ 0 - 8
donate-service/src/main/java/com/uas/service/donate/model/UserInfo.java

@@ -1,8 +0,0 @@
-package com.uas.service.donate.model;
-
-public class UserInfo {
-
-    public UserInfo(User user){
-
-    }
-}

+ 7 - 0
donate-service/src/main/java/com/uas/service/donate/service/UserService.java

@@ -5,4 +5,11 @@ import com.uas.service.donate.model.User;
 public interface UserService {
 public interface UserService {
     //返回某人个人信息
     //返回某人个人信息
     User findOne(Long id);
     User findOne(Long id);
+
+    /**
+     * 根据imId获取userUU(可能不存在)
+     * @param imId
+     * @return
+     */
+    Object getUserByImId(Long imId);
 }
 }

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

@@ -1,12 +1,12 @@
 package com.uas.service.donate.service.impl;
 package com.uas.service.donate.service.impl;
 
 
+import com.uas.service.donate.core.support.SystemSession;
 import com.uas.service.donate.dao.ActivityDao;
 import com.uas.service.donate.dao.ActivityDao;
 import com.uas.service.donate.dao.ActivityRecodeDao;
 import com.uas.service.donate.dao.ActivityRecodeDao;
 import com.uas.service.donate.dao.AwardDao;
 import com.uas.service.donate.dao.AwardDao;
 import com.uas.service.donate.model.Activity;
 import com.uas.service.donate.model.Activity;
 import com.uas.service.donate.model.ActivityRecode;
 import com.uas.service.donate.model.ActivityRecode;
 import com.uas.service.donate.model.Project;
 import com.uas.service.donate.model.Project;
-import com.uas.service.donate.model.SystemSession;
 import com.uas.service.donate.service.ActivityService;
 import com.uas.service.donate.service.ActivityService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Page;

+ 18 - 0
donate-service/src/main/java/com/uas/service/donate/service/impl/UserServiceImpl.java

@@ -1,5 +1,6 @@
 package com.uas.service.donate.service.impl;
 package com.uas.service.donate.service.impl;
 
 
+import com.uas.account.util.AccountUtils;
 import com.uas.service.donate.dao.UserDao;
 import com.uas.service.donate.dao.UserDao;
 import com.uas.service.donate.model.User;
 import com.uas.service.donate.model.User;
 import com.uas.service.donate.service.UserService;
 import com.uas.service.donate.service.UserService;
@@ -16,4 +17,21 @@ public class UserServiceImpl implements UserService{
     public User findOne(Long id){
     public User findOne(Long id){
         return userDao.findOne(id);
         return userDao.findOne(id);
     }
     }
+
+    /**
+     * 根据imId获取userUU(可能不存在)
+     *
+     * @param imId
+     * @return
+     */
+    @Override
+    public Long getUserByImId(Long imId) {
+        Long userUU = null;
+        try {
+            userUU = AccountUtils.getUserUUByImId(imId);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return userUU;
+    }
 }
 }

+ 19 - 4
donate-service/src/main/java/com/uas/service/donate/web/filter/SSOInterceptor.java

@@ -2,10 +2,13 @@ package com.uas.service.donate.web.filter;
 
 
 import com.uas.account.entity.UserView;
 import com.uas.account.entity.UserView;
 import com.uas.service.donate.core.support.SystemSession;
 import com.uas.service.donate.core.support.SystemSession;
+import com.uas.service.donate.dao.UserDao;
+import com.uas.service.donate.model.User;
 import com.uas.service.donate.util.FastjsonUtils;
 import com.uas.service.donate.util.FastjsonUtils;
 import com.uas.sso.SSOHelper;
 import com.uas.sso.SSOHelper;
 import com.uas.sso.SSOToken;
 import com.uas.sso.SSOToken;
 import com.uas.sso.web.spring.AbstractSSOInterceptor;
 import com.uas.sso.web.spring.AbstractSSOInterceptor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.StringUtils;
 import org.springframework.util.StringUtils;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
@@ -16,6 +19,9 @@ import javax.servlet.http.HttpServletResponse;
  */
  */
 public class SSOInterceptor extends AbstractSSOInterceptor {
 public class SSOInterceptor extends AbstractSSOInterceptor {
 
 
+	@Autowired
+	private UserDao userDao;
+
 	@Override
 	@Override
 	protected boolean onAuthenticateFailed(HttpServletRequest request, HttpServletResponse response) {
 	protected boolean onAuthenticateFailed(HttpServletRequest request, HttpServletResponse response) {
 		return false;
 		return false;
@@ -29,11 +35,20 @@ public class SSOInterceptor extends AbstractSSOInterceptor {
 			user = getUserByToken(token);
 			user = getUserByToken(token);
 			if (user != null) {
 			if (user != null) {
 				request.getSession().setAttribute("user", user);
 				request.getSession().setAttribute("user", user);
-                SystemSession.setUser(user);
+				User u = userDao.findOne(Long.valueOf(user.getDialectUID()));
+				if (null == u) {
+					u = new User(user);
+					u = userDao.save(u);
+				}
+				SystemSession.setUser(u);
 			}
 			}
-		}
-		if (user != null) {
-			SystemSession.setUser(user);
+		} else {
+			User u = userDao.findOne(Long.valueOf(user.getDialectUID()));
+			if (null == u) {
+				u = new User(user);
+				u = userDao.save(u);
+			}
+			SystemSession.setUser(u);
 		}
 		}
 	}
 	}
 
 

+ 4 - 4
donate-service/src/main/resources/dev/account.properties

@@ -8,10 +8,10 @@ sso.cookie.secure=false
 sso.login.url=http://113.105.74.135:8001/sso/login
 sso.login.url=http://113.105.74.135:8001/sso/login
 
 
 ### account center config,
 ### account center config,
-account.us.save.url=http://10.10.100.133:8080/api/userspace
-account.user.save.url=http://10.10.100.133:8080/api/user
-account.user.getPartners.url = http://10.10.100.133:8080/api/partners
-account.user.getContactPage.url=https://account.ubtob.com/business/groups
+account.us.save.url=http://10.10.100.133/api/userspace
+account.user.save.url=http://10.10.100.133/api/user
+account.user.getPartners.url = http://10.10.100.133/api/partners
+account.user.getContactPage.url = http://113.105.74.135:8001/business/groups
 
 
 #cross domain
 #cross domain
 sso.ask.url=http://113.105.74.135:8001/sso/login/ask
 sso.ask.url=http://113.105.74.135:8001/sso/login/ask

+ 4 - 4
donate-service/src/main/resources/test/account.properties

@@ -8,10 +8,10 @@ sso.cookie.secure=false
 sso.login.url=http://113.105.74.135:8001/sso/login
 sso.login.url=http://113.105.74.135:8001/sso/login
 
 
 ### account center config,
 ### account center config,
-account.us.save.url=http://10.10.100.133:8080/api/userspace
-account.user.save.url=http://10.10.100.133:8080/api/user
-account.user.getPartners.url = http://10.10.100.133:8080/api/partners
-account.user.getContactPage.url=https://account.ubtob.com/business/groups
+account.us.save.url=http://10.10.100.133/api/userspace
+account.user.save.url=http://10.10.100.133/api/user
+account.user.getPartners.url = http://10.10.100.133/api/partners
+account.user.getContactPage.url = http://113.105.74.135:8001/business/groups
 
 
 #cross domain
 #cross domain
 sso.ask.url=http://113.105.74.135:8001/sso/login/ask
 sso.ask.url=http://113.105.74.135:8001/sso/login/ask

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

@@ -157,4 +157,10 @@ button[disabled] {
 	background: url("../images/loading.gif") no-repeat center center;
 	background: url("../images/loading.gif") no-repeat center center;
 	width: 66px;
 	width: 66px;
 	height: 66px;
 	height: 66px;
+}
+
+
+input.ng-invalid.ng-dirty, textarea.ng-invalid.ng-dirty {
+	box-shadow: 0 0 2px #f00;
+	border: #f00 1px solid;
 }
 }

+ 1 - 2
donate-service/src/main/webapp/resources/js/common/query/Project.js

@@ -82,8 +82,7 @@ define ([ 'ngResource' ], function() {
             // 获取报告
             // 获取报告
             getProReport: {
             getProReport: {
                 url:'projectconclude/conclude',
                 url:'projectconclude/conclude',
-                method: 'GET',
-                isArray: true
+                method: 'GET'
             },
             },
             // 获取轮播图
             // 获取轮播图
             getCarousels : {
             getCarousels : {

+ 8 - 0
donate-service/src/main/webapp/resources/js/common/query/User.js

@@ -25,6 +25,14 @@ define ([ 'ngResource' ], function() {
             getUnreadMessageNum: {
             getUnreadMessageNum: {
                 url: '',
                 url: '',
                 method: 'GET'
                 method: 'GET'
+            },
+            // 根据imId 获取 uuid
+            getUserUUByImId: {
+                url: 'user/getUserUUByImId/:imId',
+                method: 'GET',
+                params: {
+                    imId: 'imId'
+                }
             }
             }
         });
         });
     }]);
     }]);

+ 2 - 2
donate-service/src/main/webapp/resources/js/mobile/app.js

@@ -1,6 +1,6 @@
-define([ 'angularAMD', 'ngRoute', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', '../common/services', 'angular-toaster', 'ngSanitize', 'common/query/Activity', 'common/query/Project'], function(angularAMD) {
+define([ 'angularAMD', 'ngRoute', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', '../common/services', 'angular-toaster', 'ngSanitize', 'common/query/Activity', 'common/query/Project', 'common/query/User'], function(angularAMD) {
     'use strict';
     'use strict';
-    var app = angular.module('myApp', [ 'ngRoute', 'ui.router', 'ui.bootstrap', 'ng.local', 'ngTable', 'common.services', 'toaster', 'ActivityService', 'ProjectService']);
+    var app = angular.module('myApp', [ 'ngRoute', 'ui.router', 'ui.bootstrap', 'ng.local', 'ngTable', 'common.services', 'toaster', 'ActivityService', 'ProjectService', 'UserService']);
     app.init = function() {
     app.init = function() {
         angularAMD.bootstrap(app);
         angularAMD.bootstrap(app);
     };
     };

+ 6 - 2
donate-service/src/main/webapp/resources/js/mobile/controllers/MobileProjectDetailCtrl.js

@@ -1,11 +1,12 @@
 define([ 'app/app' ], function(app) {
 define([ 'app/app' ], function(app) {
     'use strict';
     'use strict';
-    app.register.controller('MobileProjectDetailCtrl', ['$scope', '$rootScope', 'Project', '$stateParams', '$http', 'toaster',
-        function ($scope, $rootScope, Project, $stateParams, $http, toaster) {
+    app.register.controller('MobileProjectDetailCtrl', ['$scope', '$rootScope', 'Project', '$stateParams', '$http', 'toaster', 'User',
+        function ($scope, $rootScope, Project, $stateParams, $http, toaster, User) {
         $rootScope.page = 'project';
         $rootScope.page = 'project';
 
 
         var id = $stateParams.id;
         var id = $stateParams.id;
         var imId = $stateParams.imId;
         var imId = $stateParams.imId;
+        $scope.uuid = null;
         var init = function () {
         var init = function () {
 
 
             Project.getDetailById({ id: id}, {}, function (data) {
             Project.getDetailById({ id: id}, {}, function (data) {
@@ -58,6 +59,9 @@ define([ 'app/app' ], function(app) {
                 $scope.carousels = data;
                 $scope.carousels = data;
             });
             });
 
 
+            User.getUserUUByImId({imId : imId}, {}, function(data) {
+                $scope.uuid = data.userUU;
+            });
         };
         };
         init();
         init();
 
 

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

@@ -62,7 +62,7 @@ define([ 'app/app' ], function(app) {
 
 
             // 结项报告
             // 结项报告
             Project.getProReport({id:id}, {}, function(data) {
             Project.getProReport({id:id}, {}, function(data) {
-                $scope.proReport = data[0];
+                $scope.proReport = data.report;
             }, function (error) {
             }, function (error) {
                 console.log(error);
                 console.log(error);
             });
             });

+ 4 - 5
donate-service/src/main/webapp/resources/view/mobile/mobile_project_detail.html

@@ -598,8 +598,7 @@
                 <div class="title">
                 <div class="title">
                     <h4>{{project.name}}</h4>
                     <h4>{{project.name}}</h4>
                     <h6>
                     <h6>
-                        <em ng-if="project.overdue != 1">进行中</em>
-                        <em ng-if="project.overdue == 1">已结束</em>
+                        <em>{{project.overdue}}</em>
                     </h6>
                     </h6>
                 </div>
                 </div>
                 <p class="intro">{{project.proSummary}}</p>
                 <p class="intro">{{project.proSummary}}</p>
@@ -699,7 +698,7 @@
             <!--</div>-->
             <!--</div>-->
             <div class="footer">
             <div class="footer">
                 <!--<a href="" class="look"><img src="../static/images/mobile/list-ul.png" alt=""/>查看同类其他项目</a>-->
                 <!--<a href="" class="look"><img src="../static/images/mobile/list-ul.png" alt=""/>查看同类其他项目</a>-->
-                <a href="" class="attend">我要捐款</a>
+                <button type="button" class="attend" ng-disabled="project.overdue == '已结束'">我要捐款</button>
             </div>
             </div>
         </div>
         </div>
         <!--活动-->
         <!--活动-->
@@ -885,7 +884,7 @@
                         <li ng-click="setMoney(1)">100元</li>
                         <li ng-click="setMoney(1)">100元</li>
                         <li ng-click="setMoney(1)">200元</li>
                         <li ng-click="setMoney(1)">200元</li>
                     </ul>
                     </ul>
-                    <div class="write"><input type="text" ng-model="donation" ng-change="inputMoney()" ng-pattern="/^\d{1,9}(.\d{1,2})?$/" placeholder="自定义金额" class="form-control input-money" id=""/><em>元</em></div>
+                    <div class="write"><input type="text" ng-model="donation" ng-focus="setMoney(0)" ng-change="inputMoney()" ng-pattern="/^\d{0,8}(\.\d{0,2})?$/" placeholder="自定义金额" class="form-control input-money" id=""/><em>元</em></div>
                     <div class="mode">
                     <div class="mode">
                         <span>付款方式:</span>
                         <span>付款方式:</span>
                         <div class="mode-list">
                         <div class="mode-list">
@@ -898,7 +897,7 @@
                     </div>
                     </div>
                 </div>
                 </div>
                 <div class="btn">
                 <div class="btn">
-                    <button type="button" ng-disabled="donationForm.$invalid || !checked || record.amount == null || record.amount == 0"  onclick="pay(angular.element(this).scope().project.id, angular.element(this).scope().record.amount, angular.element(this).scope().record.way)">立即捐款</button>
+                    <button type="button" ng-disabled="donationForm.$invalid || !checked || record.amount == null || record.amount == 0"  onclick="pay(angular.element(this).scope().project.id, angular.element(this).scope().record.amount, angular.element(this).scope().record.way, angular.element(this).scope().uuid)">立即捐款</button>
                 </div>
                 </div>
             </form>
             </form>
         </div>
         </div>

+ 29 - 11
donate-service/src/main/webapp/resources/view/project/project_detail.html

@@ -119,7 +119,7 @@
         color: #949494;
         color: #949494;
     }
     }
     .section1 .evolve .status .status-list div.status-detail .status-evolve span{
     .section1 .evolve .status .status-list div.status-detail .status-evolve span{
-        margin-right: 80px;
+        margin-right: 150px;
         font-size: 14px;
         font-size: 14px;
         color: #7a7a7a;
         color: #7a7a7a;
     }
     }
@@ -128,7 +128,7 @@
     }
     }
     .section1 .evolve .status .status-list div.status-detail .status-evolve span.start{
     .section1 .evolve .status .status-list div.status-detail .status-evolve span.start{
         color: #323232;
         color: #323232;
-        margin-right: 65px;
+        margin-right: 130px;
     }
     }
     .section1 .evolve .status .status-list div.status-detail .status-evolve span.arrangement{
     .section1 .evolve .status .status-list div.status-detail .status-evolve span.arrangement{
         color: #323232;
         color: #323232;
@@ -142,7 +142,7 @@
     }
     }
     .section1 .evolve .status .status-list div.status-detail .status-line div.line span{
     .section1 .evolve .status .status-list div.status-detail .status-line div.line span{
         display: inline-block;
         display: inline-block;
-        width: 118px;
+        width: 185px;
         height: 5px;
         height: 5px;
         background: #dcdcdc;
         background: #dcdcdc;
     }
     }
@@ -155,7 +155,7 @@
         left: 18px;
         left: 18px;
     }
     }
     .section1 .evolve .status .status-list div.status-detail .status-line div.circle span{
     .section1 .evolve .status .status-list div.status-detail .status-line div.circle span{
-        margin-right: 108px;
+        margin-right: 176px;
         display: inline-block;
         display: inline-block;
         width: 13px;
         width: 13px;
         height: 13px;
         height: 13px;
@@ -685,12 +685,11 @@
                 </div>
                 </div>
                 <div class="status fr">
                 <div class="status fr">
                     <!--项目状态-->
                     <!--项目状态-->
-                    <div class="status-list clearfix">
+                    <div class="status-list clearfix" ng-if="project.overdue != '已结束'">
                         <span class="fl project-txt">项目状态:</span>
                         <span class="fl project-txt">项目状态:</span>
                         <div class="status-detail fl">
                         <div class="status-detail fl">
                             <div class="status-evolve">
                             <div class="status-evolve">
                                 <span class="start">发起/审核</span>
                                 <span class="start">发起/审核</span>
-                                <span class="arrangement">筹备中</span>
                                 <span class="execution">执行中</span>
                                 <span class="execution">执行中</span>
                                 <span class="end">结束</span>
                                 <span class="end">结束</span>
                             </div>
                             </div>
@@ -698,13 +697,32 @@
                                 <div class="line">
                                 <div class="line">
                                     <span class="active"></span>
                                     <span class="active"></span>
                                     <span></span>
                                     <span></span>
-                                    <span></span>
                                 </div>
                                 </div>
                                 <div class="circle">
                                 <div class="circle">
                                     <span class="active"></span>
                                     <span class="active"></span>
                                     <span class="empty-circle"></span>
                                     <span class="empty-circle"></span>
                                     <span></span>
                                     <span></span>
-                                    <span></span>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="status-list clearfix" ng-if="project.overdue == '已结束'">
+                        <span class="fl project-txt">项目状态:</span>
+                        <div class="status-detail fl">
+                            <div class="status-evolve">
+                                <span class="start">发起/审核</span>
+                                <span class="execution">执行中</span>
+                                <span class="end">结束</span>
+                            </div>
+                            <div class="status-line">
+                                <div class="line">
+                                    <span class="active"></span>
+                                    <span class="active"></span>
+                                </div>
+                                <div class="circle">
+                                    <span class="active"></span>
+                                    <span class="active"></span>
+                                    <span class="active"></span>
                                 </div>
                                 </div>
                             </div>
                             </div>
                         </div>
                         </div>
@@ -738,8 +756,8 @@
         <div class="section section2">
         <div class="section section2">
             <div class="top clearfix" id="top">
             <div class="top clearfix" id="top">
                 <div class="active fl tabNav"><em></em><span>项目详情</span></div>
                 <div class="active fl tabNav"><em></em><span>项目详情</span></div>
-                <div class="fl tabNav"><em></em><span>项目进度</span></div>
-                <div class="fl tabNav" ng-if="null != proReport"><em></em><span>结项报告</span></div>
+                <div class="fl tabNav" ng-if="schedules.length != 0"><em></em><span>项目进度</span></div>
+                <div class="fl tabNav" ng-if="proReport.length != 0"><em></em><span>结项报告</span></div>
             </div>
             </div>
             <!--项目详情-->
             <!--项目详情-->
             <div class="bottom clearfix show" >
             <div class="bottom clearfix show" >
@@ -896,7 +914,7 @@
                                 <li class="select-money" ng-click="setMoney(100)">100元</li>
                                 <li class="select-money" ng-click="setMoney(100)">100元</li>
                                 <li class="select-money" ng-click="setMoney(200)">200元</li>
                                 <li class="select-money" ng-click="setMoney(200)">200元</li>
                             </ul>
                             </ul>
-                            <div class="write"><input type="text" ng-pattern="/^\d{1,9}(.\d{1,2})?$/" ng-model="donation" ng-click="setMoney(0)" ng-change="inputMoney()" placeholder="其他金额" class="input-money  form-control" maxlength="10"/><em>元</em></div>
+                            <div class="write"><input type="text" ng-pattern="/^\d{0,8}(\.\d{0,2})?$/" ng-model="donation" ng-focus="setMoney(0)" ng-change="inputMoney()" placeholder="其他金额" class="input-money  form-control" maxlength="10"/><em>元</em></div>
                         </div>
                         </div>
                     </div>
                     </div>
                     <div class="choose clearfix">
                     <div class="choose clearfix">