Преглед изворни кода

angularjs $inject

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@1100 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
administrator пре 11 година
родитељ
комит
15f8801363

+ 6 - 6
src/main/webapp/resources/js/common/services.js

@@ -89,7 +89,7 @@ define([ 'angular', 'toaster' ], function(angular) {
 		        return requestParams;
 			}
 		};
-	}).factory('AuthenticationService', function($http, SessionService, BaseService, SerializerUtil) {
+	}).factory('AuthenticationService', ['$http', 'SessionService', 'BaseService', 'SerializerUtil', function($http, SessionService, BaseService, SerializerUtil) {
 		var cacheSession = function() {
 			SessionService.set('authenticated', true);
 		};
@@ -132,7 +132,7 @@ define([ 'angular', 'toaster' ], function(angular) {
 				return request;
 			}
 		};
-	}).factory('SnapshotService', function($http, BaseService) {
+	}]).factory('SnapshotService', ['$http', 'BaseService', function($http, BaseService) {
 		var rootPath = BaseService.getRootPath();
 		return {
 			getTodo : function(success) {
@@ -148,7 +148,7 @@ define([ 'angular', 'toaster' ], function(angular) {
 				});
 			}
 		};
-	}).factory('SerializerUtil', function() {
+	}]).factory('SerializerUtil', function() {
 		return {
 			/**
 			 * @description 将元素值转换为序列化的字符串表示
@@ -179,7 +179,7 @@ define([ 'angular', 'toaster' ], function(angular) {
 				return query.length ? query.substr(0, query.length - 1) : query;
 			}
 		};
-	}).factory('ReportService', function($http, BaseService, toaster) {
+	}).factory('ReportService', ['$http', 'BaseService', 'toaster', function($http, BaseService, toaster) {
 		var rootPath = BaseService.getRootPath();
 		return {
 			/**
@@ -204,7 +204,7 @@ define([ 'angular', 'toaster' ], function(angular) {
 					});
 			}
 		}
-	}).factory('VendorService', function($http, $resource, BaseService){
+	}]).factory('VendorService', ['$http', '$resource', 'BaseService', function($http, $resource, BaseService){
 		var rootPath = BaseService.getRootPath();
 		return {
 			getCount: function(success){
@@ -216,5 +216,5 @@ define([ 'angular', 'toaster' ], function(angular) {
 			customer: $resource('vendor/customer/:id', {}),
 			vendor: $resource('vendor/:id', {})
 		};
-	});
+	}]);
 });

+ 80 - 83
src/main/webapp/resources/js/index/app.js

@@ -4,7 +4,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	app.init = function() {
 		angular.bootstrap(document, [ 'myApp' ]);
 	};
-	app.config(function($stateProvider, $urlRouterProvider) {
+	app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
 		$urlRouterProvider.otherwise('/index');
 		$stateProvider.state('index', {
 			url : "",
@@ -198,7 +198,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			templateUrl : "static/tpl/index/fa/apBill.html",
 			controller: 'SaleApBillCtrl'
 		});
-	});
+	}]);
 	
 	/**
 	 * 表示符号
@@ -215,7 +215,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		};
 	});
 	
-	app.controller('MyCtrl', function($scope, $rootScope) {
+	app.controller('MyCtrl', ['$scope', '$rootScope', function($scope, $rootScope) {
 		$rootScope.$on('$locationChangeSuccess', function(evt, newUrl) {
 			var routeState = newUrl.substr(newUrl.indexOf('#/') + 2);
 			if (routeState.indexOf('/') > -1)
@@ -224,8 +224,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				routeState = routeState.substring(0, routeState.indexOf('.'));
 			$scope.routeState = routeState || 'home';
 		});
-	});
-	app.controller('AuthCtrl', function($scope, $window, AuthenticationService, toaster) {
+	}]);
+	app.controller('AuthCtrl', ['$scope', '$window', 'AuthenticationService', 'toaster', function($scope, $window, AuthenticationService, toaster) {
 		$scope.isAuthed = AuthenticationService.isAuthed();
 		$scope.userInfo = {};
 		AuthenticationService.getAuthentication().success(function(data) {
@@ -254,13 +254,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		        }
 		   }
 		};
-	});
-	app.controller('TodoCtrl', function($scope, SnapshotService){
+	}]);
+	app.controller('TodoCtrl', ['$scope', 'SnapshotService', function($scope, SnapshotService){
 		SnapshotService.getTodo(function(data){
 			$scope.todo = data;
 		});
-	});
-	app.controller('TruckCtrl', function($scope, $rootScope, $modal, SaleTruck){
+	}]);
+	app.controller('TruckCtrl', ['$scope', '$rootScope', '$modal', 'SaleTruck', function($scope, $rootScope, $modal, SaleTruck){
 		SaleTruck.query({}, function(data){
 			$rootScope.truck = data;
 			$scope.truckCount = data ? data.length : 0;
@@ -287,8 +287,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				}
 			});
 		};
-	});
-	app.controller('TruckModalCtrl', function($scope, $rootScope, $modalInstance, SaleTruck, PurcNotice, toaster){
+	}]);
+	app.controller('TruckModalCtrl', ['$scope', '$rootScope', '$modalInstance', 'SaleTruck', 'PurcNotice', 'toaster', function($scope, $rootScope, $modalInstance, SaleTruck, PurcNotice, toaster){
 		$scope.saleSend = {sendItems: []};
 		SaleTruck.detail({}, function(data){
 			$scope.notices = data;
@@ -350,8 +350,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				});
 			}
 		};
-	});
-	app.controller('PersonalSaleStatCtrl', function($scope, SaleStat) {
+	}]);
+	app.controller('PersonalSaleStatCtrl', ['$scope', 'SaleStat', function($scope, SaleStat) {
 		SaleStat.cust({}, function(data){
 			var p = [], q = [];
 			angular.forEach(data.month, function(d){
@@ -478,8 +478,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 					}
 			};
 		});
-	});
-	app.controller('SaleStatCtrl', function($scope, SaleStat){
+	}]);
+	app.controller('SaleStatCtrl', ['$scope', 'SaleStat', function($scope, SaleStat){
 		SaleStat.get({}, function(data){
 			var p = [], q = [], r = [];
 			angular.forEach(data.day, function(d){
@@ -548,26 +548,23 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				}
 			};
 		});
-	});
-	app.controller('NoticeCtrl', function($scope, SnapshotService){
+	}]);
+	app.controller('NoticeCtrl', ['$scope', 'SnapshotService', function($scope, SnapshotService){
 		SnapshotService.getNotice(5, function(data){
 			$scope.notices = data;
 		});
 		
 		$scope.dateTime = new Date();
-	});
-	app.controller('VendCountCtrl', function($scope, VendorService){
+	}]);
+	app.controller('VendCountCtrl', ['$scope', 'VendorService', function($scope, VendorService){
 		VendorService.getCount(function(date){
 			$scope.count = date;
 		});
-	});
-	app.controller('CustomerCtrl', function($scope, VendorService, BaseService, ngTableParams, toaster){
+	}]);
+	app.controller('CustomerCtrl', ['$scope', 'VendorService', 'BaseService', 'ngTableParams', 'toaster', function($scope, VendorService, BaseService, ngTableParams, toaster){
 		$scope.customerParams = new ngTableParams({
 			page : 1, 
-			count : 10,
-			sorting: {
-//				time: 'desc'
-            }
+			count : 10
 		}, {
 			total : 0, 
 			counts: [5, 10, 25, 50],
@@ -586,7 +583,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				});
 			}
 		});
-	});
+	}]);
 	var getState = function(active) {
 		var fn = 'get';
 		switch(active) {
@@ -601,8 +598,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		}
 		return fn;
 	};
-	app.controller('SaleOrderCtrl', function($scope, $filter, PurcOrderItem, PurcOrder, ngTableParams, 
-		toaster, ReportService, BaseService, PurcOrderItemHis){
+	app.controller('SaleOrderCtrl', ['$scope', '$filter', 'PurcOrderItem', 'PurcOrder', 'ngTableParams', 'toaster', 'ReportService', 'BaseService', 'PurcOrderItemHis',
+	   function($scope, $filter, PurcOrderItem, PurcOrder, ngTableParams, toaster, ReportService, BaseService, PurcOrderItemHis){
 		$scope.active = 'todo';
 		$scope.dateZoneText = '一个月内';
 		$scope.condition = {dateZone: 1};
@@ -788,8 +785,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				}
 			}
 		};
-	});
-	app.controller('SaleOrderDetailCtrl', function($scope, $stateParams, PurcOrder, PurcOrderItem, toaster, ReportService){
+	}]);
+	app.controller('SaleOrderDetailCtrl', ['$scope', '$stateParams', 'PurcOrder', 'PurcOrderItem', 'toaster', 'ReportService', function($scope, $stateParams, PurcOrder, PurcOrderItem, toaster, ReportService){
 		var loadData = function() {
 			PurcOrder.get({id: $stateParams.id}, function(data){
 				$scope.order = data;
@@ -868,8 +865,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				}
 			}
 		};
-	});
-	app.controller('SaleChangeCtrl', function($scope, $filter, PurcChange, ngTableParams, toaster, BaseService, PurcChangeHis){
+	}]);
+	app.controller('SaleChangeCtrl', ['$scope', '$filter', 'PurcChange', 'ngTableParams', 'toaster', 'BaseService', 'PurcChangeHis', function($scope, $filter, PurcChange, ngTableParams, toaster, BaseService, PurcChangeHis){
 		$scope.active = 'todo';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -947,8 +944,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		$scope.onSearch = function() {
 			$scope.tableParams.reload();
 		};
-	});
-	app.controller('SaleChangeDetailCtrl', function($scope, $stateParams, PurcChange, toaster){
+	}]);
+	app.controller('SaleChangeDetailCtrl', ['$scope', '$stateParams', 'PurcChange', 'toaster', function($scope, $stateParams, PurcChange, toaster){
 		var loadData = function() {
 			PurcChange.get({id: $stateParams.id}, function(data){
 				$scope.change = data;
@@ -972,8 +969,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				});
 			}
 		};
-	});
-	app.controller('SaleInquiryCtrl', function($scope, $filter, PurcInquiry, ngTableParams, toaster, BaseService, PurcInquiryHis){
+	}]);
+	app.controller('SaleInquiryCtrl', ['$scope', '$filter', 'PurcInquiry', 'ngTableParams', 'toaster', 'BaseService', 'PurcInquiryHis', function($scope, $filter, PurcInquiry, ngTableParams, toaster, BaseService, PurcInquiryHis){
 		$scope.active = 'todo';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1110,8 +1107,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		$scope.onSearch = function() {
 			$scope.tableParams.reload();
 		};
-	});
-	app.controller('SaleInquiryDetailCtrl', function($scope, $stateParams, PurcInquiry, toaster){
+	}]);
+	app.controller('SaleInquiryDetailCtrl', ['$scope', '$stateParams', 'PurcInquiry', 'toaster', function($scope, $stateParams, PurcInquiry, toaster){
 		var loadData = function() {
 			PurcInquiry.getAll({id: $stateParams.id}, function(data){
 				var inquiry = data[0].inquiry;
@@ -1195,8 +1192,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				});
 			}
 		};
-	});
-	app.controller('SaleNoticeCtrl', function($scope, $rootScope, $filter, PurcNotice, ngTableParams, toaster, BaseService, PurcNoticeHis, $modal, SaleTruck, Symbol){
+	}]);
+	app.controller('SaleNoticeCtrl', ['$scope', '$rootScope', '$filter', 'PurcNotice', 'ngTableParams', 'toaster', 'BaseService', 'PurcNoticeHis', '$modal', 'SaleTruck', 'Symbol', function($scope, $rootScope, $filter, PurcNotice, ngTableParams, toaster, BaseService, PurcNoticeHis, $modal, SaleTruck, Symbol){
 		$scope.active = 'todo';
 		$scope.dateZoneText = '一个月内';
 		$scope.condition = {dateZone: 1};
@@ -1382,8 +1379,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		}, function(data) {
 			data &&	($scope.tableParams.reload());
 		}, true);
-	});
-	app.controller('SaleNoticeSendByBatchCtrl', function($scope, $modalInstance, Symbol, selectedNotices, PurcNotice, toaster){
+	}]);
+	app.controller('SaleNoticeSendByBatchCtrl', ['$scope', '$modalInstance', 'Symbol', 'selectedNotices', 'PurcNotice', 'toaster', function($scope, $modalInstance, Symbol, selectedNotices, PurcNotice, toaster){
 		$scope.notices = angular.copy(selectedNotices);
 		$scope.currency = Symbol.currency;//将币别转化为对应的符号
 		$scope.saleSend = {
@@ -1445,12 +1442,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
   		$scope.cancel = function () {
     		$modalInstance.dismiss();
   		};
-	});
+	}]);
 	
 	/**
 	 * 发货单
 	 */
-	app.controller('SaleSendCtrl', function($scope, $filter, SaleSend, ngTableParams, toaster, BaseService, Symbol){
+	app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams', 'toaster', 'BaseService', 'Symbol', function($scope, $filter, SaleSend, ngTableParams, toaster, BaseService, Symbol){
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1516,12 +1513,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			$scope.tableParams.reload();
 		};
 		
-	});
+	}]);
 	
 	/**
 	 * 客户打样申请
 	 */
