|
|
@@ -401,10 +401,12 @@ define(['app/app'], function (app) {
|
|
|
|
|
|
// 获取各种状态订单的数量信息
|
|
|
var getCounts = function () {
|
|
|
- Purchase.getAllStatusCounts({storeType: $scope.storeType}, function (data) {
|
|
|
- $scope.counts = angular.copy(data);
|
|
|
- $scope.counts[$scope.status] = $scope.pageParams.totalElements;
|
|
|
- });
|
|
|
+ if (!$scope.startDate && !$scope.endDate && !$scope.keyword){
|
|
|
+ Purchase.getAllStatusCounts({storeType: $scope.storeType}, function (data) {
|
|
|
+ $scope.counts = angular.copy(data);
|
|
|
+ $scope.counts[$scope.status] = $scope.pageParams.totalElements;
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
getCounts();
|
|
|
|
|
|
@@ -494,6 +496,7 @@ define(['app/app'], function (app) {
|
|
|
$scope.orderTableParams.reload();
|
|
|
};
|
|
|
|
|
|
+
|
|
|
$scope.orderTableParams = new ngTableParams($scope.tableParams, {
|
|
|
total: 0,
|
|
|
getData: function ($defer, params) {
|
|
|
@@ -523,22 +526,25 @@ define(['app/app'], function (app) {
|
|
|
|
|
|
Purchase.getByStatusAndInternal(param, function (page) {
|
|
|
if (page) {
|
|
|
- if ($scope.childStatus ==''){
|
|
|
- if (page.content) {
|
|
|
- angular.forEach(page, function (value, key) {
|
|
|
- if (key == 'all' || key == 'tobeconfirmed' || key == 'comfirmed' || key == 'inbound'
|
|
|
- || key == 'tobepaid' || key == 'completed' || key == 'unavailable' || key == 'toBeReviewed') {
|
|
|
- if(!$scope.counts) {
|
|
|
- $scope.counts = {};
|
|
|
+ if (!$scope.startDate && !$scope.endDate && !$scope.keyword) {
|
|
|
+ if ($scope.childStatus == '') {
|
|
|
+ if (page.content) {
|
|
|
+ angular.forEach(page, function (value, key) {
|
|
|
+ if (key == 'all' || key == 'tobeconfirmed' || key == 'comfirmed' || key == 'inbound'
|
|
|
+ || key == 'tobepaid' || key == 'completed' || key == 'unavailable' || key == 'toBeReviewed') {
|
|
|
+ if (!$scope.counts) {
|
|
|
+ $scope.counts = {};
|
|
|
+ }
|
|
|
+ $scope.counts[key] = value;
|
|
|
}
|
|
|
- $scope.counts[key] = value;
|
|
|
- }
|
|
|
- $scope.counts[$scope.status] = page.totalElements;
|
|
|
- });
|
|
|
- } else {
|
|
|
- $scope.counts = {};
|
|
|
+ $scope.counts[$scope.status] = page.totalElements;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ $scope.counts = {};
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
$scope.purchases = page.content;
|
|
|
$scope.requestOver = 0;
|
|
|
angular.forEach($scope.purchases, function (order) {
|
|
|
@@ -801,6 +807,7 @@ define(['app/app'], function (app) {
|
|
|
$scope.endDate = null;
|
|
|
return;
|
|
|
}
|
|
|
+ $scope.setChildStatus('','订单状态');
|
|
|
$scope.orderTableParams.page(1);
|
|
|
$scope.orderTableParams.reload();
|
|
|
};
|