Browse Source

产品管理人员搜索

yangc 7 years ago
parent
commit
3be39a6d36

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

@@ -1268,6 +1268,9 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 		$scope.prodName = '';
 		$scope.showSimilarUser = false;
 		$scope.similarUser = [];
+		$scope.similarUserObj = {
+			isInSimilarUser: false
+		};
 		$scope.onUserUUChange = function (prodName) {
             Enterprise.findUserByUserNameLikeAndEnUU({page: 1, count: 8, userName: prodName, enuu: $rootScope.userInfo.enterprise.uu }, function (page) {
                 if (page.content && page.content.length) {
@@ -1279,6 +1282,11 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 				}
             })
         }
+        $scope.onUserUUBlur = function () {
+			if (!$scope.similarUserObj.isInSimilarUser) {
+				$scope.showSimilarUser = false;
+			}
+		};
         $scope.setProdName = function (item) {
 			$scope.prodName = item.userName;
 			$scope.param.userUU = item.userUU;

+ 3 - 3
src/main/webapp/resources/view/vendor/forstore/vendor_material.html

@@ -1649,9 +1649,9 @@
 		<div ng-if="standard_tab == 'unstandard' || standard_tab =='standard'">
 			<div class="search-check">
 				<div class="search fl">
-					<label>人员选择:</label>
-					<input type="text" class="form-control prod-name" ng-model="prodName" ng-change="onUserUUChange(prodName)" placeholder="UU号/姓名"/>
-					<ul ng-if="showSimilarUser" class="prodUserList">
+					<label>人员选择:{{isInSimilarUser}}</label>
+					<input type="text" class="form-control prod-name" ng-model="prodName" ng-change="onUserUUChange(prodName)" ng-blur="onUserUUBlur()" placeholder="UU号/姓名"/>
+					<ul ng-if="showSimilarUser" class="prodUserList" ng-mouseenter="similarUserObj.isInSimilarUser = true" ng-mouseleave="similarUserObj.isInSimilarUser = false">
 						<li ng-repeat="item in similarUser.content" ng-click="setProdName(item)">
 							{{item.userName}}({{item.userUU}})
 						</li>