-	app.controller('SaleSampleCtrl', function($scope, $filter, PurcSample, ngTableParams, toaster, $modal, BaseService, Symbol){
+	app.controller('SaleSampleCtrl', ['$scope', '$filter', 'PurcSample', 'ngTableParams', 'toaster', '$modal', 'BaseService', 'Symbol', function($scope, $filter, PurcSample, ngTableParams, toaster, $modal, BaseService, Symbol){
 		$scope.active = 'todo';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1621,9 +1618,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		$scope.onSearch = function() {
 			$scope.tableParams.reload();
 		};
-	});
+	}]);
 	
-	app.controller('SampleSendCtrl', function($scope, $modalInstance, sampleItem, PurcSample, $upload, toaster){
+	app.controller('SampleSendCtrl', ['$scope', '$modalInstance', 'sampleItem', 'PurcSample', '$upload', 'toaster', function($scope, $modalInstance, sampleItem, PurcSample, $upload, toaster){
 		$scope.sampleItem = sampleItem;
 		$scope.sampleItem.sampleSend = $scope.sampleItem.sampleSend || {};
 		
@@ -1647,12 +1644,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
   		$scope.cancel = function () {
     		$modalInstance.dismiss(sampleItem);
   		};
-	});
+	}]);
 	
 	/**
 	 * 客户认定单
 	 */
