Просмотр исходного кода

调整new date 苹果浏览器兼容问题

shenjunjie 7 лет назад
Родитель
Сommit
9ad8de7b35

+ 25 - 10
src/main/webapp/resources/js/index/app.js

@@ -9655,13 +9655,15 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 if ($scope.active === 'all') {
                     pageParams.keyword = $scope.keyword
                     var _fromDate =  $scope.thisMouthOut + '-01 00:00:00'
-                    var _d = new Date(_fromDate)
+                    var _d  = new Date(_fromDate.replace(/-/g,'/'))
                     _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 = new Date(_endDate).getTime()
                     _fromDate = new Date(_fromDate).getTime()
+                    console.log(_fromDate)
+                    console.log(_endDate)
                     pageParams.searchFilter.fromDate =  _fromDate
                     pageParams.searchFilter.endDate = _endDate
                     FaApCheck.vendor(BaseService.parseParams(pageParams), function (page) {
@@ -10255,7 +10257,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         };
         $scope.addMouth = function(val) {
             var _sp = new Date()
-            var _time = new Date($scope.thisMouth)
+            // var _time = new Date($scope.thisMouth)
+            var _time  = new Date($scope.thisMouth.replace(/-/g,'/'))
             _time.setMonth(_time.getMonth() + val)
             _time.setDate(1)
             _time.setMonth(_time.getMonth() + 1)
@@ -10272,7 +10275,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
         $scope.addMouthOut = function(val) {
             var _sp = new Date()
-            var _time = new Date($scope.thisMouthOut)
+            // var _time = new Date($scope.thisMouthOut)
+            var _time  = new Date($scope.thisMouthOut.replace(/-/g,'/'))
             _time.setMonth(_time.getMonth() + val)
             _time.setDate(1)
             _time.setMonth(_time.getMonth() + 1)
@@ -10294,6 +10298,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.$watch('thisMouthOut', function(newVal, oldVal) {
             var _fromDate = new Date()
             var _d = new Date(_fromDate)
+            // var _d  = new Date(_fromDate.replace(/-/g,'/'))
             _d.setDate(1)
             _d.setMonth(_d.getMonth() + 1)
             _d.setDate(_d.getDate() - 1)
@@ -10305,7 +10310,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 return
             }
             if (newVal !== oldVal) {
-                var _d = new Date(newVal)
+                // var _d = new Date(newVal)
+                var _d  = new Date(newVal.replace(/-/g,'/'))
                 _d.setDate(1)
                 _d.setMonth(_d.getMonth() + 1)
                 _d.setDate(_d.getDate() - 1)
@@ -10322,6 +10328,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.$watch('thisMouth', function(newVal, oldVal) {
             var _fromDate = new Date()
             var _d = new Date(_fromDate)
+            // var _d  = new Date(_fromDate.replace(/-/g,'/'))
             _d.setDate(1)
             _d.setMonth(_d.getMonth() + 1)
             _d.setDate(_d.getDate() - 1)
@@ -10333,7 +10340,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 return
             }
             if (newVal !== oldVal) {
-                var _d = new Date(newVal)
+                // var _d = new Date(newVal)
+                var _d  = new Date(newVal.replace(/-/g,'/'))
                 _d.setDate(1)
                 _d.setMonth(_d.getMonth() + 1)
                 _d.setDate(_d.getDate() - 1)
@@ -10475,7 +10483,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 if ($scope.active === 'all') {
                     pageParams.keyword = $scope.keyword
                     var _fromDate =  $scope.thisMouthOut + '-01 00:00:00'
-                    var _d = new Date(_fromDate)
+                    // var _d = new Date(_fromDate)
+                    var _d  = new Date(_fromDate.replace(/-/g,'/'))
                     _d.setDate(1)
                     _d.setMonth(_d.getMonth() + 1)
                     _d.setDate(_d.getDate() - 1)
@@ -11080,7 +11089,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         };
         $scope.addMouth = function(val) {
             var _sp = new Date()
-            var _time = new Date($scope.thisMouth)
+            // var _time = new Date($scope.thisMouth)
+            var _time  = new Date($scope.thisMouth.replace(/-/g,'/'))
             _time.setMonth(_time.getMonth() + val)
             _time.setDate(1)
             _time.setMonth(_time.getMonth() + 1)
@@ -11097,7 +11107,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
         $scope.addMouthOut = function(val) {
             var _sp = new Date()
-            var _time = new Date($scope.thisMouthOut)
+            // var _time = new Date($scope.thisMouthOut)
+            var _time  = new Date($scope.thisMouthOut.replace(/-/g,'/'))
             _time.setMonth(_time.getMonth() + val)
             _time.setDate(1)
             _time.setMonth(_time.getMonth() + 1)
@@ -11119,6 +11130,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.$watch('thisMouthOut', function(newVal, oldVal) {
             var _fromDate = new Date()
             var _d = new Date(_fromDate)
+            // var _d  = new Date(_fromDate.replace(/-/g,'/'))
             _d.setDate(1)
             _d.setMonth(_d.getMonth() + 1)
             _d.setDate(_d.getDate() - 1)
@@ -11130,7 +11142,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 return
             }
             if (newVal !== oldVal) {
-                var _d = new Date(newVal)
+                // var _d = new Date(newVal)
+                var _d  = new Date(newVal.replace(/-/g,'/'))
                 _d.setDate(1)
                 _d.setMonth(_d.getMonth() + 1)
                 _d.setDate(_d.getDate() - 1)
@@ -11147,6 +11160,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.$watch('thisMouth', function(newVal, oldVal) {
             var _fromDate = new Date()
             var _d = new Date(_fromDate)
+            // var _d  = new Date(_fromDate.replace(/-/g,'/'))
             _d.setDate(1)
             _d.setMonth(_d.getMonth() + 1)
             _d.setDate(_d.getDate() - 1)
@@ -11158,7 +11172,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 return
             }
             if (newVal !== oldVal) {
-                var _d = new Date(newVal)
+                // var _d = new Date(newVal)
+                var _d  = new Date(newVal.replace(/-/g,'/'))
                 _d.setDate(1)
                 _d.setMonth(_d.getMonth() + 1)
                 _d.setDate(_d.getDate() - 1)

+ 3 - 3
src/main/webapp/resources/tpl/index/fa/apCheck.html

@@ -306,7 +306,7 @@
 				</div>
 			</div>
 		</div>
-		<div ng-show="active === 'all'">
+		<div ng-if="active === 'all'">
 			<table class="order-table block order-table2" ng-table="tableParams" width="100%" style="table-layout:fixed">
 				<thead>
 					<tr class="header">
@@ -331,7 +331,7 @@
 						</div>
 					</td>
 					<td ng-if="check.totalCount.length === 0">-</td>
-					<td style="color: #3f84f6;cursor: pointer" ng-click="goToMNs(check)">对账详情</td>
+					<td style="color: #3f84f6;cursor: pointer" ng-click="goToMNs(check)">对账明细</td>
 				</tr>
 				</tbody>
 				<tbody ng-if="!ALLList || ALLList.length == 0">
@@ -352,7 +352,7 @@
 				</tbody>
 			</table>
 		</div>
-		<div ng-show="active !== 'all'">
+		<div ng-if="active !== 'all'">
 			<table class="order-table block" ng-table="tableParams">
 				<thead>
 					<tr class="header">

+ 5 - 5
src/main/webapp/resources/tpl/index/fa/arCheck.html

@@ -183,7 +183,7 @@
 	</div>
 
 	<div ng-hide="showNotCheck">
-		<div class="condition block"  ng-show="!showNotCheck">
+		<div class="condition block" ng-show="!showNotCheck">
 			<div class="search-bg condition block" style="padding: 10px 15px;">
 				<div class="row">
 					<div id="topSearch" ng-show="active !== 'all'" style="float: left">
@@ -283,7 +283,7 @@
 				</div>
 			</div>
 		</div>
-		<div ng-show="active === 'all'">
+		<div  ng-if="active === 'all'">
 			<table class="order-table block order-table2" ng-table="tableParams" width="100%" style="table-layout:fixed">
 				<thead>
 				<tr class="header">
@@ -308,7 +308,7 @@
 						</div>
 					</td>
 					<td ng-if="check.totalCount.length === 0">-</td>
-					<td style="color: #3f84f6;cursor: pointer" ng-click="goToMNs(check)">对账详情</td>
+					<td style="color: #3f84f6;cursor: pointer" ng-click="goToMNs(check)">对账明细</td>
 				</tr>
 				</tbody>
 				<tbody ng-if="!ALLList || ALLList.length == 0">
@@ -325,8 +325,8 @@
 				</tbody>
 			</table>
 		</div>
-		<div ng-show="active !== 'all'">
-			<table class="order-table block" ng-table="tableParams">
+		<div ng-if="active !== 'all'">
+			<table class="order-table block" ng-table="tableParams" >
 				<thead>
 				<tr class="header">
 					<th width="150">对账期间</th>