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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
| layui.define([ 'form', 'laydate', 'table' ], function(exports) {
| var form = layui.form;
| var laydate = layui.laydate;
| var table = layui.table;
| var auditTable = null;
| var d = {};
| var view ={
|
| init:function(data){
| d = data;
| this.initTable();
| },
| initTable:function(){
| auditTable = table.render({
| elem : '#moneyTable',
| height : 'full-180',
| method : 'post',
| url : Common.ctxPath+ '/admin/money/list.json' //数据接口
| ,page : {"layout":['count','prev', 'page', 'next']} //开启分页
| ,limit : 10,
| where: d,
| cols : [ [ //表头
| {
| type : 'checkbox',
| fixed:'left',
| }, {
| field : 'payOrderId',
| title : '流水号',
| width : 120
| },{
| field : 'createTime',
| title : '申请时间',
| width : 150,
| sort : true
| },{
| field : 'money',
| title : '提现金额',
| width : 80,
| sort : true
| }, {
| field : 'nickName',
| title : '昵称',
| width : 120,
| templet:function (d){
| if (d.nickName == null) {
| return '--';
| } else {
| return $.base64.atob(d.nickName, true);
| }
|
| }
|
| }/*, {
| field : 'userType',
| title : '角色',
| width : 80
| }*/,
| {
| field : 'mobilePhone',
| title : '电话',
| width : 120,
| },
| /*{
| field : 'orderStatus',
| title : '订单状态',
| width : 180,
| sort : true
| },*/
| {
| field: 'status',
| title: '审核状态',
| width: 120,
| templet:function (d){
| if(d.status === '1'){
| return '待审核';
| }else if(d.status === '2'){
| return '已审核';
| }else if(d.status === '3'){
| return '审核未通过';
| }
| }
| },{
| field: 'unpassReason',
| title: '原因',
| width: '200',
| templet:function (d) {
| if(d.unpassReason === null){
| return "--";
| }else{
| return d.unpassReason;
| }
| }
|
| },
| {
| field: 'payFlag',
| title: '支付状态',
| width: 120,
| templet:function (d){
| console.log(d.payFlag);
| if(d.payFlag === '1'){
| return '待支付';
| }else if(d.payFlag === '2'){
| return '已支付';
| }else if(d.payFlag === '3'){
| return '支付未成功';
| }
| }
| },
| {
| field: 'examineTime',
| title: '审核时间',
| width: 180,
| sort: true,
| templet:function (d) {
| if(d.examineTime === null){
| return "--";
| }else{
| return d.examineTime;
| }
| }
| },
| {
| field: '',
| title: '操作',
| width: 120,
| templet:function (d) {
| return '--';
| /*var y2 = '<a class="layui-btn layui-btn-xs" ' +
| 'lay-event="detail">通过</a>'+
| '<a class="layui-btn layui-btn-xs" ' +
| 'lay-event="detail">不通过</a>';
| if(d.status === 2){
| return y2;
| }else{
| return y2;
| }*/
| }
| }
|
| ] ]
|
| });
| }
| };
|
| $("#x, #x1, #x2, #x3").click(function () {
| $("button[name='x']").addClass('layui-btn-primary');
| $(this).removeClass('layui-btn-primary');
| var d = {
| 'status':$(this).attr('dt'),
| 'nickName':$("#nickName").val(),
| 'mobilePhone':$("#mobilePhone").val()
| };
| view.init(d);
| });
| $("#search").click(function () {
| $(this).removeClass('layui-btn-primary');
| var x = $("button[name='x']");
| var ut = '';
| for(var i = 0; i < x.length; i++){
| if($(x[i]).attr('class').indexOf("layui-btn-primary") == -1){
| ut = $(x[i]).attr('dt');
| break;
| }
| }
| var d = {
| 'status':ut,
| 'nickName':$("#nickName").val(),
| 'mobilePhone':$("#mobilePhone").val()
| };
| view.init(d);
| });
|
| exports('index',view);
|
| });
|
|