|
|
@@ -533,10 +533,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
url : '/invitation',
|
|
|
templateUrl : "static/tpl/index/baseInfo/invitation.html",
|
|
|
controller : 'InvitationCtrl'
|
|
|
- // }).state('baseInfo.invitationforEn', {
|
|
|
- // url : '/invitationforEn',
|
|
|
- // templateUrl : "static/tpl/index/baseInfo/invitation.html",
|
|
|
- // controller : 'InvitationByEnCtrl'
|
|
|
}).state('qc', {
|
|
|
url : "/qc",
|
|
|
views : {
|
|
|
@@ -10485,7 +10481,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 物料资料
|
|
|
*/
|
|
|
- app.controller('ProductListCtrl', ['$scope', 'GetProductInfo', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', '$rootScope', '$modal', 'Products', function($scope, GetProductInfo, ngTableParams, $filter, BaseService, toaster, $timeout, $rootScope, $modal, Products) {
|
|
|
+ app.controller('ProductListCtrl', ['$scope', 'GetProductInfo', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', '$rootScope', '$modal', 'Products', 'GetProductInfoNewest', function($scope, GetProductInfo, ngTableParams, $filter, BaseService, toaster, $timeout, $rootScope, $modal, Products, GetProductInfoNewest) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
@@ -10513,8 +10509,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.tableParams.page(1);
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ $scope.searchMethod = false;
|
|
|
var getService = function() {
|
|
|
- return GetProductInfo;
|
|
|
+ if($scope.searchMethod) {
|
|
|
+ return GetProductInfo;
|
|
|
+ } else {
|
|
|
+ return GetProductInfoNewest;
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
$scope.tableParams = new ngTableParams({
|
|
|
@@ -10547,6 +10549,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 搜索框回车
|
|
|
$scope.onSearch = function() {
|
|
|
+ $scope.searchMethod = true;
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
@@ -16674,7 +16677,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}]);
|
|
|
|
|
|
// 当前企业所有的物料信息
|
|
|
- app.controller('ProductAllCtrl', ['$scope', 'ProductAll', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', 'Products', function($scope, ProductAll, ngTableParams, $filter, BaseService, toaster, $timeout, Products) {
|
|
|
+ app.controller('ProductAllCtrl', ['$scope', 'ProductAll', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', 'Products', 'ProductAllNewest', function($scope, ProductAll, ngTableParams, $filter, BaseService, toaster, $timeout, Products, ProductAllNewest) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
@@ -16702,9 +16705,15 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.tableParams.page(1);
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ $scope.searchMethod = false;
|
|
|
var getService = function() {
|
|
|
- return ProductAll;
|
|
|
-// return Products.getAllNewest;
|
|
|
+ if($scope.searchMethod) {
|
|
|
+ return ProductAll;
|
|
|
+ } else {
|
|
|
+ return ProductAllNewest;
|
|
|
+ }
|
|
|
+
|
|
|
};
|
|
|
|
|
|
$scope.tableParams = new ngTableParams({
|
|
|
@@ -16739,6 +16748,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 搜索框回车
|
|
|
$scope.onSearch = function() {
|
|
|
+ $scope.searchMethod = true;
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
@@ -16826,13 +16836,26 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ $scope.searchMethod = false;
|
|
|
var getService = function() {
|
|
|
if($rootScope.productMatchStatus === 'sale') {
|
|
|
- return Products.matchResultforSale;
|
|
|
+ if($scope.searchMethod) {
|
|
|
+ return Products.matchResultforSale;
|
|
|
+ } else {
|
|
|
+ return Products.newestMatchResultforSale;
|
|
|
+ }
|
|
|
} else if($rootScope.productMatchStatus === 'purc') {
|
|
|
- return Products.matchResultforPurc;
|
|
|
+ if($scope.searchMethod) {
|
|
|
+ return Products.matchResultforPurc;
|
|
|
+ } else {
|
|
|
+ return Products.newestMatchResultforPurc;
|
|
|
+ }
|
|
|
} else {
|
|
|
- return Products.matchResult;
|
|
|
+ if($scope.searchMethod) {
|
|
|
+ return Products.matchResult;
|
|
|
+ } else {
|
|
|
+ return Products.newestMatchResult;
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -16840,6 +16863,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
page : 1,
|
|
|
count : 20,
|
|
|
sorting: {
|
|
|
+ matchsize: 'asc',
|
|
|
+ id: 'desc'
|
|
|
}
|
|
|
}, {
|
|
|
total : 0,
|
|
|
@@ -16884,6 +16909,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 搜索框回车
|
|
|
$scope.onSearch = function() {
|
|
|
+ $scope.searchMethod = true;
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
@@ -16914,14 +16940,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
return;
|
|
|
}
|
|
|
});
|
|
|
-// $scope.checks.checked = result;
|
|
|
-// var checked = true;
|
|
|
-// angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
-// if (!message.checked) {
|
|
|
-// checked = false;
|
|
|
-// }
|
|
|
-// });
|
|
|
-// $scope.checks.checked = checked;
|
|
|
+ $scope.checks.checked = result;
|
|
|
+ var checked = true;
|
|
|
+ angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
+ if (!message.checked) {
|
|
|
+ checked = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $scope.checks.checked = checked;
|
|
|
};
|
|
|
|
|
|
$scope.product = {
|
|
|
@@ -16981,7 +17007,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- Products.updateall( {}, ids, function(data) {
|
|
|
+
|
|
|
+ Products.updateall( {status: $scope.checks.checked}, ids, function(data) {
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
$timeout(function() {
|
|
|
@@ -17028,14 +17055,21 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ $scope.searchMethod = false;
|
|
|
var getService = function() {
|
|
|
- return Products.matchResultforSale;
|
|
|
+ if($scope.searchMethod) {
|
|
|
+ return Products.matchResultforSale;
|
|
|
+ } else {
|
|
|
+ return Products.newestMatchResultforSale;
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
$scope.tableParams = new ngTableParams({
|
|
|
page : 1,
|
|
|
count : 20,
|
|
|
sorting: {
|
|
|
+ matchsize: 'asc',
|
|
|
+ id: 'desc'
|
|
|
}
|
|
|
}, {
|
|
|
total : 0,
|
|
|
@@ -17080,6 +17114,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 搜索框回车
|
|
|
$scope.onSearch = function() {
|
|
|
+ $scope.searchMethod = true;
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
@@ -17110,14 +17145,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
return;
|
|
|
}
|
|
|
});
|
|
|
-// $scope.checks.checked = result;
|
|
|
-// var checked = true;
|
|
|
-// angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
-// if (!message.checked) {
|
|
|
-// checked = false;
|
|
|
-// }
|
|
|
-// });
|
|
|
-// $scope.checks.checked = checked;
|
|
|
+ $scope.checks.checked = result;
|
|
|
+ var checked = true;
|
|
|
+ angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
+ if (!message.checked) {
|
|
|
+ checked = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $scope.checks.checked = checked;
|
|
|
};
|
|
|
|
|
|
$scope.product = {
|
|
|
@@ -17177,7 +17212,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- Products.updateall( {}, ids, function(data) {
|
|
|
+ Products.updateall( {status: $scope.checks.checked}, ids, function(data) {
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
$timeout(function() {
|
|
|
@@ -17224,14 +17259,21 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ $scope.searchMethod = false;
|
|
|
var getService = function() {
|
|
|
- return Products.matchResultforPurc;
|
|
|
+ if($scope.searchMethod) {
|
|
|
+ return Products.matchResultforPurc;
|
|
|
+ } else {
|
|
|
+ return Products.newestMatchResultforPurc;
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
$scope.tableParams = new ngTableParams({
|
|
|
page : 1,
|
|
|
count : 20,
|
|
|
sorting: {
|
|
|
+ matchsize: 'asc',
|
|
|
+ id: 'desc'
|
|
|
}
|
|
|
}, {
|
|
|
total : 0,
|
|
|
@@ -17276,6 +17318,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 搜索框回车
|
|
|
$scope.onSearch = function() {
|
|
|
+ $scope.searchMethod = true;
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
@@ -17307,13 +17350,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
});
|
|
|
$scope.checks.checked = result;
|
|
|
-// var checked = true;
|
|
|
-// angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
-// if (!message.checked) {
|
|
|
-// checked = false;
|
|
|
-// }
|
|
|
-// });
|
|
|
-// $scope.checks.checked = checked;
|
|
|
+ var checked = true;
|
|
|
+ angular.forEach($scope.tableParams.data, function(message) { // 单选全部时,全选选中
|
|
|
+ if (!message.checked) {
|
|
|
+ checked = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $scope.checks.checked = checked;
|
|
|
};
|
|
|
|
|
|
$scope.product = {
|
|
|
@@ -17373,7 +17416,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- Products.updateall( {}, ids, function(data) {
|
|
|
+
|
|
|
+ Products.updateall( {status: $scope.checks.checked}, ids, function(data) {
|
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
|
$timeout(function() {
|
|
|
@@ -17393,7 +17437,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 采购物料资料
|
|
|
*/
|
|
|
- app.controller('PurcProductCtrl', ['$scope', 'PurcProduct', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', 'Products', '$modal', 'GetProductInfo', '$rootScope', function($scope, PurcProduct, ngTableParams, $filter, BaseService, toaster, $timeout, Products, $modal, GetProductInfo, $rootScope) {
|
|
|
+ app.controller('PurcProductCtrl', ['$scope', 'PurcProduct', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', 'Products', '$modal', 'GetProductInfo', '$rootScope', 'PurcProductNewest', function($scope, PurcProduct, ngTableParams, $filter, BaseService, toaster, $timeout, Products, $modal, GetProductInfo, $rootScope, PurcProductNewest) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
@@ -17421,8 +17465,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.tableParams.page(1);
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ $scope.searchMethod = false;
|
|
|
var getService = function() {
|
|
|
- return PurcProduct;
|
|
|
+ if($scope.searchMethod) {
|
|
|
+ return PurcProduct;
|
|
|
+ } else {
|
|
|
+ return PurcProductNewest;
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
$scope.tableParams = new ngTableParams({
|