|
@@ -471,6 +471,17 @@ define(['app/app'], function (app) {
|
|
|
// 点击其中一个明细的复选框
|
|
// 点击其中一个明细的复选框
|
|
|
$scope.checkOne = function (check) {
|
|
$scope.checkOne = function (check) {
|
|
|
check.$selected = !check.$selected
|
|
check.$selected = !check.$selected
|
|
|
|
|
+
|
|
|
|
|
+ $scope.Checkall()
|
|
|
|
|
+ };
|
|
|
|
|
+ $scope.stopPrevent = function(e) {
|
|
|
|
|
+ e = e || window.event
|
|
|
|
|
+ e.stopPropagation();
|
|
|
|
|
+ $scope.Checkall()
|
|
|
|
|
+ // event.preventDefault();
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ $scope.Checkall = function() {
|
|
|
var result = true;
|
|
var result = true;
|
|
|
angular.forEach($scope.data, function (item) {
|
|
angular.forEach($scope.data, function (item) {
|
|
|
if (item.$selected != true) {
|
|
if (item.$selected != true) {
|
|
@@ -479,8 +490,7 @@ define(['app/app'], function (app) {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
$scope.checkboxes.checked = result;
|
|
$scope.checkboxes.checked = result;
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
$scope.haveSelected = false;
|
|
$scope.haveSelected = false;
|
|
|
|
|
|
|
|
//生成应收对账单
|
|
//生成应收对账单
|
|
@@ -679,24 +689,30 @@ define(['app/app'], function (app) {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
$scope.addMouth = function(val) {
|
|
$scope.addMouth = function(val) {
|
|
|
- var _sp = new Date().getMonth() + 1
|
|
|
|
|
|
|
+ var _sp = new Date()
|
|
|
var _time = new Date($scope.thisMouth)
|
|
var _time = new Date($scope.thisMouth)
|
|
|
_time.setMonth(_time.getMonth() + val)
|
|
_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
|
|
$scope.MouthinShow = false
|
|
|
} else {
|
|
} else {
|
|
|
$scope.MouthinShow = true
|
|
$scope.MouthinShow = true
|
|
|
}
|
|
}
|
|
|
$scope.thisMouth = _time.getFullYear() + '-' + (_time.getMonth() + 1)
|
|
$scope.thisMouth = _time.getFullYear() + '-' + (_time.getMonth() + 1)
|
|
|
$scope.apCheckCondition.$open = false
|
|
$scope.apCheckCondition.$open = false
|
|
|
- this.searchOrder()
|
|
|
|
|
|
|
+ $scope.searchOrder()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$scope.addMouthOut = function(val) {
|
|
$scope.addMouthOut = function(val) {
|
|
|
- var _sp = new Date().getMonth() + 1
|
|
|
|
|
|
|
+ var _sp = new Date()
|
|
|
var _time = new Date($scope.thisMouthOut)
|
|
var _time = new Date($scope.thisMouthOut)
|
|
|
_time.setMonth(_time.getMonth() + val)
|
|
_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
|
|
$scope.MouthOutShow = false
|
|
|
} else {
|
|
} else {
|
|
|
$scope.MouthOutShow = true
|
|
$scope.MouthOutShow = true
|
|
@@ -724,6 +740,16 @@ define(['app/app'], function (app) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if (newVal !== oldVal) {
|
|
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.page(1);
|
|
|
$scope.tableParams.reload();
|
|
$scope.tableParams.reload();
|
|
|
}
|
|
}
|
|
@@ -742,12 +768,23 @@ define(['app/app'], function (app) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
if (newVal !== oldVal) {
|
|
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()
|
|
$scope.searchOrder()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
* 将日期转化为整数日期
|
|
* 将日期转化为整数日期
|
|
|
*/
|
|
*/
|
|
|
var getDateTime = function (date) {
|
|
var getDateTime = function (date) {
|