-	app.controller('SaleApprovalCtrl', function($scope, $filter, PurcApproval, ngTableParams, toaster, BaseService, Symbol){
+	app.controller('SaleApprovalCtrl', ['$scope', '$filter', 'PurcApproval', 'ngTableParams', 'toaster', 'BaseService', 'Symbol', function($scope, $filter, PurcApproval, ngTableParams, toaster, BaseService, Symbol){
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1718,12 +1715,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			$scope.tableParams.reload();
 		};
 		
-	});
+	}]);
 	
 	/**
 	 * 客户采购预测
 	 */
-	app.controller('SaleForecastCtrl', function($scope, $filter, PurcForecast, ngTableParams, toaster, BaseService, Symbol){
+	app.controller('SaleForecastCtrl', ['$scope', '$filter', 'PurcForecast', 'ngTableParams', 'toaster', 'BaseService', 'Symbol', function($scope, $filter, PurcForecast, ngTableParams, toaster, BaseService, Symbol){
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1789,12 +1786,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			$scope.tableParams.reload();
 		};
 		
-	});
+	}]);
 	
 	/**
 	 * 客户采购验收
 	 */
-	app.controller('SaleAcceptCtrl', function($scope, $filter, PurcAccept, ngTableParams, toaster, BaseService, Symbol){
+	app.controller('SaleAcceptCtrl', ['$scope', '$filter', 'PurcAccept', 'ngTableParams', 'toaster', 'BaseService', 'Symbol', function($scope, $filter, PurcAccept, ngTableParams, toaster, BaseService, Symbol){
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1860,12 +1857,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			$scope.tableParams.reload();
 		};
 		
-	});
+	}]);
 	
 	/**
 	 * 客户采购验退
 	 */
-	app.controller('SaleReturnsCtrl', function($scope, $filter, PurcReturn, ngTableParams, toaster, BaseService, Symbol){
+	app.controller('SaleReturnsCtrl', ['$scope', '$filter', 'PurcReturn', 'ngTableParams', 'toaster', 'BaseService', 'Symbol', function($scope, $filter, PurcReturn, ngTableParams, toaster, BaseService, Symbol){
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -1930,12 +1927,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			$scope.tableParams.reload();
 		};
 		
-	});
+	}]);
 	
 	/**
 	 * 客户不良品入库
 	 */
