|
|
@@ -9706,6 +9706,22 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
pageParams.searchFilter.endDate = _endDate
|
|
|
FaApCheck.customer(BaseService.parseParams(pageParams), function (page) {
|
|
|
$scope.loading = false;
|
|
|
+ page.content.forEach(function(list) {
|
|
|
+ var _l = []
|
|
|
+ list.thisMonthCount && list.thisMonthCount.forEach(function(count) {
|
|
|
+ if (count.amount > 0) {
|
|
|
+ _l.push(count)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ list.thisMonthCount = _l
|
|
|
+ var _k = []
|
|
|
+ list.totalCount && list.totalCount.forEach(function(count) {
|
|
|
+ if (count.amount > 0) {
|
|
|
+ _k.push(count)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ list.totalCount = _k
|
|
|
+ })
|
|
|
if (page) {
|
|
|
params.total(page.totalElement);
|
|
|
$defer.resolve(page.content);
|
|
|
@@ -10261,7 +10277,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
}
|
|
|
// 新增
|
|
|
-
|
|
|
+ $scope.MouthOutShow = true
|
|
|
+ $scope.MouthinShow = true
|
|
|
$scope.apCheckopenFilterDatePicker = function ($event, item, openParam) {
|
|
|
$event.preventDefault();
|
|
|
$event.stopPropagation();
|
|
|
@@ -10271,16 +10288,28 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
};
|
|
|
$scope.addMouth = function(val) {
|
|
|
+ var _sp = new Date().getMonth() + 1
|
|
|
var _time = new Date($scope.thisMouth)
|
|
|
_time.setMonth(_time.getMonth() + val)
|
|
|
+ if (_time.getMonth() + 1 >= Number(_sp)) {
|
|
|
+ $scope.MouthinShow = false
|
|
|
+ } else {
|
|
|
+ $scope.MouthinShow = true
|
|
|
+ }
|
|
|
$scope.thisMouth = _time.getFullYear() + '-' + (_time.getMonth() + 1)
|
|
|
$scope.apCheckCondition.$open = false
|
|
|
$scope.searchOrder()
|
|
|
}
|
|
|
|
|
|
$scope.addMouthOut = function(val) {
|
|
|
+ var _sp = new Date().getMonth() + 1
|
|
|
var _time = new Date($scope.thisMouthOut)
|
|
|
_time.setMonth(_time.getMonth() + val)
|
|
|
+ if (_time.getMonth() + 1 >= Number(_sp)) {
|
|
|
+ $scope.MouthOutShow = false
|
|
|
+ } else {
|
|
|
+ $scope.MouthOutShow = true
|
|
|
+ }
|
|
|
$scope.thisMouthOut = _time.getFullYear() + '-' + (_time.getMonth() + 1)
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
@@ -10291,12 +10320,36 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
|
|
|
|
$scope.$watch('thisMouthOut', function(newVal, oldVal) {
|
|
|
+ var _fromDate = new Date()
|
|
|
+ var _d = new Date(_fromDate)
|
|
|
+ _d.setDate(1)
|
|
|
+ _d.setMonth(_d.getMonth() + 1)
|
|
|
+ _d.setDate(_d.getDate() - 1)
|
|
|
+
|
|
|
+ var _time2 = new Date(newVal)
|
|
|
+ if (_time2.getTime() > _d.getTime()) {
|
|
|
+ toaster.pop('error', '提示', '所选对账日期不能超过当前时间');
|
|
|
+ $scope.thisMouthOut = oldVal
|
|
|
+ return
|
|
|
+ }
|
|
|
if (newVal !== oldVal) {
|
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
|
}
|
|
|
})
|
|
|
$scope.$watch('thisMouth', function(newVal, oldVal) {
|
|
|
+ var _fromDate = new Date()
|
|
|
+ var _d = new Date(_fromDate)
|
|
|
+ _d.setDate(1)
|
|
|
+ _d.setMonth(_d.getMonth() + 1)
|
|
|
+ _d.setDate(_d.getDate() - 1)
|
|
|
+
|
|
|
+ var _time2 = new Date(newVal)
|
|
|
+ if (_time2.getTime() > _d.getTime()) {
|
|
|
+ toaster.pop('error', '提示', '所选对账日期不能超过当前时间');
|
|
|
+ $scope.thisMouth = oldVal
|
|
|
+ return
|
|
|
+ }
|
|
|
if (newVal !== oldVal) {
|
|
|
$scope.searchOrder()
|
|
|
}
|