master
yuan 7 years ago
parent 9a10445398
commit 8fc003f87e

@ -77,11 +77,7 @@ define(['angular','decimal'], function (angular,decimal) {
params.dateto = $filter('date')(params.dateto, 'yyyyMMdd'); params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
}else { }else {
alert("请选择结束时间"); alert("请选择结束时间");
return return;
}
if(getTime2Time()>30){
alert("开始时间与结束时间不得超过三十天");
return;
} }
params.page = page || $scope.pagination.page || 1; params.page = page || $scope.pagination.page || 1;
$http.get('/partner/invoice/trans_flow', {params: params}).then(function (resp) { $http.get('/partner/invoice/trans_flow', {params: params}).then(function (resp) {
@ -99,13 +95,6 @@ define(['angular','decimal'], function (angular,decimal) {
commonDialog.alert({title: 'Search failed', content: resp.data.message, type: 'error'}); commonDialog.alert({title: 'Search failed', content: resp.data.message, type: 'error'});
}); });
}; };
var getTime2Time = function () {
var time = angular.copy($scope.params);
var from = time.datefrom = $filter('date')(time.datefrom, 'yyyy-MM-dd');
var to = time.dateto = $filter('date')(time.dateto, 'yyyy-MM-dd');
var longTime = new Date(to).getTime() - new Date(from).getTime() ;
return Math.floor(longTime/(24*60*60*1000));
};
$scope.export = function (type,page) { $scope.export = function (type,page) {
var url='/partner/invoice/trans_flow/pdf'; var url='/partner/invoice/trans_flow/pdf';

Loading…
Cancel
Save