|
@@ -57,16 +57,16 @@ define(['app/app'], function(app) {
|
|
|
} else if (val == 'sixMonth') {
|
|
} else if (val == 'sixMonth') {
|
|
|
$scope.startDate = new Date(currentTime - 6 * 30 * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000);
|
|
$scope.startDate = new Date(currentTime - 6 * 30 * 24 * 60 * 60 * 1000 - 24 * 60 * 60 * 1000);
|
|
|
$scope.endDate = endDate;
|
|
$scope.endDate = endDate;
|
|
|
|
|
+ } else if (val == 'allMonth') {
|
|
|
|
|
+ $scope.startDate = null;
|
|
|
|
|
+ $scope.endDate = null;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- $scope.startFormatDate = _formatDate($scope.startDate, 'yyyy-MM-dd');
|
|
|
|
|
- $scope.endFormatDate = _formatDate($scope.endDate, 'yyyy-MM-dd');
|
|
|
|
|
|
|
+ $scope.startFormatDate = $scope.startDate ? _formatDate($scope.startDate, 'yyyy-MM-dd') : '';
|
|
|
|
|
+ $scope.endFormatDate = $scope.endDate ? _formatDate($scope.endDate, 'yyyy-MM-dd') : '';
|
|
|
if (val != 'autoMonth') {
|
|
if (val != 'autoMonth') {
|
|
|
$scope.manageTableParams.page(1);
|
|
$scope.manageTableParams.page(1);
|
|
|
$scope.manageTableParams.reload();
|
|
$scope.manageTableParams.reload();
|
|
|
- } else {
|
|
|
|
|
- // $scope.startDate = '';
|
|
|
|
|
- // $scope.endDate = '';
|
|
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -143,8 +143,16 @@ define(['app/app'], function(app) {
|
|
|
counts: [],
|
|
counts: [],
|
|
|
getData: function ($defer, params) {
|
|
getData: function ($defer, params) {
|
|
|
var param = BaseService.parseParams(params.url());
|
|
var param = BaseService.parseParams(params.url());
|
|
|
- $scope.goodsFilter.startTime = $scope.startFormatDate;
|
|
|
|
|
- $scope.goodsFilter.endTime = $scope.endFormatDate;
|
|
|
|
|
|
|
+ if($scope.startFormatDate) {
|
|
|
|
|
+ $scope.goodsFilter.startTime = $scope.startFormatDate
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete $scope.goodsFilter.startTime
|
|
|
|
|
+ }
|
|
|
|
|
+ if($scope.endFormatDate) {
|
|
|
|
|
+ $scope.goodsFilter.endTime = $scope.endFormatDate
|
|
|
|
|
+ } else {
|
|
|
|
|
+ delete $scope.goodsFilter.endTime
|
|
|
|
|
+ }
|
|
|
$scope.pageParams = param;
|
|
$scope.pageParams = param;
|
|
|
Goods.loadGoodsList(param, $scope.goodsFilter, function (data) {
|
|
Goods.loadGoodsList(param, $scope.goodsFilter, function (data) {
|
|
|
$scope.totalCount = data.totalElements;
|
|
$scope.totalCount = data.totalElements;
|