|
|
@@ -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;
|
|
|
});
|