瀏覽代碼

Merge branch 'dev-mysql' of ssh://10.10.100.21/source/platform-b2c into dev-mysql

zhaohongpeng 7 年之前
父節點
當前提交
adf393f8fb

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

@@ -177,6 +177,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;
@@ -470,4 +475,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

@@ -4658,6 +4658,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;

+ 70 - 0
src/main/webapp/resources/data/profession.json

@@ -0,0 +1,70 @@
+{"IT|通信|电子|互联网":[
+  "互联网/电子商务",
+  "计算机软件",
+  "IT服务(系统/数据/维护)",
+  "电子技术/半导体/集成电路",
+  "计算机硬件",
+  "通信/电信/网络设备",
+  "通信/电信运营、增值服务",
+  "网络游戏"],
+  "金融业":[
+    "基金/证券/期货/投资",
+    "保险",
+    "银行",
+    "信托/担保/拍卖/典当"],
+  "房地产|建筑业":{
+      "房地产/建筑/建材/工程": [
+        "房地产金融服务类",
+        "房地产工程施工类",
+        "房地产工程货物类"
+      ],
+      "家居/室内设计/装饰装潢": "家居/室内设计/装饰装潢",
+      "物业管理/商业中心": "物业管理/商业中心"
+  },
+  "商业服务":[
+    "专业服务/咨询(财会/法律/人力资源等)",
+    "广告/会展/公关",
+    "中介服务",
+    "检验/认证",
+    "外包服务"],
+  "贸易|批发|零售|租赁业":[
+    "快速消费品(食品/饮料/烟酒/日化)",
+    "耐用消费品(服饰/纺织/皮革/家具/家电)",
+    "贸易/进出口",
+    "零售/批发",
+    "租赁服务"],
+  "文体教育|工艺美术":[
+    "教育/培训/院校",
+    "礼品/玩具/工艺美术/收藏品/奢侈品"],
+  "生产|加工|制造":[
+    "汽车/摩托车",
+    "大型设备/机电设备/重工业",
+    "加工制造(原料加工/模具)",
+    "仪器仪表及工业自动化",
+    "印刷/包装/造纸",
+    "办公用品及设备",
+    "医药/生物工程",
+    "医疗设备/器械",
+    "航空/航天研究与制造"],
+  "交通|运输|物流|仓储":[
+    "交通/运输",
+    "物流/仓储"],
+  "服务业":[
+    "医疗/护理/美容/保健/卫生服务",
+    "酒店/餐饮",
+    "旅游/度假"],
+  "文化|传媒|娱乐|体育":[
+    "媒体/出版/影视/文化传播",
+    "娱乐/体育/休闲"],
+  "能源|矿产|环保":[
+    "能源/矿产/采掘/冶炼",
+    "石油/石化/化工",
+    "电气/电力/水利",
+    "环保"],
+  "政府|非盈利机构":[
+    "政府/公共事业/非盈利机构",
+    "学术/科研"],
+  "农|林|牧|渔|其他":[
+    "农/林/牧/渔",
+    "跨领域经营",
+    "其他"]}

二進制
src/main/webapp/resources/img/all/dot.png


+ 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 = "暂无信息";
                   }

