Browse Source

新增合作伙伴无数据时页面显示的处理

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@8237 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 years ago
parent
commit
24bab42019

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

@@ -13289,7 +13289,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 		});
 		});
 
 
 		// 搜索框回车
 		// 搜索框回车
-		$scope.onSearch = function() {
+		$scope.onSearch = function(keyword) {
+			$rootScope.enterpriseKeyword = keyword;
 			$scope.tableParams.page(1);
 			$scope.tableParams.page(1);
 			$scope.tableParams.reload();
 			$scope.tableParams.reload();
 		};
 		};

+ 8 - 12
src/main/webapp/resources/tpl/index/baseInfo/searchresult.html

@@ -270,17 +270,13 @@
 </div>
 </div>
 <div class="myReuest search-bg condition block">
 <div class="myReuest search-bg condition block">
 		<div class="row">
 		<div class="row">
-			<!--<div id="topSearch" style="float: left">
-				<span class="text-muted"><i class="fa fa-search fa-lg"></i> 搜索"{{tip}}",为您找到结果:</span>
-				企业{{tableParams.total()}}家
-			</div>-->
 			<div class="col-xs-6">
 			<div class="col-xs-6">
 				<div class="search">
 				<div class="search">
 					<div class="form-group form-group-sm has-feedback" dropdown auto-close="outsideClick" on-toggle="searchAdvance=open">
 					<div class="form-group form-group-sm has-feedback" dropdown auto-close="outsideClick" on-toggle="searchAdvance=open">
-						<input type="search" class="form-control input-sm" ng-model="keyword" ng-search="onSearch()" placeholder="输入企业名称、简称、管理员姓名进行搜索" />
+						<input type="search" class="form-control input-sm" ng-model="keyword" ng-search="onSearch(keyword)" placeholder="输入企业名称、简称、管理员姓名进行搜索" />
 						<div id="searchContainer" class="dropdown-menu">
 						<div id="searchContainer" class="dropdown-menu">
 						</div>
 						</div>
-						<a class="btn input-group-addon" ng-click="onSearch()">搜索</a>
+						<a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
 					</div>
 					</div>
 				</div>
 				</div>
 			</div>
 			</div>
@@ -292,19 +288,19 @@
 <table class="enterprise-table block" ng-table="tableParams">
 <table class="enterprise-table block" ng-table="tableParams">
 	<tbody ng-repeat="enterprise in $data" class="company-list">
 	<tbody ng-repeat="enterprise in $data" class="company-list">
 		<tr class="enterprise-hd" ng-dblclick="enterprise.$collapsed=!enterprise.$collapsed">
 		<tr class="enterprise-hd" ng-dblclick="enterprise.$collapsed=!enterprise.$collapsed">
-			<td colspan="4"><span ng-bind="::enterprise.name" class="text-center"></span>(<span ng-bind="::enterprise.shortName"></span>)<img src="resources/img/logo/youruanrenzheng.png" id="logo" ng-if="enterprise.status == 313"></td>
+			<td colspan="4"><span ng-bind="::enterprise.name" class="text-center"></span><span ng-if="::enterprise.shortName != null">({{::enterprise.shortName}})</span><img src="resources/img/logo/youruanrenzheng.png" id="logo" ng-if="enterprise.status == 313"></td>
 			<td width="200" class="grey01 text-center" ng-if="enterprise.status != 313">当前企业不是优软云用户</td>
 			<td width="200" class="grey01 text-center" ng-if="enterprise.status != 313">当前企业不是优软云用户</td>
 			<td width="200" class="grey01 text-center" ng-if="enterprise.status == 313">优软云用户</td>
 			<td width="200" class="grey01 text-center" ng-if="enterprise.status == 313">优软云用户</td>
 		</tr>
 		</tr>
 		<tr class="enterprise-bd" ng-if="!enterprise.$collapsed ">
 		<tr class="enterprise-bd" ng-if="!enterprise.$collapsed ">
 			<td class="product" colspan="4">
 			<td class="product" colspan="4">
 				<div class="">营业执照:<span ng-bind="::enterprise.businessCode" ></span></div>
 				<div class="">营业执照:<span ng-bind="::enterprise.businessCode" ></span></div>
-				<div class="">企业类型:<span class="text-muted" ng-bind="::enterprise.industry"></span></div>
-				<div class="">企业地址:<span class="text-muted" ng-bind="::enterprise.address"></span></div>
+				<div class="" ng-if="::enterprise.industry != null">企业类型:<span class="text-muted" ng-bind="::enterprise.industry"></span></div>
+				<div class="" ng-if="::enterprise.address != null">企业地址:<span class="text-muted" ng-bind="::enterprise.address"></span></div>
 				<div class="">
 				<div class="">
-					管理员:<span ng-bind="::enterprise.adminName"></span>
-					电话:<span ng-bind="::enterprise.adminTel"></span>
-					邮箱:<span ng-bind="::enterprise.adminEmail"></span>
+					<span  ng-if="::enterprise.adminName != null">管理员:{{::enterprise.adminName}}</span>
+					<span ng-if="::enterprise.adminTel != null">电话:{{::enterprise.adminTel}}</span>
+					<span ng-if="::enterprise.adminEmail != null">邮箱:{{::enterprise.adminEmail}}</span>
 				</div>
 				</div>
 			</td>
 			</td>
 			<td width="100" class="text-center">
 			<td width="100" class="text-center">