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

修改账户管理企业信息增加行业和经营范围字段

Administrator 7 лет назад
Родитель
Сommit
a69ec92f0f

+ 13 - 0
src/main/java/com/uas/platform/b2c/common/account/model/Enterprise.java

@@ -162,6 +162,11 @@ public class Enterprise implements Serializable {
 	@Column(name = "en_validcode")
 	private Short enValidCode;
 
+	/**
+	 * 企业经营范围;
+	 */
+	@Column(name = "en_Businessscope",columnDefinition = "TEXT")
+	private String enBusinessScope;
 
 	@Transient
 	private Integer receiptStatus;
@@ -431,4 +436,12 @@ public class Enterprise implements Serializable {
 		return this.enMallVendorStatus != null && Status.ENABLED.value() == this.enMallVendorStatus;
 	}
 
+
+	public String getEnBusinessScope() {
+		return enBusinessScope;
+	}
+
+	public void setEnBusinessScope(String enBusinessScope) {
+		this.enBusinessScope = enBusinessScope;
+	}
 }

+ 1 - 1
src/main/java/com/uas/platform/b2c/external/erp/product/service/impl/KindServiceImpl.java

@@ -109,7 +109,7 @@ public class KindServiceImpl implements KindService {
         return kindPropertyUas;
     }
 