+ 81 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -121,6 +121,7 @@ define(['app/app'], function(app) {
 			// 获取企业信息
 			Enterprise.getEnterpriseInfo({enuu : $scope.userInfo.enterprise.uu}, function(data) {
 				$scope.enterpriseInfo = data;
+                $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){
@@ -129,7 +130,7 @@ define(['app/app'], function(app) {
 				}, function(){
 					toaster.pop('error', '获取管理员信息失败');
 				});
-			},function(response) {
+			},function() {
 				toaster.pop('error', '获取企业信息失败');
 			});
 		}
@@ -351,10 +352,88 @@ define(['app/app'], function(app) {
             return flag;
           }
 
+          // 获取行业信息
+        $http.get('static/data/profession.json').success(function (data) {
+            $scope.list = data;
+        });
+
+        // 选择行业
+        $scope.profession = new Array();
+        $scope.showProfession = false;
+        $scope.selectProfession = function () {
+            $scope.professionArray = [];
+            $scope.active = [];
+            $scope.showProfession = !$scope.showProfession;
+            $scope.profession[0] = $scope.list;
+        };
+
+        $scope.isInList = false;
+        $scope.isInInput = false;
+        $scope.hideList = function () {
+            if (!$scope.isInList && !$scope.isInInput && $scope.showProfession) {
+                $scope.showProfession = false;
+            }
+        };
+
+        $scope.enterInput = function () {
+            $scope.isInInput = true;
+        };
+
+        $scope.leaveInput = function () {
+            $scope.isInInput = false;
+        };
+
+        $scope.enterList = function () {
+            $scope.isInList = true;
+        };
+
+        $scope.leaveList = function () {
+            $scope.isInList = false;
+        };
+
+        // 行业子菜单点击
+        $scope.onItemClick = function (key, index, value) {
+            $scope.active[index] = key;
+            if (angular.isString(value)){ // 值为字符串说明点击的是最后一级
+                $scope.enterpriseInfo.enIndustry = value;
+                $scope.showProfession = false;
+                return;
+            }
+            $scope.professionArray = [];
+            $scope.profession.splice(index+1);
+            if (angular.isArray(value)){ // 值为数组说明下一级是最后一级
+                $scope.professionArray = value;
+            } else if (angular.isObject(value)) {
+                $scope.profession[index+1] = value;
+            }
+        };
+
+        // 判断值是否为字符串
+        $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)) {
@@ -367,6 +446,7 @@ define(['app/app'], function(app) {
               toaster.pop('error', '请补充完信息后再次提交');
               return;
             }
+
             Enterprise.updateEnterpriseInfo(
                 {enuu: $scope.userInfo.enterprise.uu}, $scope.enterpriseInfo,
                 function () {

+ 61 - 1
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%;
@@ -184,6 +185,50 @@
 		display: block
 	}
 </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;">
@@ -218,13 +263,28 @@
 					<div class="fl">官网地址</div>
 					<div class="fr"><span ng-bind="enterpriseInfo.enUrl"></span></div>
 				</li>
+				<li>
+					<div class="fl">所属行业</div>
+					<div class="fr"><span ng-bind="enterpriseInfo.enIndustry || '暂无信息'"></span></div>
+				</li>
+				<li>
+					<div class="fl">经营范围</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>
 		<div class="rt_menu">
 			<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>

+ 188 - 3
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;
@@ -464,8 +464,116 @@
     display: block
   }
 </style>
+
+<style>
+  .count_basic .choose-body {
+    display: table;
+    width: 33.333333%;
+    margin-top: 10px;
+    padding: 10px;
+    table-layout: fixed;
+    border-collapse: separate;
+    border: 1px solid #ccc;
+    position: relative;
+    background: #fff;
+    z-index: 1000;
+    padding-right: 2px;
+    float:left;
+  }
+
+  .count_basic .choose-body>.choose-item {
+    display: table-cell;
+  }
+
+  .count_basic .choose-body>.choose-item>ul {
+    height: 200px;
+    overflow-x: hidden;
+    overflow-y: scroll;
+    width:100%;
+    margin:0;
+  }
+
+  .count_basic .choose-body>.choose-item>ul>li {
+    line-height: 30px;
+    position: relative;
+    margin:0;
+  }
+
+  .count_basic .choose-body>.choose-item>ul>li.active a {
+    color: #3c7cf5;
+    background: #e8f0ff;
+  }
+
+   .count_basic .choose-body>.choose-item>ul>li>a {
+      display: block;
+      color: #666666;
+      margin:0;
+       width:100%;
+       text-align:left;
+       overflow:hidden;
+       background: #fff;
+    }
+
+  .count_basic .choose-body>.choose-item .caret {
+    float: right;
+    margin-top: 14px;
+    margin-right: 8px;
+    border-left: 3px solid;
+    border-right: none;
+    border-top: 3px solid transparent;
+    border-bottom: 3px solid transparent;
+  }
+
+  .count_basic .area-bg{
+    background: url("static/img/all/dot.png") no-repeat 732px center;
+  }
+  .count_basic .area-list{
+    position: absolute;
+    top: 26px;
+    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">
+<div class="count user_right fr" ng-click="hideList()">
   <!--安全设置-->
   <div class="count_center">
     <div class="com_tab">
@@ -537,6 +645,83 @@
                 <div class="fr" ng-if="!updateState"><span
                     ng-bind="enterpriseInfo.enUrl || '暂无信息'"></span></div>
               </li>
+              <li>
+                <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.enIndustry" title="所属行业" ng-disabled=" !updateState"
+                             class="area-bg form-control input-xs" type="text"
+                             ng-click="selectProfession()">
+                      </input>
+                    </div>
+
+                    <div ng-show="showProfession" ng-mouseenter="enterList()" ng-mouseleave="leaveList()" class="area-list">
+                        <div class="choose-body">
+                          <div class="choose-item">
+                            <ul class="list-unstyled">
+                              <li ng-repeat="(key, value) in profession[0]" ng-class="{active: key == active[0]}">
+                                <a ng-click="onItemClick(key, 0, value)">{{key}}
+                                  <span class="caret" ></span>
+                                </a>
+                              </li>
+                            </ul>
+                          </div>
+                        </div>
+                        <div class="choose-body" ng-show="profession[1]">
+                          <div class="choose-item">
+                            <ul class="list-unstyled">
+                              <li ng-repeat="(key, value) in profession[1]" ng-class="{active: key == active[1]}">
+                                <a ng-click="onItemClick(key, 1, value)">{{key}}
+                                  <span ng-show="!isString(value)" class="caret" ></span>
+                                </a>
+                              </li>
+                            </ul>
+                          </div>
+                        </div>
+                        <div class="choose-body" ng-show="profession[2]" style="border-left:0;">
+                          <div class="choose-item">
+                            <ul class="list-unstyled">
+                              <li ng-repeat="(key, value) in profession[2]" ng-class="{active: key == active[2]}">
+                                <a ng-click="onItemClick(key, 2, value)">{{key}}
+                                  <span ng-show="!isString(value)" class="caret" ></span>
+                                </a>
+                              </li>
+                            </ul>
+                          </div>
+                        </div>
+                        <div class="choose-body" ng-show="professionArray.length > 0" style="border-left:0;">
+                          <div class="choose-item">
+                            <ul class="list-unstyled">
+                              <li ng-repeat="value in professionArray" ng-class="{active: false}">
+                                <a ng-click="onItemClick(null, -1, value)">{{value}}</a>
+                              </li>
+                            </ul>
+                          </div>
+                        </div>
+                    </div>
+                </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">
+                  <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>
+              </li>
             </ul>
             <!--<div class="deal-btn" ng-if="userInfo.sys">-->
             <!--<button type="button" class="edit btn btn-primary" ng-if=" !updateState"  ng-click="changeToUpdate(true)">修改</button>-->