|
@@ -209,6 +209,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
url : "/prodList/:id",
|
|
url : "/prodList/:id",
|
|
|
templateUrl : "static/tpl/index/purc/productDetail.html",
|
|
templateUrl : "static/tpl/index/purc/productDetail.html",
|
|
|
controller : 'PurcProdDetailCtrl'
|
|
controller : 'PurcProdDetailCtrl'
|
|
|
|
|
+ }).state('purc.productmatches', {
|
|
|
|
|
+ url : "/productmatches",
|
|
|
|
|
+ templateUrl : "static/tpl/index/approvalFlow/productmatches.html",
|
|
|
|
|
+ controller: 'ProductmatchesCtrl'
|
|
|
}).state('purc.uploadProduct', {
|
|
}).state('purc.uploadProduct', {
|
|
|
url : "/uploadProduct",
|
|
url : "/uploadProduct",
|
|
|
templateUrl : "static/tpl/index/purc/uploadByBatch.html",
|
|
templateUrl : "static/tpl/index/purc/uploadByBatch.html",
|
|
@@ -375,6 +379,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
url : "/prodList/:id",
|
|
url : "/prodList/:id",
|
|
|
templateUrl : "static/tpl/index/baseInfo/productDetail.html",
|
|
templateUrl : "static/tpl/index/baseInfo/productDetail.html",
|
|
|
controller : 'ProductDetailCtrl'
|
|
controller : 'ProductDetailCtrl'
|
|
|
|
|
+ }).state('sale.productmatches', {
|
|
|
|
|
+ url : "/productmatches",
|
|
|
|
|
+ templateUrl : "static/tpl/index/approvalFlow/productmatches.html",
|
|
|
|
|
+ controller: 'ProductmatchesCtrl'
|
|
|
}).state('sale.maketodo', {
|
|
}).state('sale.maketodo', {
|
|
|
url : "/maketodo",
|
|
url : "/maketodo",
|
|
|
templateUrl : "static/tpl/index/make/todo.html"
|
|
templateUrl : "static/tpl/index/make/todo.html"
|
|
@@ -9903,7 +9911,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
/**
|
|
|
* 物料资料
|
|
* 物料资料
|
|
|
*/
|
|
*/
|
|
|
- app.controller('ProductListCtrl', ['$scope', 'GetProductInfo', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', '$rootScope', '$modal', function($scope, GetProductInfo, ngTableParams, $filter, BaseService, toaster, $timeout, $rootScope, $modal) {
|
|
|
|
|
|
|
+ app.controller('ProductListCtrl', ['$scope', 'GetProductInfo', 'ngTableParams', '$filter', 'BaseService', 'toaster', '$timeout', '$rootScope', '$modal', 'Products', function($scope, GetProductInfo, ngTableParams, $filter, BaseService, toaster, $timeout, $rootScope, $modal, Products) {
|
|
|
BaseService.scrollBackToTop();
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.active = 'all';
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
$scope.agreedText = '全部';
|
|
@@ -10061,7 +10069,18 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}, function(){
|
|
}, function(){
|
|
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 一键匹配
|
|
|
|
|
+ $scope.matchall = function() {
|
|
|
|
|
+ Products.matchall({}, function(data) {
|
|
|
|
|
+ toaster.pop('info', '提示', '匹配成功'+data.size+'标准器件');
|
|
|
|
|
+ window.location.href = "#/sale/productmatches";
|
|
|
|
|
+ }, function(response) {
|
|
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}]);
|
|
}]);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -15831,6 +15850,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
Products.updateall( {}, ids, function(data) {
|
|
Products.updateall( {}, ids, function(data) {
|
|
|
if(data.success) {
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
toaster.pop('success', '提示', data.success);
|
|
|
|
|
+ $scope.tableParams.page(1);
|
|
|
|
|
+ $scope.tableParams.reload();
|
|
|
}
|
|
}
|
|
|
ids = []; // 清空ids,防止重复点击出现多余的数据
|
|
ids = []; // 清空ids,防止重复点击出现多余的数据
|
|
|
}, function(response) {
|
|
}, function(response) {
|
|
@@ -15996,6 +16017,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 一键匹配
|
|
|
|
|
+ $scope.matchall = function() {
|
|
|
|
|
+ Products.matchall({}, function(data) {
|
|
|
|
|
+ toaster.pop('info', '提示', '匹配成功'+data.size+'标准器件');
|
|
|
|
|
+ window.location.href = "#/purc/productmatches";
|
|
|
|
|
+ }, function(response) {
|
|
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}]);
|
|
}]);
|
|
|
|
|
|
|
|
/**
|
|
/**
|