|
|
@@ -664,7 +664,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
condition.dateFrom = date;
|
|
|
condition.dateTo = new Date();
|
|
|
} else {
|
|
|
- date.setMonth(date.getMonth() - 6)
|
|
|
+ date.setMonth(date.getMonth() - 6);
|
|
|
condition.dateFrom = null;
|
|
|
condition.dateTo = date;
|
|
|
}
|
|
|
@@ -2093,15 +2093,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
$scope.dateZoneText = '一个月内';
|
|
|
$scope.condition = {dateZone: 1};
|
|
|
$scope.currency = Symbol.currency;//将币别转化为对应的符号
|
|
|
- $scope.changeAgreed = function(agreed) {
|
|
|
- $scope.condition.agreed = agreed;
|
|
|
- $scope.agreedText = typeof agreed == 'undefined' ? '全部' : (agreed == 1 ? '已同意' : '不同意');
|
|
|
- $scope.condition.$agreedOpen = false;
|
|
|
- };
|
|
|
$scope.changeDateZone = function(zone) {
|
|
|
$scope.condition.dateZone = zone;
|
|
|
$scope.dateZoneText = typeof zone == 'undefined' ? '半年前' : (zone == 1 ? '一个月内' : '半年内');
|
|
|
$scope.condition.$dateZoneOpen = false;
|
|
|
+ getDateCondition(zone, $scope.condition);
|
|
|
+ $scope.tableParams.reload();
|
|
|
};
|
|
|
$scope.setActive = function(state) {
|
|
|
if($scope.active != state) {
|
|
|
@@ -2129,12 +2126,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
$scope.loading = true;
|
|
|
var pageParams = params.url();
|
|
|
pageParams.keyword = $scope.keyword;
|
|
|
+ pageParams.fromDate = $scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null;
|
|
|
+ pageParams.endDate = $scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null;
|
|
|
getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
$scope.loading = false;
|
|
|
if(page) {
|
|
|
params.total(page.totalElements);
|
|
|
$defer.resolve(page.content);
|
|
|
$scope.keywordXls = angular.copy($scope.keyword);//保存当前取值的关键词
|
|
|
+ $scope.fromDateXls = angular.copy($scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null);//保存当前取值的起始日期
|
|
|
+ $scope.endDateXls = angular.copy($scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null);//保存当前取值的截止日期
|
|
|
}
|
|
|
}, function(response){
|
|
|
$scope.loading = false;
|
|
|
@@ -2149,12 +2150,23 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
item[openParam] = !item[openParam];
|
|
|
};
|
|
|
|
|
|
+ $scope.parseDate = function(dateStr) {
|
|
|
+ if(dateStr)
|
|
|
+ return Date.parse(dateStr, 'yyyy-MM-dd');
|
|
|
+ return new Date();
|
|
|
+ };
|
|
|
+
|
|
|
// 搜索框回车
|
|
|
$scope.onSearch = function() {
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
|
|
|
+ // 选择查找日期
|
|
|
+ $scope.onDateCondition = function(){
|
|
|
+ $scope.tableParams.page(1);
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ };
|
|
|
}]);
|
|
|
|
|
|
/**
|