Browse Source

标签添加不大于10个字符,不能为空
还原企业信息如果初始状态为空的话则改成空串

wangmh 8 years ago
parent
commit
876ff90617

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

@@ -9872,7 +9872,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         // 添加经营范围标签
         $scope.addTag = function () {
             if ($scope.tags.indexOf($scope.tag) == -1){
-                $scope.tags.push($scope.tag);
+                if (null != $scope.tag && '' != $scope.tag) {
+                    $scope.tags.push($scope.tag);
+                }
             }
             $scope.tag = '';
         }

+ 10 - 9
src/main/webapp/resources/tpl/index/approvalFlow/enterprise.html

@@ -451,14 +451,14 @@
 				<div class="col-xs-12">
 					<div class="com-text col-xs-6">
 						<span class="title">联系人:</span>
-						<div ng-show="!connectionEditing" class="content" ng-bind="::(enterprise.contactMan == null ? '':enterprise.contactMan)"></div>
+						<div ng-show="!connectionEditing" class="content" ng-bind="::enterprise.contactMan"></div>
 						<div class="content" ng-show="connectionEditing">
 							<input  ng-model="enterprise.contactMan" type="text" class="form-control input-xs" placeholder="联系人" />
 						</div>
 					</div>
 					<div class="com-text col-xs-6">
 						<span class="title">联系电话:</span>
-						<div ng-show="!connectionEditing" class="content" ng-bind="::(enterprise.contactTel == null ? '':enterprise.contactTel)"></div>
+						<div ng-show="!connectionEditing" class="content" ng-bind="::enterprise.contactTel"></div>
 						<div class="content" ng-show="connectionEditing">
 							<input required="required" ng-model="enterprise.contactTel" type="text" class="form-control input-xs" placeholder="企业电话" />
 						</div>
@@ -467,14 +467,14 @@
 				<div class="col-xs-12">
 					<div class="com-text col-xs-6">
 						<span class="title">邮箱:</span>
-						<div ng-show="!connectionEditing" class="content" ng-bind="::(enterprise.contactEmail == null ? '':enterprise.contactEmail)"></div>
+						<div ng-show="!connectionEditing" class="content" ng-bind="::enterprise.contactEmail"></div>
 						<div class="content" ng-show="connectionEditing">
 							<input required="required" ng-model="enterprise.contactEmail" type="text" class="form-control input-xs" placeholder="邮箱" />
 						</div>
 					</div>
 					<div class="com-text col-xs-6">
 						<span class="title">传真:</span>
-						<div ng-show="!connectionEditing" class="content" ng-bind="::(enterprise.enFax == null ? '':enterprise.enFax)"></div>
+						<div ng-show="!connectionEditing" class="content" ng-bind="::enterprise.enFax"></div>
 						<div class="content" ng-show="connectionEditing">
 							<div class="input-group input-group-xs" style="width: 320px;">
 								<input required="required" ng-model="enterprise.enFax" type="text" class="form-control input-xs" placeholder="企业传真信息">
@@ -485,8 +485,8 @@
 				<div class="col-xs-12">
 					<div class="com-text col-xs-6">
 						<span class="title">官网:</span>
-						<a ng-show="!connectionEditing" class="content" ng-bind="::(enterprise.enUrl == null ? '':enterprise.enUrl)"
-                           href="http://{{::(enterprise.enUrl == null ? '':enterprise.enUrl)}}"
+						<a ng-show="!connectionEditing" class="content" ng-bind="::enterprise.enUrl"
+                           href="http://{{::enterprise.enUrl}}"
 						   target="_blank">
 						</a>
 						<div class="content" ng-show="connectionEditing">
@@ -533,7 +533,7 @@
 				<div class="col-xs-12">
 					<div class="com-text col-xs-6">
 						<span class="title">行业:</span>
-						<div ng-show="!connectionEditing" class="content" ng-bind="::(enterprise.profession == null ? '':enterprise.profession)">
+						<div ng-show="!connectionEditing" class="content" ng-bind="::enterprise.profession">
 							<!--{{enterprise.enIndustry=='make'?'制造型':'贸易型'}}-->
 						</div>
 						<div class="content" ng-show="connectionEditing">
@@ -594,14 +594,15 @@
 				<div class="col-xs-12" style="height: auto">
 					<div class="com-text col-xs-12" style="height: auto">
 						<span class="title">经营范围:</span>
-						<div class="content enterprise-area" style="height: auto" ng-model="::(enterprise.tags == null ? '':enterprise.tags)">
+						<div class="content enterprise-area" style="height: auto" ng-model="::enterprise.tags">
+                            <span ng-if="tags.length == 0" style="background: #5078cb; color: #ffffff">暂无标签</span>
 							<span ng-repeat="tag in tags track by $index">{{tag}}
 								<i class="fa fa-times-circle" ng-show="connectionEditing" ng-click="removeTag(tag)"></i>
 							</span>
 						</div>
 					</div>
 					<div class="com-text col-xs-12 add-tag" ng-show="connectionEditing">
-						<input type="text" ng-model="tag" class="form-control" />
+						<input type="text" ng-model="tag" class="form-control" maxlength="10" placeholder="不大于10个字符"/>
 						<a ng-click="addTag()">+添加标签</a>
 					</div>
 				</div>