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

产品管理-erp空闲库存排序

yangc 8 лет назад
Родитель
Сommit
f93ccf3817

+ 7 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -18,6 +18,13 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
             type : "standard"
             type : "standard"
         };
         };
 
 
+        $scope.sortByERP = 'none';
+        $scope.sortByERPReserve = function (type) {
+			$scope.param.sorting = {'productDetail.reserve': type};
+			$scope.sortByERP = type == $scope.sortByERP ? 'none' : type;
+			loadData();
+		}
+
 		if ($location.$$path.endsWith('vendor_material_unstandard_erp')) {
 		if ($location.$$path.endsWith('vendor_material_unstandard_erp')) {
 			$scope.tab = 'unstandard_material';
 			$scope.tab = 'unstandard_material';
 			// $scope.standard_tab = 'unstandard';
 			// $scope.standard_tab = 'unstandard';

+ 10 - 1
src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_erp.html

@@ -96,6 +96,9 @@
 		font-size: 14px;
 		font-size: 14px;
 		vertical-align: middle !important;
 		vertical-align: middle !important;
 	}
 	}
+	.public-tab.table tr th >div i.active {
+		color: #5078cb;
+	}
 	.public-tab.table>tbody+tbody{
 	.public-tab.table>tbody+tbody{
 		border-top: none;
 		border-top: none;
 	}
 	}
@@ -465,7 +468,13 @@
 					<thead>
 					<thead>
 					<tr>
 					<tr>
 						<th width="80">序号</th>
 						<th width="80">序号</th>
-						<th width="80">ERP空闲库存</th>
+						<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>
+							</div>
+						</th>
 						<th width="160">产品编号</th>
 						<th width="160">产品编号</th>
 						<th width="180">产品名称(类目)</th>
 						<th width="180">产品名称(类目)</th>
 						<th width="130">品牌</th>
 						<th width="130">品牌</th>