|
|
@@ -3273,12 +3273,13 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}]);
|
|
|
|
|
|
// 平台新增的询价单
|
|
|
- app.controller('PurcInquiryCtrl', ['$scope', 'PurchaseInquiry', 'toaster', 'BaseService', '$upload', '$filter', '$modal', '$rootScope', 'ngTableParams', 'GetProductInfo', '$timeout', '$http', 'ShipAddress', 'Search', 'ComponentActiveAPI', function($scope, PurchaseInquiry, toaster, BaseService, $upload, $filter, $modal, $rootScope, ngTableParams, GetProductInfo, $timeout, $http, ShipAddress, Search, ComponentActiveAPI) {
|
|
|
+ app.controller('PurcInquiryCtrl', ['$scope', 'PurchaseInquiry', 'toaster', 'BaseService', '$upload', '$filter', '$modal', '$rootScope', 'ngTableParams', 'PurcProduct', 'PurcProductNewest', '$timeout', '$http', 'ShipAddress', 'Search', 'ComponentActiveAPI', function($scope, PurchaseInquiry, toaster, BaseService, $upload, $filter, $modal, $rootScope, ngTableParams, PurcProduct, PurcProductNewest, $timeout, $http, ShipAddress, Search, ComponentActiveAPI) {
|
|
|
$scope.status = 'InquiryNew';
|
|
|
$scope.active = 'all';
|
|
|
$rootScope.tenderVendor = null;// 清除掉已选择的
|
|
|
+ $scope.searchMethod = false;
|
|
|
var getService = function() {
|
|
|
- return GetProductInfo;
|
|
|
+ return $scope.searchMethod ? PurcProduct : PurcProductNewest;
|
|
|
};
|
|
|
$scope.inquiry = {
|
|
|
code: 'XJ' + $filter('date')(new Date(), 'yyMMddsss'),
|
|
|
@@ -3394,6 +3395,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
page : 1,
|
|
|
count : 20,
|
|
|
sorting: {
|
|
|
+ id: 'desc'
|
|
|
}
|
|
|
}, {
|
|
|
total : 0,
|
|
|
@@ -3420,6 +3422,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 搜索框回车
|
|
|
$scope.onSearch = function(keyword) {
|
|
|
+ $scope.searchMethod = true;
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
@@ -5493,6 +5496,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
isSumbit = true;
|
|
|
return true;
|
|
|
} else {
|
|
|
+ toaster.pop('error', '提示', '为防止重复发货,请刷新页面后重新填写');
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
@@ -5699,6 +5703,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
isSumbit = true;
|
|
|
return true;
|
|
|
} else {
|
|
|
+ toaster.pop('error', '提示', '为防止重复发货,请刷新页面后重新填写');
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
@@ -12702,7 +12707,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if($scope.searchMethod) {
|
|
|
return cartList;
|
|
|
} else {
|
|
|
- return getCartList;
|
|
|
+ return cartList;
|
|
|
}
|
|
|
};
|
|
|
var getTodoCartCount = function() {
|
|
|
@@ -14301,7 +14306,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 新增招标单
|
|
|
*/
|
|
|
- app.controller('PurcNewTenderCtrl', ['$scope', '$filter', 'PurcTender', 'ngTableParams', 'toaster', 'BaseService', '$stateParams', '$modal', '$rootScope', '$upload', 'ShipAddress', '$http', 'AuthenticationService', 'KindAPI', 'BrandActiveAPI', 'Search', 'ComponentActiveAPI', 'GetProductInfo', 'Vendor',function($scope, $filter, PurcTender, ngTableParams, toaster, BaseService, $stateParams, $modal, $rootScope, $upload, ShipAddress, $http, AuthenticationService, KindAPI, BrandActiveAPI, Search, ComponentActiveAPI, GetProductInfo, Vendor) {
|
|
|
+ app.controller('PurcNewTenderCtrl', ['$scope', '$filter', 'PurcTender', 'ngTableParams', 'toaster', 'BaseService', '$stateParams', '$modal', '$rootScope', '$upload', 'ShipAddress', '$http', 'AuthenticationService', 'KindAPI', 'BrandActiveAPI', 'Search', 'ComponentActiveAPI', 'GetProductInfo', 'Vendor', 'PurcProduct', 'PurcProductNewest', function($scope, $filter, PurcTender, ngTableParams, toaster, BaseService, $stateParams, $modal, $rootScope, $upload, ShipAddress, $http, AuthenticationService, KindAPI, BrandActiveAPI, Search, ComponentActiveAPI, GetProductInfo, Vendor, PurcProduct, PurcProductNewest) {
|
|
|
|
|
|
// 录入人
|
|
|
AuthenticationService.getAuthentication().success(function(data) {
|
|
|
@@ -14309,8 +14314,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
});
|
|
|
$scope.time = $filter('date')(new Date, 'yyyy-MM-dd HH:mm');
|
|
|
|
|
|
+ $scope.searchMethod = false;
|
|
|
var getService = function() {
|
|
|
- return GetProductInfo;
|
|
|
+ return $scope.searchMethod ? PurcProduct : PurcProductNewest;
|
|
|
};
|
|
|
|
|
|
// 物料信息
|
|
|
@@ -14344,6 +14350,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 搜索框回车
|
|
|
$scope.onSearch = function(keyword) {
|
|
|
+ $scope.searchMethod = true;
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
@@ -17150,19 +17157,6 @@ 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) {
|
|
|
-// $timeout(function() {
|
|
|
-// $scope.tableParams.reload();
|
|
|
-// }, 500);
|
|
|
-// } else {
|
|
|
-// $scope.loading = false;
|
|
|
-// }
|
|
|
-// }, function(response) {
|
|
|
-// toaster.pop('error', '提示', response.data);
|
|
|
-// });
|
|
|
}
|
|
|
}, function(response) {
|
|
|
$scope.loading = false;
|