Add user management
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
window.app.controller('DistributionReportController', DistributionReportController);
|
||||
|
||||
DistributionReportController.$inject = ['$scope', 'reportSvc', 'downloadSvc'];
|
||||
function DistributionReportController($scope, reportSvc, downloadSvc) {
|
||||
var vm = this;
|
||||
vm.loadData = reportSvc.loadDistributionReport;
|
||||
vm.query = reportSvc.distributionQuery;
|
||||
vm.distributionData = reportSvc.distributionData;
|
||||
vm.export = function (params) {
|
||||
reportSvc.exportDistributionReport(params)
|
||||
.success(downloadSvc.success);
|
||||
}
|
||||
}
|
||||
window.app.controller('DistributionReportController',
|
||||
function($scope, reportSvc, downloadSvc) {
|
||||
var vm = this;
|
||||
vm.loadData = reportSvc.loadDistributionReport;
|
||||
vm.query = reportSvc.distributionQuery;
|
||||
vm.distributionData = reportSvc.distributionData;
|
||||
vm.export = function(params) {
|
||||
reportSvc.exportDistributionReport(params)
|
||||
.success(downloadSvc.success);
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -1,17 +1,16 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
window.app.directive('distributionReport', distributionReport);
|
||||
function distributionReport() {
|
||||
return {
|
||||
scope: {distributionData: "="},
|
||||
templateUrl: '/report/template/distributionReport.tmpl.cshtml',
|
||||
controller: controller,
|
||||
controllerAs: 'vm'
|
||||
}
|
||||
}
|
||||
window.app.directive('distributionReport',
|
||||
function () {
|
||||
return {
|
||||
scope: {distributionData: "="},
|
||||
templateUrl: '/report/template/distributionReport.tmpl.cshtml',
|
||||
controller: controller,
|
||||
controllerAs: 'vm'
|
||||
}
|
||||
});
|
||||
|
||||
controller.$inject = ['$scope'];
|
||||
function controller($scope) {
|
||||
var vm = this;
|
||||
vm.distributionData = $scope.distributionData;
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
window.app.controller('MovementReportController', MovementReportController);
|
||||
|
||||
MovementReportController.$inject = ['$scope', 'reportSvc', 'downloadSvc'];
|
||||
function MovementReportController($scope, reportSvc, downloadSvc) {
|
||||
var vm = this;
|
||||
vm.loadData = reportSvc.loadMovementData;
|
||||
vm.movementData = reportSvc.movementData;
|
||||
vm.export = function(month) {
|
||||
reportSvc.exportMovementData({month: month})
|
||||
.success(downloadSvc.success);
|
||||
}
|
||||
}
|
||||
window.app.controller('MovementReportController',
|
||||
function($scope, reportSvc, downloadSvc) {
|
||||
var vm = this;
|
||||
vm.loadData = reportSvc.loadMovementData;
|
||||
vm.movementData = reportSvc.movementData;
|
||||
vm.export = function(month) {
|
||||
reportSvc.exportMovementData({ month: month })
|
||||
.success(downloadSvc.success);
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -1,17 +1,16 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
window.app.directive('movementReport', movementReport);
|
||||
function movementReport() {
|
||||
return {
|
||||
scope: { movementData: "=" },
|
||||
templateUrl: '/report/template/movementReport.tmpl.cshtml',
|
||||
controller: controller,
|
||||
controllerAs: 'vm'
|
||||
}
|
||||
}
|
||||
window.app.directive('movementReport',
|
||||
function() {
|
||||
return {
|
||||
scope: { movementData: "=" },
|
||||
templateUrl: '/report/template/movementReport.tmpl.cshtml',
|
||||
controller: controller,
|
||||
controllerAs: 'vm'
|
||||
}
|
||||
});
|
||||
|
||||
controller.$inject = ['$scope', '$uibModal', 'inventorySvc'];
|
||||
function controller($scope, $uibModal, inventorySvc) {
|
||||
var vm = this;
|
||||
vm.movementData = $scope.movementData;
|
||||
|
||||
@@ -1,45 +1,43 @@
|
||||
(function () {
|
||||
window.app.factory('reportSvc', reportSvc);
|
||||
window.app.factory('reportSvc',
|
||||
function($http) {
|
||||
var distributionData = [];
|
||||
var distributionQuery = {};
|
||||
var movementData = {};
|
||||
|
||||
reportSvc.$inject = ['$http'];
|
||||
function reportSvc($http) {
|
||||
var distributionData = [];
|
||||
var distributionQuery = {};
|
||||
var movementData = {};
|
||||
var svc = {
|
||||
distributionData: distributionData,
|
||||
distributionQuery: distributionQuery,
|
||||
loadDistributionReport: loadDistributionReport,
|
||||
exportDistributionReport: exportDistributionReport,
|
||||
movementData: movementData,
|
||||
loadMovementData: loadMovementData,
|
||||
exportMovementData: exportMovementData
|
||||
};
|
||||
|
||||
var svc = {
|
||||
distributionData: distributionData,
|
||||
distributionQuery: distributionQuery,
|
||||
loadDistributionReport: loadDistributionReport,
|
||||
exportDistributionReport: exportDistributionReport,
|
||||
movementData: movementData,
|
||||
loadMovementData: loadMovementData,
|
||||
exportMovementData: exportMovementData
|
||||
};
|
||||
return svc;
|
||||
|
||||
return svc;
|
||||
function loadDistributionReport(query) {
|
||||
return $http.post('/Report/Distribution', query)
|
||||
.success(function(data) {
|
||||
distributionQuery = angular.copy(query, distributionQuery);
|
||||
angular.copy(data, distributionData);
|
||||
});
|
||||
}
|
||||
|
||||
function loadDistributionReport(query) {
|
||||
return $http.post('/Report/Distribution', query)
|
||||
.success(function (data) {
|
||||
distributionQuery = angular.copy(query, distributionQuery);
|
||||
angular.copy(data, distributionData);
|
||||
});
|
||||
}
|
||||
function exportDistributionReport(query) {
|
||||
return $http.post('/Report/DistributionExcel', query, { responseType: 'arraybuffer' });
|
||||
}
|
||||
|
||||
function exportDistributionReport(query) {
|
||||
return $http.post('/Report/DistributionExcel', query, { responseType: 'arraybuffer' });
|
||||
}
|
||||
function loadMovementData(query) {
|
||||
return $http.post('/Report/Movement', query)
|
||||
.success(function(data) {
|
||||
angular.copy(data, movementData);
|
||||
});
|
||||
}
|
||||
|
||||
function loadMovementData(query) {
|
||||
return $http.post('/Report/Movement', query)
|
||||
.success(function (data) {
|
||||
angular.copy(data, movementData);
|
||||
});
|
||||
}
|
||||
|
||||
function exportMovementData(query) {
|
||||
return $http.post('/Report/MovementExcel', query, { responseType: 'arraybuffer' });
|
||||
}
|
||||
}
|
||||
function exportMovementData(query) {
|
||||
return $http.post('/Report/MovementExcel', query, { responseType: 'arraybuffer' });
|
||||
}
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user