-    @Override
+     @Override
     public Map<String, List<KindUas>> getParentsByKindCode(String kindCode) {
         Map<Long, Kind> maps = new HashMap<>();
         // 第一步是模糊查询所有的叶子节点

+ 2 - 0
src/main/webapp/resources/css/vendor/sell.css

@@ -4597,6 +4597,8 @@ body {
     position: relative;
     width: 100%;
     display: inline-block;
+    word-break: break-all;
+    word-wrap: break-word;
 }
 .count_basic ul li div.fr span i {
     float: left;

+ 1 - 0
src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js

@@ -37,6 +37,7 @@ define(['app/app'], function (app) {
             Enterprise.getEnterpriseInfo({enuu: $scope.userInfo.enterprise.uu},
                 function (data) {
                   $scope.enterpriseInfo = data;
+                  $scope.enBusinessScope = $scope.enterpriseInfo.enBusinessScope ? $scope.enterpriseInfo.enBusinessScope.split(',') : [];
                   if (!$scope.enterpriseInfo.enAddress) {
                     $scope.enterpriseInfo.enAddress = "暂无信息";
                   }

+ 21 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -98,7 +98,7 @@ define(['app/app'], function(app) {
 			// 获取企业信息
 			Enterprise.getEnterpriseInfo({enuu : $scope.userInfo.enterprise.uu}, function(data) {
 				$scope.enterpriseInfo = data;
-				console.log(data, '2323')
+                $scope.enBusinessScope = $scope.enterpriseInfo.enBusinessScope ? angular.copy($scope.enterpriseInfo.enBusinessScope).split(',') : [];
 				$scope.enterpriseInfoBackup = angular.copy($scope.enterpriseInfo);
 				$scope.enAdminuu = $scope.enterpriseInfo.enAdminuu;
 				User.getUserByUU({uu: $scope.enAdminuu}, {}, function(data){
@@ -372,7 +372,7 @@ define(['app/app'], function(app) {
         $scope.onItemClick = function (key, index, value) {
             $scope.active[index] = key;
             if (angular.isString(value)){ // 值为字符串说明点击的是最后一级
-                $scope.enterpriseInfo.profession = value;
+                $scope.enterpriseInfo.enIndustry = value;
                 $scope.showProfession = false;
                 return;
             }
@@ -389,10 +389,28 @@ define(['app/app'], function(app) {
         $scope.isString = function (value) {
             return angular.isString(value);
         };
+
+        // 增加经营范围内容标签
+        $scope._scope = $scope
+        $scope.addBusinessScope = function () {
+            if(!$scope.businessScope) return false;
+            if($scope.enBusinessScope.length > 20) {
+                toaster.pop('error', '经营范围内容标签不能超过20个!');
+                return false;
+            }
+            $scope.enBusinessScope.push($scope.businessScope);
+            $scope.businessScope = '';
+        }
+
+        // 删除选择的内容标签
+        $scope.clearBusinessScope = function (key) {
+            $scope.enBusinessScope.splice(key, 1);
+        }
           /**
            * 保存企业信息
            */
           $scope.saveUpdate = function () {
+              $scope.enterpriseInfo.enBusinessScope = $scope.enBusinessScope.join(',');
             // 先检查信息是否为空
             if (angular.equals($scope.enterpriseInfo,
                     $scope.enterpriseInfoBackup)) {
@@ -405,6 +423,7 @@ define(['app/app'], function(app) {
               toaster.pop('error', '请补充完信息后再次提交');
               return;
             }
+
             Enterprise.updateEnterpriseInfo(
                 {enuu: $scope.userInfo.enterprise.uu}, $scope.enterpriseInfo,
                 function () {

+ 55 - 3
src/main/webapp/resources/view/usercenter/forstore/account_manager.html

@@ -35,6 +35,7 @@
 	.count01 .count-content{
 		width: 100%;
 		background: #fff;
+		padding-bottom:70px;
 	}
 	.count01 .count-content ul{
 		width: 94%;
@@ -161,6 +162,50 @@
 		margin-right:5px;
 	}
 </style>
+
+<style>
+	.count01 .business_scope{
+		padding-bottom:10px;
+	}
+	.count01 .business_scope ul{
+		width:100%;
+		margin:0;
+		margin-left:-10px;
+		line-height: 35px;
+		padding-top: 18px;
+	}
+	.count01 .business_scope ul li{
+		position:relative;
+		width:auto;
+		height:auto;
+		padding:0 10px;
+		margin:0 10px;
+		float:none;
+		background: #5078cb;
+		border-radius:5px;
+		text-align: center;
+		line-height: 25px;
+	}
+	.count01 .business_scope ul li span{
+		color:#fff;
+		margin:0;
+	}
+	.count01 .business_scope ul li i{
+		position:absolute;
+		right:-10px;
+		top:-10px;
+		cursor:pointer;
+		display:inline-block;
+		width:20px;
+		height:20px;
+		line-height: 20px;
+		font-size: 16px;
+		text-align: center;
+		color:red;
+		border-radius:50%;
+		background: #eee;
+	}
+</style>
 <!--右侧主体部分-->
 <div class="user_right fr" id="account_manager">
 	<div class="oder01" style="margin-bottom: 16px;">
@@ -197,11 +242,18 @@
 				</li>
 				<li>
 					<div class="fl">所属行业</div>
-					<div class="fr"><span ng-bind="enterpriseInfo.enUrl"></span></div>
+					<div class="fr"><span ng-bind="enterpriseInfo.enIndustry || '暂无信息'"></span></div>
 				</li>
 				<li>
 					<div class="fl">经营范围</div>
-					<div class="fr"><span ng-bind="enterpriseInfo.enUrl"></span></div>
+					<div class="fr">
+						<div class="business_scope">
+							<ul class="list-inline">
+								<li ng-repeat="value in enBusinessScope track by $index"><span ng-bind="value"></span></li>
+								<li ng-if="enBusinessScope.length === 0"><span>无标签信息</span></li>
+							</ul>
+						</div>
+					</div>
 				</li>
 			</ul>
 		</div>
@@ -209,7 +261,7 @@
 			<span>您的个人信息</span>
 			<span class="fr" >
 				<!--<button ng-if=" !updateState"  ng-click="changeToUpdate(true)">修改</button>-->
-				<button ng-if=" updateState"  ng-click="saveUpdate()">保存</button>
+				<button ng-if="updateState"  ng-click="saveUpdate()">保存</button>
 				<button ng-if="updateState" ng-click="changeToUpdate(false)" style="color: #f00">取消</button>
 			</span>
 		</div>

+ 58 - 11
src/main/webapp/resources/view/vendor/forstore/vendor_account_management.html

@@ -72,10 +72,10 @@
   .row-operator2 > .operator-menu3 {
     position: absolute;
     width: 125px;
-    height: 60;
+    height: 60px;
     line-height: 30px;
     padding: 0 10px;
-    top: 30;
+    top: 30px;
     background-color: #333;
     border-radius: 0 3px 3px 0;
     opacity: 0;
@@ -510,6 +510,44 @@
     left: 15px;
     width: 756px;
   }
+
+  .count_basic .business_scope{
+    padding-bottom:10px;
+  }
+  .count_basic .business_scope ul{
+    width:100%;
+    margin:0;
+    margin-left:-10px;
+  }
+  .count_basic .business_scope ul li{
+    position:relative;
+    width:auto;
+    padding:0 10px;
+    margin:0 10px;
+    float:none;
+    background: #5078cb;
+    border-radius:5px;
+    text-align: center;
+    line-height: 25px;
+  }
+  .count_basic .business_scope ul li span{
+    color:#fff;
+  }
+  .count_basic .business_scope ul li i{
+    position:absolute;
+    right:-10px;
+    top:-10px;
+    cursor:pointer;
+    display:inline-block;
+    width:20px;
+    height:20px;
+    line-height: 20px;
+    font-size: 16px;
+    text-align: center;
+    color:red;
+    border-radius:50%;
+    background: #eee;
+  }
 </style>
 <!--右侧主体部分-->
 <div class="count user_right fr" ng-click="hideList()">
@@ -597,7 +635,7 @@
                 <div class="fl">所属行业</div>
                 <div class="col-sm-10" ng-if="updateState">
                     <div class="content" ng-mouseenter="enterInput()"  ng-mouseleave="leaveInput()">
-                      <input ng-model="enterpriseInfo.profession" title="所属行业" ng-disabled=" !updateState"
+                      <input ng-model="enterpriseInfo.enIndustry" title="所属行业" ng-disabled=" !updateState"
                              class="area-bg form-control input-xs" type="text"
                              ng-click="selectProfession()">
                       </input>
@@ -648,18 +686,27 @@
                         </div>
                     </div>
                 </div>
-                <div class="fr" ng-if="!updateState"><span ng-bind="enterpriseInfo.enUrl || '暂无信息'"></span></div>
+                <div class="fr" ng-if="!updateState"><span ng-bind="enterpriseInfo.enIndustry || '暂无信息'"></span></div>
               </li>
               <li>
                 <div class="fl">经营范围</div>
-                <div class="col-sm-10" ng-if="updateState">
-                  <textarea class="form-control" rows="5"
-                            title="经营范围"
-                            ng-disabled=" !updateState"
-                            ng-model="enterpriseInfo.enUrl"></textarea>
+                <div class="col-sm-10">
+                  <div class="business_scope">
+                    <ul class="list-inline">
+                      <li ng-repeat="(key, value) in enBusinessScope track by $index"><span>{{value}}</span><i ng-if="updateState" class="fa fa-close" ng-click="clearBusinessScope(key)"></i></li>
+                      <li ng-if="enBusinessScope.length === 0"><span>无标签信息</span></li>
+                    </ul>
+                  </div>
+                  <div class="input-group" style="width:50%;" ng-if="updateState">
+                    <input class="form-control"
+                           ng-model="_scope.businessScope"
+                           maxlength="10"
+                           placeholder="请输入不大于10个字符" type="text"/>
+                    <div class="input-group-addon" ng-click="addBusinessScope(businessScope)">
+                      <span>添加标签</span>
+                    </div>
+                  </div>
                 </div>
-                <div class="fr" ng-if="!updateState"><span
-                        ng-bind="enterpriseInfo.enUrl || '暂无信息'"></span></div>
               </li>
             </ul>
             <!--<div class="deal-btn" ng-if="userInfo.sys">-->