SharingRewardsController.js
5.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
"use strict";
var sharingRewardsController = angular.module('sharingRewardsController',[]);
/**
* 分享奖励订单
*/
sharingRewardsController.controller('shareRewardOrderController', [
'$rootScope',
'$scope',
'SharingRewardsService',
function($rootScope, $scope, SharingRewardsService) {
$scope.currentPage = 1;
$scope.numPages = 1;
$scope.pageSize = 20;
$scope.totalRecord = 0;
$scope.shareOrders=[];
$scope.shareOrderQuery={
shareUserPhone:'',
orderCode:'',
startOrderDt:'',
endOrderDt:'',
startReceiveDt:'',
endReceiveDt:'',
pageNow:1,
pageSize:20
};
SharingRewardsService.shareRewardOrderPager($scope.shareOrderQuery);
$scope.$on('shareOrder.list', function() {
$scope.shareOrders = SharingRewardsService.shareOrders.datas;
$scope.numPages = SharingRewardsService.shareOrders.totalPage;
$scope.totalRecord = SharingRewardsService.shareOrders.totalRecord;
});
$scope.onSelectPage = function(page) {
$scope.shareOrderQuery.pageNow=page;
SharingRewardsService.shareRewardOrderPager($scope.shareOrderQuery);
};
$scope.searchShareOrder=function() {
$scope.shareOrderQuery.pageNow = 1;
$scope.shareOrderQuery.startOrderDt = $('#startOrderDt').val();
$scope.shareOrderQuery.endOrderDt = $('#endOrderDt').val();
$scope.shareOrderQuery.startReceiveDt = $('#startReceiveDt').val();
$scope.shareOrderQuery.endReceiveDt = $('#endReceiveDt').val();
SharingRewardsService.shareRewardOrderPager($scope.shareOrderQuery);
};
}]
);
/**
* 提现记录
*/
sharingRewardsController.controller('presentRecordListController', [
'$rootScope',
'$scope',
'SharingRewardsService',
function($rootScope, $scope, SharingRewardsService) {
$scope.currentPage = 1;
$scope.numPages = 1;
$scope.pageSize = 20;
$scope.totalRecord = 0;
$scope.withdrawRecordList=[];
$scope.withDrawRecordQuery={
phone:'',
nickName:'',
idCard:'',
startDt:'',
endDt:'',
pageNow:1,
pageSize:20
};
SharingRewardsService.withDrawRecordPager($scope.withDrawRecordQuery);
$scope.$on('withdraw.list', function() {
$scope.withdrawRecordList = SharingRewardsService.withDrawList.datas;
$scope.numPages = SharingRewardsService.withDrawList.totalPage;
$scope.totalRecord = SharingRewardsService.withDrawList.totalRecord;
});
$scope.onSelectPage = function(page) {
$scope.withDrawRecordQuery.pageNow=page;
SharingRewardsService.withDrawRecordPager($scope.withDrawRecordQuery);
};
$scope.search=function() {
$scope.withDrawRecordQuery.pageNow = 1;
$scope.withDrawRecordQuery.startDt = $('#startDt').val();
$scope.withDrawRecordQuery.endDt = $('#endDt').val();
SharingRewardsService.withDrawRecordPager($scope.withDrawRecordQuery);
};
}]
);
/**
* 分享奖励报表统计
*/
sharingRewardsController.controller('sharingRewardStatementStatisticsController', [
'$rootScope',
'$scope',
'SharingRewardsService',
function($rootScope, $scope, SharingRewardsService) {
$scope.withDraws = [];
SharingRewardsService.selectTotalWithDrawalsAmount();
$scope.$on('withDraw.list', function() {
$scope.withDraws = SharingRewardsService.withDraws;
});
}]
);
/**
* 分享奖励排名
*/
sharingRewardsController.controller('sharingRewardRankingsController', [
'$rootScope',
'$scope',
'SharingRewardsService',
function($rootScope, $scope, SharingRewardsService) {
$scope.currentPage = 1;
$scope.numPages = 1;
$scope.pageSize = 20;
$scope.totalRecord = 0;
$scope.shareWithDrawRecords=[];
$scope.sharingRewardRankingQuery={
phone:'',
nikeName:'',
idCard:'',
pageNow:1,
pageSize:20
};
SharingRewardsService.sharingRewardRankings($scope.sharingRewardRankingQuery);
$scope.$on('shareWithDrawRecord.list', function() {
$scope.shareWithDrawRecords = SharingRewardsService.shareWithDrawRecords.datas;
$scope.numPages = SharingRewardsService.shareWithDrawRecords.totalPage;
$scope.totalRecord = SharingRewardsService.shareWithDrawRecords.totalRecord;
});
$scope.onSelectPage = function(page) {
$scope.sharingRewardRankingQuery.pageNow=page;
SharingRewardsService.sharingRewardRankings($scope.sharingRewardRankingQuery);
};
$scope.search=function() {
$scope.sharingRewardRankingQuery.pageNow = 1;
$scope.sharingRewardRankingQuery.startDt = $('#startDt').val();
$scope.sharingRewardRankingQuery.endDt = $('#endDt').val();
SharingRewardsService.sharingRewardRankings($scope.sharingRewardRankingQuery);
};
}]
);