Browse Source

修改了客户采购询价和发货提醒选择日期会刷新数据的bug

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@9519 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
wangmh 8 years ago
parent
commit
fb36d631e4

+ 26 - 2
src/main/webapp/resources/js/index/app.js

@@ -3000,11 +3000,17 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 			$event.preventDefault();
 		    $event.stopPropagation();
 		    item[openParam] = !item[openParam];
+		};
+
+		$scope.openFilterDatePicker = function($event, item, openParam) {
+			$event.preventDefault();
+		    $event.stopPropagation();
+		    item[openParam] = !item[openParam];
             if($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]){
                 $scope.tableParams.reload();
             }
 		};
-		
+
 		$scope.getHistory = function(item) {
 			if(!item.history) {
 				PurcInquiry.getHistory({itemId: item.id}, function(data){
@@ -4619,6 +4625,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $event.preventDefault();
             $event.stopPropagation();
             item[openParam] = !item[openParam];
+        };
+
+        $scope.openFilterDatePicker = function($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
             if($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]){
                 $scope.tableParams.reload();
             }
@@ -4868,6 +4880,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $event.preventDefault();
             $event.stopPropagation();
             item[openParam] = !item[openParam];
+        };
+
+        $scope.openFilterDatePicker = function($event, item, openParam) {
+            $event.preventDefault();
+            $event.stopPropagation();
+            item[openParam] = !item[openParam];
             if($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]){
                 $scope.tableParams.reload();
             }
@@ -5339,11 +5357,17 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 			$event.preventDefault();
 		    $event.stopPropagation();
 		    item[openParam] = !item[openParam];
+		};
+
+		$scope.openFilterDatePicker = function($event, item, openParam) {
+			$event.preventDefault();
+		    $event.stopPropagation();
+		    item[openParam] = !item[openParam];
             if($scope.condition.dateFrom && $scope.condition.dateTo && !item[openParam]){
                 $scope.tableParams.reload();
             }
 		};
-		
+
 		//生成随机单号
 		$scope.autoCode = function(notice){
 			notice.send.code = $filter('date')(new Date(), 'yyMMddHHmmss-sss');

+ 4 - 4
src/main/webapp/resources/tpl/index/sale/inquiry.html

@@ -224,10 +224,10 @@
 								   ng-required="true" max-date = "condition.dateTo"
 								   current-text="今天" clear-text="清除" close-text="关闭"
 								   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-								   ng-focus="openDatePicker($event, condition, '$fromOpened')">
+								   ng-focus="openFilterDatePicker($event, condition, '$fromOpened')">
 							<span class="input-group-btn">
 							<button type="button" class="btn btn-default"
-									ng-click="openDatePicker($event, condition, '$fromOpened')">
+									ng-click="openFilterDatePicker($event, condition, '$fromOpened')">
 								<i class="fa fa-calendar"></i>
 							</button>
 						</span>
@@ -239,10 +239,10 @@
 								   ng-required="true" min-date = "condition.dateFrom"
 								   current-text="今天" clear-text="清除" close-text="关闭"
 								   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-								   ng-focus="openDatePicker($event, condition, '$toOpened')">
+								   ng-focus="openFilterDatePicker($event, condition, '$toOpened')">
 							<span class="input-group-btn">
 							<button type="button" class="btn btn-default"
-									ng-click="openDatePicker($event, condition, '$toOpened')">
+									ng-click="openFilterDatePicker($event, condition, '$toOpened')">
 								<i class="fa fa-calendar"></i>
 							</button>
 						</span>

+ 4 - 4
src/main/webapp/resources/tpl/index/sale/notice.html

@@ -241,10 +241,10 @@
 								   ng-required="true" max-date = "condition.dateTo"
 								   current-text="今天" clear-text="清除" close-text="关闭"
 								   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-								   ng-focus="openDatePicker($event, condition, '$fromOpened')">
+								   ng-focus="openFilterDatePicker($event, condition, '$fromOpened')">
 							<span class="input-group-btn">
 							<button type="button" class="btn btn-default"
-									ng-click="openDatePicker($event, condition, '$fromOpened')">
+									ng-click="openFilterDatePicker($event, condition, '$fromOpened')">
 								<i class="fa fa-calendar"></i>
 							</button>
 						</span>
@@ -256,10 +256,10 @@
 								   ng-required="true" min-date = "condition.dateFrom"
 								   current-text="今天" clear-text="清除" close-text="关闭"
 								   datepicker-options="{formatDayTitle: 'yyyy年M月', formatMonth: 'M月', showWeeks: false}"
-								   ng-focus="openDatePicker($event, condition, '$toOpened')">
+								   ng-focus="openFilterDatePicker($event, condition, '$toOpened')">
 							<span class="input-group-btn">
 							<button type="button" class="btn btn-default"
-									ng-click="openDatePicker($event, condition, '$toOpened')">
+									ng-click="openFilterDatePicker($event, condition, '$toOpened')">
 								<i class="fa fa-calendar"></i>
 							</button>
 						</span>