|
|
@@ -44,6 +44,83 @@ define([ 'app/app' ], function(app) {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ $scope.newStoreMap = {};
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取新开原厂店铺
|
|
|
+ */
|
|
|
+ StoreInfo.findNewStore({ types : 'ORIGINAL_FACTORY' }, {}, function (page) {
|
|
|
+ if (page && page.content && page.content.length > 0) {
|
|
|
+ angular.forEach(page.content, function (store) {
|
|
|
+ $scope.newStoreMap[store.uuid] = true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, function (resp) {
|
|
|
+ });
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取新入驻经销代理店铺信息
|
|
|
+ */
|
|
|
+ StoreInfo.findNewStore({ types : 'AGENCY-DISTRIBUTION' }, {}, function (page) {
|
|
|
+ if (page && page.content && page.content.length > 0) {
|
|
|
+ angular.forEach(page.content, function (store) {
|
|
|
+ $scope.newStoreMap[store.uuid] = true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, function (resp) {
|
|
|
+ });
|
|
|
+
|
|
|
+ $scope.hotSalesMap = {};
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取原厂销售排行信息
|
|
|
+ */
|
|
|
+ StoreInfo.findTopStoreBySales({ isOriginal: true }, {}, function (stores) {
|
|
|
+ if (stores && stores.length > 0) {
|
|
|
+ angular.forEach(stores, function (store) {
|
|
|
+ $scope.hotSalesMap[store.uuid] = true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, function (resp) {
|
|
|
+ });
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取经销代理销售排行信息
|
|
|
+ */
|
|
|
+ StoreInfo.findTopStoreBySales({ isOriginal: false }, {}, function (stores) {
|
|
|
+ if (stores && stores.length > 0) {
|
|
|
+ angular.forEach(stores, function (store) {
|
|
|
+ $scope.hotSalesMap[store.uuid] = true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, function (resp) {
|
|
|
+ });
|
|
|
+
|
|
|
+ $scope.excellentSupplierMap = {};
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取原厂推荐信息
|
|
|
+ */
|
|
|
+ StoreInfo.fiveStoresByTypes({ num : 5, types : 'ORIGINAL_FACTORY' }, {}, function (data) {
|
|
|
+ if (data && data.length > 0) {
|
|
|
+ angular.forEach(data, function (store) {
|
|
|
+ $scope.excellentSupplierMap[store.uuid] = true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, function () {
|
|
|
+ });
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取经销代理优秀供应商信息
|
|
|
+ */
|
|
|
+ StoreCms.getStoreCmsByUseForAndCmsType({ num:5, types:'AGENCY-DISTRIBUTION' }, function (exStoreCms) {
|
|
|
+ if (exStoreCms && exStoreCms.length > 0) {
|
|
|
+ angular.forEach(exStoreCms, function (store) {
|
|
|
+ $scope.excellentSupplierMap[store.uuid] = true;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
/**
|
|
|
* 添加到店铺相关内容管理系统
|
|
|
*
|