Browse Source

erp库存排序整体点击

yangc 8 years ago
parent
commit
8020cd4240

+ 10 - 3
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -19,9 +19,16 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
         };
 
         $scope.sortByERP = 'none';
-        $scope.sortByERPReserve = function (type) {
-			$scope.param.sorting = {'erpReserve': type};
-			$scope.sortByERP = type == $scope.sortByERP ? 'none' : type;
+        $scope.sortByERPReserve = function () {
+			if ($scope.sortByERP == 'none') {
+				$scope.sortByERP = 'DESC'
+			} else if ($scope.sortByERP == 'DESC') {
+				$scope.sortByERP = 'ASC'
+			} else {
+				$scope.sortByERP = 'none'
+			}
+			$scope.param.sorting = $scope.sortByERP == 'none' ? {id : 'DESC'} : {'erpReserve': $scope.sortByERP};
+			// $scope.sortByERP = type == $scope.sortByERP ? 'none' : type;
 			loadData();
 		}
 

+ 8 - 2
src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_erp.html

@@ -429,6 +429,10 @@
 	.com_tab ul li.active a {
 		color: #1687ff;
 	}
+	.pro_management .sort-area,
+	.pro_management .sort-area:hover{
+		color: inherit !important;
+	}
 </style>
 <div class="user_right fr">
 	<!--货品管理-->
@@ -471,8 +475,10 @@
 						<th width="80">
 							<div>
 								ERP空闲库存
-								<i class=" fa fa-long-arrow-up" ng-click="sortByERPReserve('ASC')" ng-class="{'active': sortByERP == 'ASC'}"></i>
-								<i class=" fa fa-long-arrow-down" ng-click="sortByERPReserve('DESC')" ng-class="{'active': sortByERP == 'DESC'}"></i>
+								<a class="sort-area" href="javascript:void(0)" ng-click="sortByERPReserve()">
+									<i class=" fa fa-long-arrow-up" ng-class="{'active': sortByERP == 'ASC'}"></i>
+									<i class=" fa fa-long-arrow-down" ng-class="{'active': sortByERP == 'DESC'}"></i>
+								</a>
 							</div>
 						</th>
 						<th width="160">产品编号</th>