-	app.controller('SaleBadInCtrl', function($scope, $filter, PurcBadIn, ngTableParams, toaster, BaseService, Symbol){
+	app.controller('SaleBadInCtrl', ['$scope', '$filter', 'PurcBadIn', 'ngTableParams', 'toaster', 'BaseService', 'Symbol', function($scope, $filter, PurcBadIn, ngTableParams, toaster, BaseService, Symbol){
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -2000,12 +1997,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			$scope.tableParams.reload();
 		};
 		
-	});
+	}]);
 	
 	/**
 	 * 客户不良品出库
 	 */
-	app.controller('SaleBadOutCtrl', function($scope, $filter, PurcBadOut, ngTableParams, toaster, BaseService, Symbol){
+	app.controller('SaleBadOutCtrl', ['$scope', '$filter', 'PurcBadOut', 'ngTableParams', 'toaster', 'BaseService', 'Symbol', function($scope, $filter, PurcBadOut, ngTableParams, toaster, BaseService, Symbol){
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -2070,12 +2067,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			$scope.tableParams.reload();
 		};
 		
-	});
+	}]);
 	
 	/**
 	 * 客户MRB
 	 */
-	app.controller('SaleMRBCtrl', function($scope, $filter, PurcMRB, ngTableParams, toaster, BaseService, Symbol){
+	app.controller('SaleMRBCtrl', ['$scope', '$filter', 'PurcMRB', 'ngTableParams', 'toaster', 'BaseService', 'Symbol', function($scope, $filter, PurcMRB, ngTableParams, toaster, BaseService, Symbol){
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -2140,12 +2137,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			$scope.tableParams.reload();
 		};
 		
-	});
+	}]);
 	
 	/**
 	 * 客户应付发票
 	 */
-	app.controller('SaleApBillCtrl', function($scope, $filter, PurcApBill, ngTableParams, toaster, BaseService, Symbol){
+	app.controller('SaleApBillCtrl', ['$scope', '$filter', 'PurcApBill', 'ngTableParams', 'toaster', 'BaseService', 'Symbol', function($scope, $filter, PurcApBill, ngTableParams, toaster, BaseService, Symbol){
 		$scope.active = 'all';
 		$scope.agreedText = '全部';
 		$scope.dateZoneText = '一个月内';
@@ -2211,9 +2208,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			$scope.tableParams.reload();
 		};
 		
-	});
+	}]);
 	
-	app.controller('EnterpriseCtrl', function($scope, AccountEnterprise){
+	app.controller('EnterpriseCtrl', ['$scope', 'AccountEnterprise', function($scope, AccountEnterprise){
 		AccountEnterprise.get({}, function(data){
 			$scope.enterprise = data;
 		});
@@ -2232,9 +2229,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				$scope.growth = growth;
 			}
 		});
-	});
+	}]);
 	
-	app.controller('UserCtrl', function($scope, $filter, AuthenticationService, AccountUser, BaseService, ngTableParams, toaster, $modal, $http, ngAlert){
+	app.controller('UserCtrl', ['$scope', '$filter', 'AuthenticationService', 'AccountUser', 'BaseService', 'ngTableParams', 'toaster', '$modal', '$http', 'ngAlert', function($scope, $filter, AuthenticationService, AccountUser, BaseService, ngTableParams, toaster, $modal, $http, ngAlert){
 		$scope.editing = false;
 		$scope.loading = true;
 		AuthenticationService.getAuthentication().success(function(data) {
@@ -2418,9 +2415,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				}
 			});
 		};
-	});
+	}]);
 	
-	app.controller('UserRoleCtrl', function($scope, $modalInstance, user, AccountRole, AccountUser, toaster){
+	app.controller('UserRoleCtrl', ['$scope', '$modalInstance', 'user', 'AccountRole', 'AccountUser', 'toaster', function($scope, $modalInstance, user, AccountRole, AccountUser, toaster){
 		$scope.checked = [];
 		$scope.master = [];
 		AccountRole.query({}, function(data){
@@ -2471,9 +2468,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				$modalInstance.close(false);
 			}
 		};
-	});
+	}]);
 	
-	app.controller('PasswordCtrl', function($scope, $modalInstance, user, AccountUser, toaster){
+	app.controller('PasswordCtrl', ['$scope', '$modalInstance', 'user', 'AccountUser', 'toaster', function($scope, $modalInstance, user, AccountUser, toaster){
 		$scope.user = user;
 		$scope.checking = false;
 		//输入原密码后验证原密码是否正确
@@ -2514,9 +2511,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
   		$scope.cancel = function () {
     		$modalInstance.dismiss();
   		};
-	});
+	}]);
 	
-	app.controller('LogCtrl', function($scope, BaseService, ngTableParams, ErpLog, UsageLog){
+	app.controller('LogCtrl', ['$scope', 'BaseService', 'ngTableParams', 'ErpLog', 'UsageLog', function($scope, BaseService, ngTableParams, ErpLog, UsageLog){
 		$scope.erpParams = new ngTableParams({
 			page : 1, 
 			count : 5,
@@ -2563,18 +2560,18 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				});
 			}
 		});
-	});
+	}]);
 	
-	app.controller('ResourceCtrl', function($scope, AccountResource){
+	app.controller('ResourceCtrl', ['$scope', 'AccountResource', function($scope, AccountResource){
 		AccountResource.query({}, function(data){
 			if(data && data.length > 0) {
 				data[0].$open = true;
 			}
 			$scope.resources = data;
 		});
-	});
+	}]);
 	
-	app.controller('RoleCtrl', function($scope, $modal, AccountRole){
+	app.controller('RoleCtrl', ['$scope', '$modal', 'AccountRole', function($scope, $modal, AccountRole){
 		$scope.roles = {};
 		var getData = function() {
 			AccountRole.query({}, function(data){
@@ -2604,9 +2601,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				added && (getData());
 			});
 		};
-	});
+	}]);
 	
