|
|
@@ -23,11 +23,15 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
|
|
|
/**
|
|
|
* 企业信息记录
|
|
|
*/
|
|
|
- module.controller('EnterpriseInfoCtrl', ['$scope', 'StoreInfo', 'toaster', 'ConsignmentAgreementRecord', 'ngTableParams', 'BaseService', function ($scope, StoreInfo, toaster, ConsignmentAgreementRecord, ngTableParams, BaseService) {
|
|
|
+ module.controller('EnterpriseInfoCtrl', ['$scope', 'StoreInfo', 'toaster', 'ConsignmentAgreementRecord', 'StoreAdsInformation', 'ngTableParams', 'BaseService', function ($scope, StoreInfo, toaster, ConsignmentAgreementRecord, StoreAdsInformation, ngTableParams, BaseService) {
|
|
|
console.log('EnterpriseInfoCtrl');
|
|
|
|
|
|
$scope.showRecords = true;
|
|
|
|
|
|
+ $scope.tagStoreWithTag = tagStoreWithTag;
|
|
|
+
|
|
|
+ $scope.showImg = showImg;
|
|
|
+
|
|
|
active();
|
|
|
|
|
|
/**
|
|
|
@@ -43,6 +47,12 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
|
|
|
return qualification.type === 'APTITUDE' && qualification.resourceUrl && qualification.resourceUrl !== '';
|
|
|
});
|
|
|
}
|
|
|
+ // 设置店铺推荐标签
|
|
|
+ var tags = JSON.parse($scope.store.tags || '[]');
|
|
|
+ $scope.store.tagsObject = {};
|
|
|
+ for (var i = 0; i < tags.length; i++) {
|
|
|
+ $scope.store.tagsObject[tags[i]] = true;
|
|
|
+ }
|
|
|
console.log($scope.store);
|
|
|
loadRecords($scope.store.enUU);
|
|
|
} else {
|
|
|
@@ -92,6 +102,48 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 为店铺打标签
|
|
|
+ */
|
|
|
+ function tagStoreWithTag(store, tag) {
|
|
|
+ if ($scope.store.tagsObject[tag]) {
|
|
|
+ StoreAdsInformation.cancelStoreTagsWhenAdminCancel({type: tag}, store, function (store) {
|
|
|
+ toaster.pop('success', '操作成功');
|
|
|
+ $scope.tags = store.tags;
|
|
|
+ $scope.store.tagsObject[tag] = false;
|
|
|
+ }, function (error) {
|
|
|
+ toaster.pop('warning', '操作失败,请重试');
|
|
|
+ window.location.reload();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ StoreAdsInformation.tagStoreInWhenAdminRecommend({type: tag}, store, function (store) {
|
|
|
+ toaster.pop('success', '操作成功');
|
|
|
+ $scope.tags = store.tags;
|
|
|
+ $scope.store.tagsObject[tag] = true;
|
|
|
+ }, function (error) {
|
|
|
+ toaster.pop('warning', '操作失败,请重试');
|
|
|
+ window.location.reload();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查看大图
|
|
|
+ *
|
|
|
+ * @param imgUrl 图片链接
|
|
|
+ */
|
|
|
+ function showImg(imgUrl) {
|
|
|
+ var src = imgUrl, box = $('#image-box'), modal = $('.modal-content');
|
|
|
+ box.show();
|
|
|
+ box.find('img').attr('src', src);
|
|
|
+ box.find('a').click(function(){
|
|
|
+ box.hide();
|
|
|
+ });
|
|
|
+ box.dblclick(function(){
|
|
|
+ box.hide();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
@@ -111,6 +163,8 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
|
|
|
$scope.onUploadDisposeInfo = onUploadDisposeInfo;
|
|
|
$scope.deleteDisposeInfo = deleteDisposeInfo;
|
|
|
|
|
|
+ $scope.showImg = showImg;
|
|
|
+
|
|
|
active();
|
|
|
|
|
|
/**
|
|
|
@@ -180,7 +234,7 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
- // TODO huxz 处置店铺违规处置上传证明
|
|
|
+ // 处置店铺违规处置上传证明
|
|
|
if ($scope.disposeProof && $scope.disposeProof.length > 0) {
|
|
|
$scope.violations.disposeProof = $scope.disposeProof.filter(function (proof) {
|
|
|
return proof.url && proof.url !== '';
|
|
|
@@ -203,6 +257,23 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查看大图
|
|
|
+ *
|
|
|
+ * @param imgUrl 图片链接
|
|
|
+ */
|
|
|
+ function showImg(imgUrl) {
|
|
|
+ var src = imgUrl, box = $('#image-box'), modal = $('.modal-content');
|
|
|
+ box.show();
|
|
|
+ box.find('img').attr('src', src);
|
|
|
+ box.find('a').click(function(){
|
|
|
+ box.hide();
|
|
|
+ });
|
|
|
+ box.dblclick(function(){
|
|
|
+ box.hide();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
@@ -323,6 +394,8 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
|
|
|
$scope.wantRestoreStore = wantRestoreStore;
|
|
|
$scope.confirmRestoreStore = confirmRestoreStore;
|
|
|
|
|
|
+ $scope.showImg = showImg;
|
|
|
+
|
|
|
/**
|
|
|
* 设置审核信息
|
|
|
*/
|
|
|
@@ -404,6 +477,23 @@ define([ 'ngResource', 'common/query/storeViolations', 'ngTable', 'ngSanitize',
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查看大图
|
|
|
+ *
|
|
|
+ * @param imgUrl 图片链接
|
|
|
+ */
|
|
|
+ function showImg(imgUrl) {
|
|
|
+ var src = imgUrl, box = $('#image-box'), modal = $('.modal-content');
|
|
|
+ box.show();
|
|
|
+ box.find('img').attr('src', src);
|
|
|
+ box.find('a').click(function(){
|
|
|
+ box.hide();
|
|
|
+ });
|
|
|
+ box.dblclick(function(){
|
|
|
+ box.hide();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
}]);
|
|
|
|
|
|
});
|