|
|
@@ -10291,10 +10291,13 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
};
|
|
|
$scope.addMouth = function(val) {
|
|
|
- var _sp = new Date().getMonth() + 1
|
|
|
+ var _sp = new Date()
|
|
|
var _time = new Date($scope.thisMouth)
|
|
|
_time.setMonth(_time.getMonth() + val)
|
|
|
- if (_time.getMonth() + 1 >= Number(_sp)) {
|
|
|
+ _time.setDate(1)
|
|
|
+ _time.setMonth(_time.getMonth() + 1)
|
|
|
+ _time.setDate(_time.getDate() - 1)
|
|
|
+ if (_time.getTime() >= _sp.getTime()) {
|
|
|
$scope.MouthinShow = false
|
|
|
} else {
|
|
|
$scope.MouthinShow = true
|
|
|
@@ -10305,10 +10308,13 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
|
|
|
$scope.addMouthOut = function(val) {
|
|
|
- var _sp = new Date().getMonth() + 1
|
|
|
+ var _sp = new Date()
|
|
|
var _time = new Date($scope.thisMouthOut)
|
|
|
_time.setMonth(_time.getMonth() + val)
|
|
|
- if (_time.getMonth() + 1 >= Number(_sp)) {
|
|
|
+ _time.setDate(1)
|
|
|
+ _time.setMonth(_time.getMonth() + 1)
|
|
|
+ _time.setDate(_time.getDate() - 1)
|
|
|
+ if (_time.getTime() >= _sp.getTime()) {
|
|
|
$scope.MouthOutShow = false
|
|
|
} else {
|
|
|
$scope.MouthOutShow = true
|
|
|
@@ -10336,6 +10342,16 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
return
|
|
|
}
|
|
|
if (newVal !== oldVal) {
|
|
|
+ var _d = new Date(newVal)
|
|
|
+ _d.setDate(1)
|
|
|
+ _d.setMonth(_d.getMonth() + 1)
|
|
|
+ _d.setDate(_d.getDate() - 1)
|
|
|
+
|
|
|
+ if (_d.getTime() >= _fromDate.getTime()) {
|
|
|
+ $scope.MouthOutShow = false
|
|
|
+ } else {
|
|
|
+ $scope.MouthOutShow = true
|
|
|
+ }
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
}
|
|
|
@@ -10354,6 +10370,16 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
return
|
|
|
}
|
|
|
if (newVal !== oldVal) {
|
|
|
+ var _d = new Date(newVal)
|
|
|
+ _d.setDate(1)
|
|
|
+ _d.setMonth(_d.getMonth() + 1)
|
|
|
+ _d.setDate(_d.getDate() - 1)
|
|
|
+
|
|
|
+ if (_d.getTime() >= _fromDate.getTime()) {
|
|
|
+ $scope.MouthinShow = false
|
|
|
+ } else {
|
|
|
+ $scope.MouthinShow = true
|
|
|
+ }
|
|
|
$scope.searchOrder()
|
|
|
}
|
|
|
})
|