-	app.controller('RoleEditCtrl', function($scope, $modalInstance, $timeout, AccountResource, AccountRole, toaster, role, ngAlert){
+	app.controller('RoleEditCtrl', ['$scope', '$modalInstance', '$timeout', 'AccountResource', 'AccountRole', 'toaster', 'role', 'ngAlert', function($scope, $modalInstance, $timeout, AccountResource, AccountRole, toaster, role, ngAlert){
 		$scope.role = role;
 		$scope.master = angular.copy($scope.role);
 		var isNew = role == null;
@@ -2707,7 +2704,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				});
 			})
 		};
-	});
+	}]);
 	
 	/**
 	 * 计算时间差
@@ -2740,7 +2737,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 	/**
 	 * 搜索框,回车触发
 	 */
-	app.directive('ngSearch', function($parse) {
+	app.directive('ngSearch', ['$parse', function($parse) {
 		return {
 			require : '?ngModel',
 			restrict : 'A',
@@ -2755,6 +2752,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
                 });
 			}
 		};
-	});
+	}]);
 	return app;
 });

+ 14 - 14
src/main/webapp/resources/js/index/mobile.index.app.js

@@ -4,7 +4,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 	app.init = function() {
 		angular.bootstrap(document, [ 'myApp' ]);
 	};
-	app.config(function($stateProvider, $urlRouterProvider) {
+	app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
 		$urlRouterProvider.otherwise('/index');
 		$stateProvider.state('index', {
 			url : "/index",
@@ -22,7 +22,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			url: '/sale/notice/:id',
 			templateUrl: 'static/tpl/index_mobile/sale/saleNotice.html'
 		});
-	});
+	}]);
 	
 	app.factory('StatusCode', function(){
 		var statusConfig = {
@@ -59,7 +59,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 		};
 	});
 	
-	app.controller('MyCtrl', function($scope, $rootScope) {
+	app.controller('MyCtrl', ['$scope', '$rootScope', function($scope, $rootScope) {
 		$rootScope.$on('$locationChangeSuccess', function(evt, newUrl) {
 			var routeState = newUrl.substr(newUrl.indexOf('#/') + 2);
 			if (routeState.indexOf('/') > -1)
@@ -68,8 +68,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 				routeState = routeState.substring(0, routeState.indexOf('.'));
 			$scope.routeState = routeState || 'home';
 		});
-	});
-	app.controller('AuthCtrl', function($scope, $window, AuthenticationService) {
+	}]);
+	app.controller('AuthCtrl', ['$scope', '$window', 'AuthenticationService', function($scope, $window, AuthenticationService) {
 		$scope.isAuthed = AuthenticationService.isAuthed();
 		$scope.userInfo = {};
 		AuthenticationService.getAuthentication().success(function(data) {
@@ -82,8 +82,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 				$window.location.reload();
 			});
 		};
-	});
-	app.controller('SaleOrderCtrl', function($scope, $filter, $stateParams, toaster, PurcOrder, PurcOrderItem, Symbol){
+	}]);
+	app.controller('SaleOrderCtrl', ['$scope', '$filter', '$stateParams', 'toaster', 'PurcOrder', 'PurcOrderItem', 'Symbol', function($scope, $filter, $stateParams, toaster, PurcOrder, PurcOrderItem, Symbol){
 		$scope.loading = true;
 		$scope.symbol = Symbol.currency;
 		
@@ -193,12 +193,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			};
 			
 		};
-	});
+	}]);
 	
 	/**
 	 * 销售变更
 	 */
-	app.controller('SaleChangeCtrl', function($scope, $stateParams, toaster, PurcChange){
+	app.controller('SaleChangeCtrl', ['$scope', '$stateParams', 'toaster', 'PurcChange', function($scope, $stateParams, toaster, PurcChange){
 		$scope.loading = true;
 		$scope.remark = '';
 		
@@ -228,9 +228,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 				toaster.pop('error', '回复失败', response.data);
 			});
 		};
-	});
+	}]);
 	
-	app.controller('SaleInquiryCtrl', function($scope, $stateParams, toaster, PurcInquiry, Symbol){
+	app.controller('SaleInquiryCtrl', ['$scope', '$stateParams', 'toaster', 'PurcInquiry', 'Symbol', function($scope, $stateParams, toaster, PurcInquiry, Symbol){
 		$scope.loading = true;
 		$scope.vendFromDateOpen = false;
 		$scope.vendToDateOpen = false;
@@ -306,9 +306,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 				toaster.pop('error', '回复失败', response.data);
   			});
   		};
-	});
+	}]);
 	
-	app.controller('SaleNoticeCtrl', function($scope, $stateParams, toaster, PurcNotice, Symbol){
+	app.controller('SaleNoticeCtrl', ['$scope', '$stateParams', 'toaster', 'PurcNotice', 'Symbol', function($scope, $stateParams, toaster, PurcNotice, Symbol){
 		$scope.loading = true;
 		$scope.symbol = Symbol.currency;//把币别转化为符号
 		$scope.logShow = false;
@@ -353,6 +353,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 		};
 		
 		
-	});
+	}]);
 	return app;
 });

+ 7 - 7
src/main/webapp/resources/js/index/services/Account.js

