|
|
@@ -114,6 +114,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
url : "/deputy",
|
|
|
templateUrl : "static/tpl/index/purc/deputyOrder.html",
|
|
|
controller : 'DeputyOrderCtrl'
|
|
|
+ }).state('purc.deputylog', {
|
|
|
+ url : "/deputylog",
|
|
|
+ templateUrl : "static/tpl/index/purc/deputyorders_log.html",
|
|
|
+ controller : 'DeputyOrderLogCtrl'
|
|
|
}).state('purc.newdeputy', {
|
|
|
url : "/deputy/add",
|
|
|
templateUrl : "static/tpl/index/purc/deputyOrder_new.html",
|
|
|
@@ -12471,10 +12475,70 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
}]);
|
|
|
|
|
|
+ /**
|
|
|
+ * 代采错误日志
|
|
|
+ */
|
|
|
+ app.controller('DeputyOrderLogCtrl', ['$scope', 'DeputyOrder', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', function($scope, DeputyOrder, ngTableParams, $filter, BaseService, toaster, $timeout) {
|
|
|
+ BaseService.scrollBackToTop();
|
|
|
+ var getService = function() {
|
|
|
+ return DeputyOrder.getRepetitions;
|
|
|
+ };
|
|
|
+
|
|
|
+ $scope.tableParams = new ngTableParams({
|
|
|
+ page : 1,
|
|
|
+ count : 5,
|
|
|
+ sorting: {
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ total : 0,
|
|
|
+ counts: [5, 10, 25, 50],
|
|
|
+ getData : function($defer, params) {
|
|
|
+ $scope.loading = true;
|
|
|
+ var pageParams = params.url();
|
|
|
+ pageParams.keyword = $scope.keyword;
|
|
|
+ pageParams.searchFilter = $scope.searchFilter;
|
|
|
+ getService().call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
+ $scope.loading = false;
|
|
|
+ if(page) {
|
|
|
+ params.total(page.totalElement);
|
|
|
+ $defer.resolve(page.content);
|
|
|
+ $scope.keywordXls = angular.copy(pageParams.keyword);//保存当前取值的关键词
|
|
|
+ $scope.searchFilterXls = angular.copy(pageParams.searchFilter);
|
|
|
+ }
|
|
|
+ }, function(response) {
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 搜索框回车
|
|
|
+ $scope.onSearch = function() {
|
|
|
+ $scope.tableParams.page(1);
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ };
|
|
|
+
|
|
|
+ //删除
|
|
|
+ $scope.deleteById = function(id) {
|
|
|
+ GetProductInfo.deleteById({id: id}, function(data) {
|
|
|
+ if(data.error) {
|
|
|
+ toaster.pop("error", "提示", data.error);
|
|
|
+ } else {
|
|
|
+ toaster.pop("success", "提示", "删除成功");
|
|
|
+ $timeout(function() {
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
+ }), function(response) {
|
|
|
+ toaster.pop("error", "删除失败", response.data);
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+ }]);
|
|
|
+
|
|
|
/**
|
|
|
* 招标单
|
|
|
*/
|
|
|
-
|
|
|
app.controller('PurcTenderCtrl', ['$scope', '$filter', 'PurcTender', 'ngTableParams', 'toaster', 'BaseService', '$stateParams', '$modal', '$rootScope', function($scope, $filter, PurcTender, ngTableParams, toaster, BaseService, $stateParams, $modal, $rootScope) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.active = 'done';
|