|
|
@@ -9612,23 +9612,25 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.setActive = function (state) {
|
|
|
if ($scope.active != state) {
|
|
|
$scope.active = state;
|
|
|
- if ($scope.tableParams.page() == 1)
|
|
|
- $scope.tableParams.reload();
|
|
|
- else
|
|
|
- $scope.tableParams.page(1);
|
|
|
+ // if ($scope.tableParams.page() == 1)
|
|
|
+ // $scope.tableParams.reload();
|
|
|
+ // else
|
|
|
+ // $scope.tableParams.page(1);
|
|
|
$scope.showNotCheck = false
|
|
|
}
|
|
|
$scope.condition.$open = false
|
|
|
$scope.apCheckCondition.$open = false
|
|
|
- if (state != 'active') {
|
|
|
- $scope.changeDateZone(1)
|
|
|
- }
|
|
|
+ // if (state != 'active') {
|
|
|
+ // $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();
|
|
|
};
|
|
|
@@ -9654,19 +9656,24 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
pageParams.keyword = $scope.keyword;
|
|
|
if ($scope.active === 'all') {
|
|
|
pageParams.keyword = $scope.keyword
|
|
|
- var _fromDate = $scope.thisMouthOut + '-01 00:00:00'
|
|
|
- _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, '/')
|
|
|
- _endDate = new Date(_endDate).getTime()
|
|
|
- // _fromDate = _fromDate.replace(/-/g, '/')
|
|
|
- _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'
|
|
|
+ _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, '/')
|
|
|
+ _endDate = new Date(_endDate).getTime()
|
|
|
+ // _fromDate = _fromDate.replace(/-/g, '/')
|
|
|
+ _fromDate = new Date(_fromDate).getTime()
|
|
|
+ pageParams.searchFilter.fromDate = _fromDate
|
|
|
+ pageParams.searchFilter.endDate = _endDate
|
|
|
+ } else {
|
|
|
+ // pageParams.searchFilter.fromDate = _fromDate
|
|
|
+ // pageParams.searchFilter.endDate = _endDate
|
|
|
+ }
|
|
|
FaApCheck.vendor(BaseService.parseParams(pageParams), function (page) {
|
|
|
$scope.loading = false;
|
|
|
page.content && page.content.forEach(function(list) {
|
|
|
@@ -9879,6 +9886,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.showNotCheck = true
|
|
|
$scope.vendorUU = item.vendorEnterprise.uu
|
|
|
$scope.thisMouth = $scope.thisMouthOut
|
|
|
+ $scope.condition.$open = false
|
|
|
this.searchOrder()
|
|
|
}
|
|
|
|
|
|
@@ -10370,9 +10378,11 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
$scope.hideshowNotCheck = function() {
|
|
|
$scope.showNotCheck = false
|
|
|
+ $scope.condition.$open2 = false
|
|
|
}
|
|
|
|
|
|
$scope.$watch('thisMouthOut', function(newVal, oldVal) {
|
|
|
+ $scope.condition.$open = false
|
|
|
var _fromDate = new Date()
|
|
|
|
|
|
var _d = new Date(_fromDate)
|
|
|
@@ -10518,23 +10528,24 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.setActive = function (state) {
|
|
|
if ($scope.active != state) {
|
|
|
$scope.active = state;
|
|
|
- if ($scope.tableParams.page() == 1)
|
|
|
- $scope.tableParams.reload();
|
|
|
- else
|
|
|
- $scope.tableParams.page(1);
|
|
|
- $scope.showNotCheck = false
|
|
|
+ // if ($scope.tableParams.page() == 1)
|
|
|
+ // $scope.tableParams.reload();
|
|
|
+ // else
|
|
|
+ // $scope.tableParams.page(1);
|
|
|
+ // $scope.showNotCheck = false
|
|
|
}
|
|
|
$scope.condition.$open = false
|
|
|
$scope.apCheckCondition.$open = false
|
|
|
- if (state != 'active') {
|
|
|
- $scope.changeDateZone(1)
|
|
|
- }
|
|
|
+ // if (state != 'active') {
|
|
|
+ // $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();
|
|
|
};
|
|
|
@@ -10560,20 +10571,22 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
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) {
|
|
|
@@ -10787,6 +10800,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.suuorname = item.myEnterprise.enName
|
|
|
$scope.customerUU = item.myEnterprise.uu
|
|
|
$scope.thisMouth = $scope.thisMouthOut
|
|
|
+ $scope.condition.$open = false
|
|
|
this.searchOrder()
|
|
|
}
|
|
|
|
|
|
@@ -11207,11 +11221,11 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.apCheck.endDate = _d.getTime()
|
|
|
}
|
|
|
|
|
|
- //获取筛选时间的开始时间为对账的开始时间
|
|
|
- $scope.apCheck.beginDate = $scope.fromDate;
|
|
|
-
|
|
|
- //获取筛选的截止时间为对账的截止时间
|
|
|
- $scope.apCheck.endDate = $scope.endDate;
|
|
|
+ // //获取筛选时间的开始时间为对账的开始时间
|
|
|
+ // $scope.apCheck.beginDate = $scope.fromDate;
|
|
|
+ //
|
|
|
+ // //获取筛选的截止时间为对账的截止时间
|
|
|
+ // $scope.apCheck.endDate = $scope.endDate;
|
|
|
|
|
|
|
|
|
//保存生成的应收对账单
|
|
|
@@ -11292,9 +11306,11 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
$scope.hideshowNotCheck = function() {
|
|
|
$scope.showNotCheck = false
|
|
|
+ $scope.condition.$open2 = false
|
|
|
}
|
|
|
|
|
|
$scope.$watch('thisMouthOut', function(newVal, oldVal) {
|
|
|
+ $scope.condition.$open = false
|
|
|
var _fromDate = new Date()
|
|
|
var _d = new Date(_fromDate)
|
|
|
// var _d = new Date(_fromDate.replace(/-/g,'/'))
|