@@ -1,12 +1,12 @@
 define([ 'ngResource' ], function() {
-	angular.module('AccountServices', [ 'ngResource' ]).factory('AccountEnterprise', function($resource) {
+	angular.module('AccountServices', [ 'ngResource' ]).factory('AccountEnterprise', ['$resource', function($resource) {
 		return $resource('account/enterprise', {}, {
 			growth: {
 				url: 'account/enterprise/growth',
 				isArray: true
 			}
 		});
-	}).factory('AccountUser', function($resource) {
+	}]).factory('AccountUser', ['$resource', function($resource) {
 		return $resource('account/user/:uu', {}, {
 			update: {
 				method: 'PUT'
@@ -28,13 +28,13 @@ define([ 'ngResource' ], function() {
 				method: 'GET'
 			}
 		});
-	}).factory('ErpLog', function($resource) {
+	}]).factory('ErpLog', ['$resource', function($resource) {
 		return $resource('log/erp', {});
-	}).factory('UsageLog', function($resource) {
+	}]).factory('UsageLog', ['$resource', function($resource) {
 		return $resource('log/usage', {});
-	}).factory('AccountResource', function($resource) {
+	}]).factory('AccountResource', ['$resource', function($resource) {
 		return $resource('account/resource', {});
-	}).factory('AccountRole', function($resource) {
+	}]).factory('AccountRole', ['$resource', function($resource) {
 		return $resource('account/role/:id');
-	});
+	}]);
 });

+ 3 - 3
src/main/webapp/resources/js/index/services/Alert.js

@@ -1,6 +1,6 @@
 define([ 'angular', 'ui.bootstrap' ], function(angular) {
 	'use strict';
-	angular.module('AlertServices', ['ui.bootstrap', 'tpls' ]).factory('ngAlert', function($modal){
+	angular.module('AlertServices', ['ui.bootstrap', 'tpls' ]).factory('ngAlert', ['$modal', function($modal){
 		var ngAlert = function(config, trueFn, falseFn){
 			var modalInstance = $modal.open({
 				animation: true,
@@ -19,7 +19,7 @@ define([ 'angular', 'ui.bootstrap' ], function(angular) {
 			return this;
 		};
 		return ngAlert;
-	}).controller('AlertInstanceCtrl', function($scope, $modalInstance, alertConfig){
+	}]).controller('AlertInstanceCtrl', ['$scope', '$modalInstance', 'alertConfig', function($scope, $modalInstance, alertConfig){
 		$scope.alertConfig = alertConfig;
 		$scope.ok = function () {
 		    $modalInstance.close(true);
@@ -27,7 +27,7 @@ define([ 'angular', 'ui.bootstrap' ], function(angular) {
 		$scope.cancel = function () {
 			$modalInstance.close(false);
 		};
-	});
+	}]);
 	angular.module("tpls", ["tpl/alert.html"]);
 	angular.module("tpl/alert.html", []).run(["$templateCache", function($templateCache) {
 		  $templateCache.put("tpl/alert.html",

+ 22 - 22
src/main/webapp/resources/js/index/services/Purc.js

@@ -1,6 +1,6 @@
 define([ 'ngResource'], function() {
 	angular.module('PurcServices', [ 'ngResource'
-	]).factory('PurcOrder', function($resource) {
+	]).factory('PurcOrder', ['$resource', function($resource) {
 		return $resource('sale/orders/:id', {}, {
 			setRead: {
 				url: 'sale/orders/display',
@@ -28,7 +28,7 @@ define([ 'ngResource'], function() {
 				method: 'POST'
 			}
 		});
-	}).factory('PurcOrderItem', function($resource) {
+	}]).factory('PurcOrderItem', ['$resource', function($resource) {
 		return $resource('sale/orders/items', {}, {
 			getTodo: {
 				params: {
@@ -68,7 +68,7 @@ define([ 'ngResource'], function() {
 				}
 			}
 		});
-	}).factory('PurcChange', function($resource) {
+	}]).factory('PurcChange', ['$resource', function($resource) {
 		return $resource('sale/changes/:id', {}, {
 			getTodo: {
 				params: {
@@ -88,7 +88,7 @@ define([ 'ngResource'], function() {
 				}
 			}
 		});
-	}).factory('PurcInquiry', function($resource) {
+	}]).factory('PurcInquiry', ['$resource', function($resource) {
 		return $resource('sale/inquiry/:id', {}, {
 			getAll: {
 				isArray: true
@@ -130,7 +130,7 @@ define([ 'ngResource'], function() {
 				isArray: true
 			}
 		});
-	}).factory('PurcNotice', function($resource) {
+	}]).factory('PurcNotice', ['$resource', function($resource) {
 		return $resource('sale/notice/:id', {}, {
 			getTodo: {
 				params: {
@@ -162,31 +162,31 @@ define([ 'ngResource'], function() {
 				method: 'POST'
 			}
 		});
-	}).factory('SaleSend', function($resource) {
+	}]).factory('SaleSend', ['$resource', function($resource) {
 		return $resource('sale/notice/sends/:id', {}, {
 		});
-	}).factory('PurcForecast', function($resource) {
+	}]).factory('PurcForecast', ['$resource', function($resource) {
 		return $resource('sale/forecast/:id', {}, {
 		});
-	}).factory('PurcAccept', function($resource) {
+	}]).factory('PurcAccept', ['$resource', function($resource) {
 		return $resource('sale/accept/:id', {}, {
 		});
-	}).factory('PurcReturn', function($resource) {
+	}]).factory('PurcReturn', ['$resource', function($resource) {
 		return $resource('sale/return/:id', {}, {
 		});
-	}).factory('PurcBadIn', function($resource) {
+	}]).factory('PurcBadIn', ['$resource', function($resource) {
 		return $resource('sale/badIn/:id', {}, {
 		});
-	}).factory('PurcBadOut', function($resource) {
+	}]).factory('PurcBadOut', ['$resource', function($resource) {
 		return $resource('sale/badOut/:id', {}, {
 		});
-	}).factory('PurcMRB', function($resource) {
+	}]).factory('PurcMRB', ['$resource', function($resource) {
 		return $resource('sale/MRB/:id', {}, {
 		});
-	}).factory('PurcApBill', function($resource) {
+	}]).factory('PurcApBill', ['$resource', function($resource) {
 		return $resource('sale/apBill/:id', {}, {
 		});
-	}).factory('PurcSample', function($resource) {
+	}]).factory('PurcSample', ['$resource', function($resource) {
 		return $resource('sale/sample/:id', {}, {
 			getSend: {
 				url: 'sale/sample/:id/send',
@@ -206,10 +206,10 @@ define([ 'ngResource'], function() {
 				}
 			}
 		});
-	}).factory('PurcApproval', function($resource) {
+	}]).factory('PurcApproval', ['$resource', function($resource) {
 		return $resource('sale/sample/approval/:id', {}, {
 		});
-	}).factory('PurcOrderItemHis', function($resource) {
+	}]).factory('PurcOrderItemHis', ['$resource', function($resource) {
 		return $resource('sale/orders/history/items', {}, {
 			getTodo: {
 				params: {
@@ -230,7 +230,7 @@ define([ 'ngResource'], function() {
 				}
 			}
 		});
-	}).factory('PurcChangeHis', function($resource) {
+	}]).factory('PurcChangeHis', ['$resource', function($resource) {
 		return $resource('sale/changes/history/:id', {}, {
 			getTodo: {
 				params: {
@@ -238,7 +238,7 @@ define([ 'ngResource'], function() {
 				}
 			}
 		});
-	}).factory('PurcInquiryHis', function($resource) {
+	}]).factory('PurcInquiryHis', ['$resource', function($resource) {
 		return $resource('sale/inquiry/history/:id', {}, {
 			getTodo: {
 				params: {
@@ -261,7 +261,7 @@ define([ 'ngResource'], function() {
 				isArray: true
 			}
 		});
-	}).factory('PurcNoticeHis', function($resource) {
+	}]).factory('PurcNoticeHis', ['$resource', function($resource) {
 		return $resource('sale/notice/history/:id', {}, {
 			getTodo: {
 				params: {
@@ -284,7 +284,7 @@ define([ 'ngResource'], function() {
 				isArray: true
 			}
 		});
-	}).factory('SaleStat', function($resource) {
+	}]).factory('SaleStat', ['$resource', function($resource) {
 		return $resource('sale/stat', {}, {
 			day: {
 				url: 'sale/stat/day',
@@ -321,7 +321,7 @@ define([ 'ngResource'], function() {
 				isArray: true
 			}
 		});
-	}).factory('SaleTruck', function($resource) {
+	}]).factory('SaleTruck', ['$resource', function($resource) {
 		return $resource('sale/truck', {}, {
 			save: {
 				isArray: true,
@@ -336,5 +336,5 @@ define([ 'ngResource'], function() {
 				isArray: true
 			}
 		});
-	});
+	}]);
 });

+ 6 - 6
src/main/webapp/resources/js/public/app.js

@@ -4,7 +4,7 @@ define([ 'toaster', 'ngTable', 'common/services', 'service/Info', 'ui.router', '
 	app.init = function() {
 		angular.bootstrap(document, [ 'myApp' ]);
 	};
-	app.config(function($stateProvider, $urlRouterProvider) {
+	app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
 		$urlRouterProvider.otherwise('/notice');
 		$stateProvider.state('notice', {
 			url : "/notice",
@@ -19,8 +19,8 @@ define([ 'toaster', 'ngTable', 'common/services', 'service/Info', 'ui.router', '
 			templateUrl : "static/tpl/public/info/serve.html",
 			controller: 'ServeCtrl'
 		});
-	});
-	app.controller('NoticeCtrl', function($scope, ngTableParams, Notice, BaseService){
+	}]);
+	app.controller('NoticeCtrl', ['$scope', 'ngTableParams', 'Notice', 'BaseService', function($scope, ngTableParams, Notice, BaseService){
 		$scope.tableParams = new ngTableParams({
 			page : 1,
 			count : 20,
@@ -41,11 +41,11 @@ define([ 'toaster', 'ngTable', 'common/services', 'service/Info', 'ui.router', '
 				});
 			}
 		});
-	});
-	app.controller('NoticeDetailCtrl', function($scope, Notice, $stateParams){
+	}]);
+	app.controller('NoticeDetailCtrl', ['$scope', 'Notice', '$stateParams', function($scope, Notice, $stateParams){
 		Notice.get({id: $stateParams.id}, function(data){
 			$scope.noticeBody = data;
 		});
-	});
+	}]);
 	return app;
 });

+ 3 - 4
src/main/webapp/resources/js/public/services/Info.js

@@ -1,6 +1,5 @@
 define([ 'ngResource' ], function() {
-	angular.module('InfoServices', [ 'ngResource' ]).factory('Notice',
-			function($resource) {
-				return $resource('public/notice/:id', {});
-			});
+	angular.module('InfoServices', [ 'ngResource' ]).factory('Notice', ['$resource', function($resource) {
+		return $resource('public/notice/:id', {});
+	}]);
 });

+ 6 - 6
src/main/webapp/resources/js/register/registerApp.js

@@ -4,7 +4,7 @@ define([ 'toaster', 'services' ,'ui.router', 'file-upload', 'file-upload-shim'],
 	app.init = function() {
 		angular.bootstrap(document, [ 'myApp' ]);
 	};
-	app.config(function($stateProvider, $urlRouterProvider){
+	app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider){
 		$urlRouterProvider.otherwise("/step1");
 		$stateProvider.state('step1', {
 			url: '/step1',
@@ -16,9 +16,9 @@ define([ 'toaster', 'services' ,'ui.router', 'file-upload', 'file-upload-shim'],
 			url: '/step3/:uu/:checkcode',
       		templateUrl: 'static/tpl/register/step3.html'
     	});
-	});
+	}]);
 	
-	app.controller('Step1Ctrl', function($scope, $http, $location, $upload, toaster) {
+	app.controller('Step1Ctrl', ['$scope', '$http', '$location', '$upload', 'toaster', function($scope, $http, $location, $upload, toaster) {
 		$scope.loadingShow = false;//加载小图标,设为true即可显示
 		$scope.title = '注册表单';
 		$scope.enterprise = {};//企业实体
@@ -161,9 +161,9 @@ define([ 'toaster', 'services' ,'ui.router', 'file-upload', 'file-upload-shim'],
 			}
 			return url ;
 		};
-	});
+	}]);
 	
-	app.controller('Step3Ctrl', function($scope, $http, $location, $upload, toaster, $stateParams) {
+	app.controller('Step3Ctrl', ['$scope', '$http', '$location', '$upload', 'toaster', '$stateParams', function($scope, $http, $location, $upload, toaster, $stateParams) {
 		$scope.uu = $stateParams.uu;
 		$scope.checkcode = $stateParams.checkcode;
 		$scope.activateResult = false;
@@ -218,6 +218,6 @@ define([ 'toaster', 'services' ,'ui.router', 'file-upload', 'file-upload-shim'],
 				$scope.sendFaild = true;
 			});
 		};
-	});
+	}]);
 	return app;
 });

+ 10 - 10
src/main/webapp/resources/js/serve/app.js

@@ -4,7 +4,7 @@ define([ 'toaster', 'ngTable', 'common/services', 'ui.router', 'ui.bootstrap', '
 	app.init = function() {
 		angular.bootstrap(document, [ 'myApp' ]);
 	};
-	app.config(function($stateProvider, $urlRouterProvider) {
+	app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
 		$urlRouterProvider.otherwise('/index');
 		$stateProvider.state('index', {
 			url : "",
@@ -38,8 +38,8 @@ define([ 'toaster', 'ngTable', 'common/services', 'ui.router', 'ui.bootstrap', '
 			templateUrl : "static/tpl/serve/guide.html",
 			controller: 'GuideCtrl'
 		});
-	});
-	app.controller('MyCtrl', function($scope, $rootScope) {
+	}]);
+	app.controller('MyCtrl', ['$scope', '$rootScope', function($scope, $rootScope) {
 		$rootScope.$on('$locationChangeSuccess', function(evt, newUrl) {
 			var routeState = newUrl.substr(newUrl.indexOf('#/') + 2);
 			if (routeState.indexOf('/') > -1)
@@ -48,8 +48,8 @@ define([ 'toaster', 'ngTable', 'common/services', 'ui.router', 'ui.bootstrap', '
 				routeState = routeState.substring(0, routeState.indexOf('.'));
 			$scope.routeState = routeState || 'home';
 		});
-	});
-	app.controller('AuthCtrl', function($scope, $window, AuthenticationService) {
+	}]);
+	app.controller('AuthCtrl', ['$scope', '$window', 'AuthenticationService', function($scope, $window, AuthenticationService) {
 		$scope.isAuthed = AuthenticationService.isAuthed();
 		$scope.userInfo = {};
 		AuthenticationService.getAuthentication().success(function(data) {
@@ -62,19 +62,19 @@ define([ 'toaster', 'ngTable', 'common/services', 'ui.router', 'ui.bootstrap', '
 				$window.location.reload();
 			});
 		};
-	});
+	}]);
 	app.controller('IndexCtrl', function($scope){
 		
 	});
-	app.controller('ContactCtrl', function($scope, toaster){
+	app.controller('ContactCtrl', ['$scope', 'toaster', function($scope, toaster){
 		$scope.connect = function(type) {
 			toaster.pop('warning', '连接失败', '高峰期建议选择自助服务或问题反馈');
 		};
-	});
-	app.controller('GuideCtrl', function($scope, $stateParams, Guide) {
+	}]);
+	app.controller('GuideCtrl', ['$scope', '$stateParams', 'Guide', function($scope, $stateParams, Guide) {
 		Guide.get($stateParams.id).then(function(data){
 			$scope.slides = data;
 		});
-	});
+	}]);
 	return app;
 });

+ 2 - 2
src/main/webapp/resources/js/serve/services/Serve.js

@@ -1,5 +1,5 @@
 define([ 'angular' ], function() {
-	angular.module('ServeServices', [ ]).factory('Guide', function($http, $q) {
+	angular.module('ServeServices', [ ]).factory('Guide', ['$http', '$q', function($http, $q) {
 		return {
 			get : function(id) {
 				var defer = $q.defer();
@@ -13,7 +13,7 @@ define([ 'angular' ], function() {
 				return defer.promise;
 			}
 		};
-	}).factory('Question', function() {
+	}]).factory('Question', function() {
 		return {
 			get : function(id) {
 				var defer = $q.defer();

+ 4 - 4
src/main/webapp/resources/js/signin/app.js

@@ -4,7 +4,7 @@ define([ 'toaster', 'services' ], function() {
 	app.init = function() {
 		angular.bootstrap(document, [ 'myApp' ]);
 	};
-	app.controller('AuthCtrl', function($scope, $window, $location, toaster, AuthenticationService, SessionService) {
+	app.controller('AuthCtrl', ['$scope', '$window', '$location', 'toaster', 'AuthenticationService', 'SessionService', function($scope, $window, $location, toaster, AuthenticationService, SessionService) {
 		$scope.loading = false;
 		$scope.user = {
 			j_username : SessionService.getCookie('J_USERNAME'),
@@ -53,11 +53,11 @@ define([ 'toaster', 'services' ], function() {
 			}
 		};
 		loginAndRedirect();
-	});
-	app.controller('NoticeCtrl', function($scope, SnapshotService){
+	}]);
+	app.controller('NoticeCtrl', ['$scope', 'SnapshotService', function($scope, SnapshotService){
 		SnapshotService.getNotice(3, function(data){
 			$scope.notices = data;
 		});
-	});
+	}]);
 	return app;
 });