withdrawController.js
3.3 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
"use strict";
var withdrawController = angular.module('withdrawController',[]);
withdrawController.controller('withdrawListController', [
'$rootScope',
'$scope',
'WithdrawService',
'BaseService',
function($rootScope, $scope, WithdrawService,BaseService) {
$scope.currentPage = 1;
$scope.numPages = 1;
$scope.pageSize = 20;
$scope.totalRecord = 0;
$scope.statisticsWithDraw=[];
$scope.recordQuery={
phone:'',
partnerTradeNo:'',
paymentNo:'',
productRange:'',
startDt:null,
endDt:null,
payStartDt:null,
payEndDt:null,
pageNow:1,
pageSize:20
};
WithdrawService.selectWithdrawForPager($scope.recordQuery);
$scope.$on('withdraw.list', function() {
$scope.withdrawRecordList = WithdrawService.withDrawList.datas;
$scope.numPages = WithdrawService.withDrawList.totalPage;
$scope.totalRecord = WithdrawService.withDrawList.totalRecord;
});
$scope.onSelectPage = function(page) {
$scope.recordQuery.pageNow=page;
WithdrawService.selectWithdrawForPager($scope.recordQuery);
};
$scope.search=function() {
$scope.recordQuery.pageNow = 1;
WithdrawService.selectWithdrawForPager($scope.recordQuery);
};
$scope.comfirmPay=function(id,status){
var param={'id':id,'status':status,'type':'succss'};
if(confirm("确认打款")){
WithdrawService.updateWithdrawStatus(param)
}
};
$scope.refusePay=function(id,status){
var param={'id':id,'status':status,'type':'fail'};
if(confirm("确认审核失败")){
WithdrawService.updateWithdrawStatus(param)
}
};
}]
);
withdrawController.controller('withdrawDetailListController', [
'$rootScope',
'$scope',
'WithdrawService',
'BaseService',
'$state',
function($rootScope, $scope, WithdrawService,BaseService,$state) {
$scope.currentPage = 1;
$scope.numPages = 1;
$scope.pageSize = 10;
$scope.totalRecord = 0;
$scope.memberId=$rootScope.$stateParams.memberId;
$scope.withDrawDetailList=[];
$scope.statisticsWithDraw=[];
$scope.recordQuery={
pageNow:1,
pageSize:10,
memberId : $scope.memberId
};
$scope.productQuery={
memberId : $scope.memberId
}
WithdrawService.selectWithdrawDetailForPager($scope.recordQuery);
$scope.$on('withdrawDetail.list', function() {
$scope.withDrawDetailList = WithdrawService.withDrawDetailList.datas;
$scope.numPages = WithdrawService.withDrawDetailList.totalPage;
$scope.totalRecord = WithdrawService.withDrawDetailList.totalRecord;
});
$scope.onSelectPage = function(page) {
$scope.recordQuery.pageNow=page;
WithdrawService.selectWithdrawDetailForPager($scope.recordQuery);
};
WithdrawService.statisticsWithdrawDetailInfo($scope.productQuery);
$scope.$on('statisticsWithdrawDetailInfo', function() {
$scope.statisticsWithDraw=WithdrawService.statisticsWithDrawList;
});
}]
);