|
|
@@ -10196,8 +10196,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 一键匹配
|
|
|
$scope.matchall = function() {
|
|
|
- $scope.loading = true;
|
|
|
- Products.matchall({}, function(data) {
|
|
|
+ $scope.loading = true;
|
|
|
+ $scope.type = "sale";
|
|
|
+ Products.matchbytype({type: $scope.type}, {}, function(data) {
|
|
|
toaster.pop('info', '提示', '匹配成功'+data.size+'个标准器件');
|
|
|
window.location.href = "#/sale/productmatches";
|
|
|
}, function(response) {
|
|
|
@@ -16037,8 +16038,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 一键匹配
|
|
|
$scope.matchall = function() {
|
|
|
- $scope.loading = true;
|
|
|
- Products.matchall({}, function(data) {
|
|
|
+ $scope.type = "all";
|
|
|
+ $scope.loading = true;
|
|
|
+ Products.matchbytype({type: $scope.type}, {}, function(data) {
|
|
|
toaster.pop('info', '提示', '匹配成功'+data.size+'个标准器件');
|
|
|
window.location.href = "#/approvalFlow/productmatches";
|
|
|
}, function(response) {
|
|
|
@@ -16103,7 +16105,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
getService().call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
$scope.loading = false;
|
|
|
if(page) {
|
|
|
- console.log(page);
|
|
|
params.total(page.totalElement);
|
|
|
$defer.resolve(page.content);
|
|
|
$scope.keywordXls = angular.copy(pageParams.keyword);//保存当前取值的关键词
|
|
|
@@ -16114,6 +16115,15 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
product.checked = $scope.checks.checked;
|
|
|
}
|
|
|
});
|
|
|
+ $scope.total = page.totalElement;
|
|
|
+ Products.matchsize({type: 'all'}, {}, function(data) {
|
|
|
+ $scope.size = data.size;
|
|
|
+ if($scope.total < $scope.size) {
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }
|
|
|
+ }, function(response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
+ });
|
|
|
}
|
|
|
}, function(response) {
|
|
|
$scope.loading = false;
|
|
|
@@ -16283,7 +16293,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
getService().call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
$scope.loading = false;
|
|
|
if(page) {
|
|
|
- console.log(page);
|
|
|
params.total(page.totalElement);
|
|
|
$defer.resolve(page.content);
|
|
|
$scope.keywordXls = angular.copy(pageParams.keyword);//保存当前取值的关键词
|
|
|
@@ -16294,6 +16303,15 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
product.checked = $scope.checks.checked;
|
|
|
}
|
|
|
});
|
|
|
+ $scope.total = page.totalElement;
|
|
|
+ Products.matchsize({type: 'sale'}, {}, function(data) {
|
|
|
+ $scope.size = data.size;
|
|
|
+ if($scope.total < $scope.size) {
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }
|
|
|
+ }, function(response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
+ });
|
|
|
}
|
|
|
}, function(response) {
|
|
|
$scope.loading = false;
|
|
|
@@ -16463,7 +16481,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
getService().call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
$scope.loading = false;
|
|
|
if(page) {
|
|
|
- console.log(page);
|
|
|
params.total(page.totalElement);
|
|
|
$defer.resolve(page.content);
|
|
|
$scope.keywordXls = angular.copy(pageParams.keyword);//保存当前取值的关键词
|
|
|
@@ -16474,6 +16491,15 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
product.checked = $scope.checks.checked;
|
|
|
}
|
|
|
});
|
|
|
+ $scope.total = page.totalElement;
|
|
|
+ Products.matchsize({type: 'purc'}, {}, function(data) {
|
|
|
+ $scope.size = data.size;
|
|
|
+ if($scope.total < $scope.size) {
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }
|
|
|
+ }, function(response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
+ });
|
|
|
}
|
|
|
}, function(response) {
|
|
|
$scope.loading = false;
|
|
|
@@ -16752,8 +16778,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 一键匹配
|
|
|
$scope.matchall = function() {
|
|
|
- $scope.loading = true;
|
|
|
- Products.matchall({}, function(data) {
|
|
|
+ $scope.type = "purc";
|
|
|
+ $scope.loading = true;
|
|
|
+ Products.matchbytype({type: $scope.type}, {}, function(data) {
|
|
|
toaster.pop('info', '提示', '匹配成功'+data.size+'个标准器件');
|
|
|
window.location.href = "#/purc/productmatches";
|
|
|
}, function(response) {
|
|
|
@@ -16767,7 +16794,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
*/
|
|
|
app.controller('UploadProductCtrl', ['$scope', '$upload', 'toaster', 'BaseService', function($scope, $upload, toaster, BaseService) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
-
|
|
|
$scope.$watch('myFiles', function(){
|
|
|
if($scope.myFiles) {
|
|
|
var file = $scope.myFiles[0];
|
|
|
@@ -16781,12 +16807,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if($scope.myFiles) {
|
|
|
var file = $scope.myFiles[0];
|
|
|
if(file.name) {
|
|
|
+ $scope.loading = true;
|
|
|
$upload.upload({
|
|
|
url: 'purcProduct/release/excel',
|
|
|
file: file,
|
|
|
method: 'POST'
|
|
|
}).success(function(data) {
|
|
|
- $scope.loading = false;
|
|
|
+ $scope.loading = false;
|
|
|
if(data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
|
}
|