|
|
@@ -28,32 +28,22 @@ define(['app/app', 'calendar'], function(app) {
|
|
|
}
|
|
|
//table设置
|
|
|
var applyToEnterpriseTableParams = function () {
|
|
|
- $scope.applyToEnterpriseTableParams = new ngTableParams({
|
|
|
+ var params = {
|
|
|
page : 1,
|
|
|
count : 5
|
|
|
- }, {
|
|
|
- total : 0,
|
|
|
- getData : function ($defer, params) {
|
|
|
- var param = BaseService.parseParams(params.url());
|
|
|
- param.page = param.page;
|
|
|
- param.size = param.count;
|
|
|
- param.spaceUU = $scope.userInfo.enterprise.uu;
|
|
|
- // 状态为申请中
|
|
|
- param.status = 311;
|
|
|
- Enterprise.findApplyToMall(param, {}, function (page) {
|
|
|
- console.log(page);
|
|
|
- $defer.resolve(page.content || []);
|
|
|
- params.total(page.totalElements);
|
|
|
- $scope.totalPages = page.totalPages;
|
|
|
- $scope.content = page.content;
|
|
|
- }, function (error) {
|
|
|
- console.log(error);
|
|
|
- $defer.resolve([]);
|
|
|
- params.total(0);
|
|
|
- $scope.totalPages = 0;
|
|
|
- toaster.pop('error', '数据获取失败,请重新刷新页面!');
|
|
|
- });
|
|
|
- }
|
|
|
+ };
|
|
|
+ var param = {};
|
|
|
+ param.page = params.page;
|
|
|
+ param.size = params.count;
|
|
|
+ param.spaceUU = $scope.userInfo.enterprise.uu;
|
|
|
+ // 状态为申请中
|
|
|
+ param.status = 311;
|
|
|
+ Enterprise.findApplyToMall(param, {}, function (page) {
|
|
|
+ $scope.totalPages = page.totalPages;
|
|
|
+ $scope.content = page.content;
|
|
|
+ }, function (error) {
|
|
|
+ $scope.totalPages = 0;
|
|
|
+ toaster.pop('error', '数据获取失败,请重新刷新页面!');
|
|
|
});
|
|
|
}
|
|
|
applyToEnterpriseTableParams();
|