|
|
@@ -679,24 +679,30 @@ define(['app/app'], function (app) {
|
|
|
}
|
|
|
};
|
|
|
$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
|
|
|
}
|
|
|
$scope.thisMouth = _time.getFullYear() + '-' + (_time.getMonth() + 1)
|
|
|
$scope.apCheckCondition.$open = false
|
|
|
- this.searchOrder()
|
|
|
+ $scope.searchOrder()
|
|
|
}
|
|
|
|
|
|
$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
|
|
|
@@ -724,6 +730,16 @@ define(['app/app'], function (app) {
|
|
|
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();
|
|
|
}
|
|
|
@@ -742,12 +758,23 @@ define(['app/app'], function (app) {
|
|
|
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()
|
|
|
}
|
|
|
})
|
|
|
|
|
|
|
|
|
- /**
|
|
|
+
|
|
|
+ /**
|
|
|
* 将日期转化为整数日期
|
|
|
*/
|
|
|
var getDateTime = function (date) {
|