|
|
@@ -52,11 +52,12 @@ define(['app/app'], function (app) {
|
|
|
$scope.changeDateZone(1)
|
|
|
}
|
|
|
};
|
|
|
- $scope.changeDateZone = function (zone) {
|
|
|
+ $scope.changeDateZone = function (zone, flg) {
|
|
|
$scope.condition.dateZone = zone;
|
|
|
$scope.dateZoneText = zone == 1 ? '最近一个月' : (zone == 3 ? '最近三个月' : (zone == 6 ? '最近六个月' : '自定义'));
|
|
|
$scope.condition.$dateZoneOpen = false;
|
|
|
getDateCondition(zone, $scope.condition);
|
|
|
+ if (flg) return
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
|
@@ -82,20 +83,22 @@ define(['app/app'], function (app) {
|
|
|
pageParams.keyword = $scope.keyword;
|
|
|
if ($scope.active === 'all') {
|
|
|
pageParams.keyword = $scope.keyword
|
|
|
- var _fromDate = $scope.thisMouthOut + '-01 00:00:00'
|
|
|
- // var _d = new Date(_fromDate)
|
|
|
- _fromDate = _fromDate.replace(/-/g,'/')
|
|
|
- var _d = new Date(_fromDate)
|
|
|
- _d.setDate(1)
|
|
|
- _d.setMonth(_d.getMonth() + 1)
|
|
|
- _d.setDate(_d.getDate() - 1)
|
|
|
- var _endDate = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate() + ' 00:00:00'
|
|
|
- _endDate = _endDate.replace(/-/g,'/')
|
|
|
- _fromDate = _fromDate.replace(/-/g,'/')
|
|
|
- _endDate = new Date(_endDate).getTime()
|
|
|
- _fromDate = new Date(_fromDate).getTime()
|
|
|
- pageParams.searchFilter.fromDate = _fromDate
|
|
|
- pageParams.searchFilter.endDate = _endDate
|
|
|
+ if (!$scope.condition.$open) {
|
|
|
+ var _fromDate = $scope.thisMouthOut + '-01 00:00:00'
|
|
|
+ // var _d = new Date(_fromDate)
|
|
|
+ _fromDate = _fromDate.replace(/-/g, '/')
|
|
|
+ var _d = new Date(_fromDate)
|
|
|
+ _d.setDate(1)
|
|
|
+ _d.setMonth(_d.getMonth() + 1)
|
|
|
+ _d.setDate(_d.getDate() - 1)
|
|
|
+ var _endDate = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate() + ' 00:00:00'
|
|
|
+ _endDate = _endDate.replace(/-/g, '/')
|
|
|
+ _fromDate = _fromDate.replace(/-/g, '/')
|
|
|
+ _endDate = new Date(_endDate).getTime()
|
|
|
+ _fromDate = new Date(_fromDate).getTime()
|
|
|
+ pageParams.searchFilter.fromDate = _fromDate
|
|
|
+ pageParams.searchFilter.endDate = _endDate
|
|
|
+ }
|
|
|
FaApCheck.customer(BaseService.parseParams(pageParams), function (page) {
|
|
|
$scope.loading = false;
|
|
|
page.content && page.content.forEach(function(list) {
|
|
|
@@ -311,6 +314,7 @@ define(['app/app'], function (app) {
|
|
|
$scope.suuorname = item.myEnterprise.enName
|
|
|
$scope.customerUU = item.myEnterprise.uu
|
|
|
$scope.thisMouth = $scope.thisMouthOut
|
|
|
+ $scope.condition.$open = false
|
|
|
this.searchOrder()
|
|
|
}
|
|
|
|
|
|
@@ -806,10 +810,16 @@ define(['app/app'], function (app) {
|
|
|
}
|
|
|
|
|
|
$scope.hideshowNotCheck = function() {
|
|
|
+ $scope.apCheckCondition.$open = false
|
|
|
+ $scope.condition.$open = false
|
|
|
$scope.showNotCheck = false
|
|
|
+ $scope.condition.$open2 = false
|
|
|
+ $scope.condition.dateZone = 1
|
|
|
}
|
|
|
|
|
|
$scope.$watch('thisMouthOut', function(newVal, oldVal) {
|
|
|
+ $scope.condition.$open = false
|
|
|
+ $scope.condition.dateZone = 1
|
|
|
var _fromDate = new Date()
|
|
|
var _d = new Date(_fromDate)
|
|
|
// var _d = new Date(_fromDate.replace(/-/g,'/'))
|
|
|
@@ -874,6 +884,11 @@ define(['app/app'], function (app) {
|
|
|
$scope.searchOrder()
|
|
|
}
|
|
|
})
|
|
|
+ $scope.resetHandle = function() {
|
|
|
+ if ($scope.condition.$open) return
|
|
|
+ $scope.condition.$open = true;
|
|
|
+ $scope.changeDateZone(-1)
|
|
|
+ }
|
|
|
|
|
|
|
|
|
/**
|