|
|
@@ -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 () {
|