withdrawals.html
13.1 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
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<include file="public/layout" />
<style type="text/css">
.flexigrid .sDiv2 {
float: right;
margin-bottom: 10px;
}
.page-content {top: -5px;position: relative;}
</style>
<script src="__PUBLIC__/static/js/layer/laydate/laydate.js"></script>
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
<div class="fixed-bar">
<div class="item-title">
<div class="ftitle">
<h3>会员提现申请记录</h3>
<h5>(共{$pager->totalRows}条记录)</h5>
<div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
</div>
</div>
</div>
<div class="flexigrid">
<div class="mDiv mDivHA">
<form class="navbar-form form-inline" id="search-form" name="search-form" method="get" action="{:U('withdrawals')}" onsubmit="return check_form();">
<div class="sDiv mt10">
<div class="sDiv2">
<input size="30" value="{$Think.request.account_bank}" maxlength="80" onkeydown="strkeydown(event, this, 'sumbitbtn')" name="account_bank" placeholder="收款账号" class="qsbox" type="text">
<input id="sumbitbtn" class="btn" value="搜索" type="submit">
</div>
<div class="sDiv2" style="margin-right: 10px;display: none;">
<input type="text" size="30" id="add_time_end" name="endtime" onkeydown="strkeydown(event, this, 'sumbitbtn')" value="{$add_time_end}" placeholder="截止时间" class="qsbox">
</div>
<div class="sDiv2" style="margin-right: 10px;display: none;">
<input type="text" size="30" id="add_time_begin" name="stime" onkeydown="strkeydown(event, this, 'sumbitbtn')" value="{$add_time_begin}" placeholder="起始时间" class="qsbox text">
</div>
<div class="sDiv2" style="margin-right: 10px;">
<input size="30" placeholder="收款账户名" maxlength="80" onkeydown="strkeydown(event, this, 'sumbitbtn')" value="{$Think.request.account_name}" name="account_name" class="qsbox" type="text">
</div>
<div class="sDiv2" style="margin-right: 10px;">
<input size="30" id="user_mobile" name="mobile" maxlength="15" onkeyup="this.value=this.value.replace(/\D/g,'')" onkeydown="strkeydown(event, this, 'sumbitbtn')" value="{$Think.request.mobile}" placeholder="用户手机" class="qsbox" type="text">
</div>
<div class="sDiv2" style="margin-right: 10px;border: none;">
<select id="status" name="status" class="form-control" onkeydown="strkeydown(event, this, 'sumbitbtn')">
<option value="-1" <if condition="$status eq -1">selected</if>>请选择状态</option>
<option value="0" <if condition="$status eq 0">selected</if>>申请中</option>
<option value="1" <if condition="$status eq 1">selected</if>>申请成功</option>
<option value="2" <if condition="$status eq 2">selected</if>>申请失败</option>
</select>
</div>
<div style="float: right;margin-right: 10px;">
每<input type="text" size="2" maxlength="3" name="pagenum" id="pagenum" class="qsbox" value="{$pagenum}">条/页
<include file="public/date" />
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</form>
</div>
<div class="hDiv">
<div class="hDivBox">
<table cellspacing="0" cellpadding="0">
<thead>
<tr>
<th align="center" abbr="article_title" axis="col3" class="w60">
<div style="text-align: center;" class=""><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);"></div>
</th>
<th align="center" abbr="ac_id" axis="col4" class="w120">
<div style="text-align: center;" class="">申请单号</div>
</th>
<th align="center" abbr="ac_id" axis="col4" class="w100">
<div style="text-align: center;" class="">用户手机</div>
</th>
<!--<th align="center" abbr="article_show" axis="col5" class="">-->
<!--<div style="text-align: center; width: 100px;" class="">用户昵称</div>-->
<!--</th>-->
<th align="center" abbr="article_time" axis="col6" class="w90">
<div style="text-align: center; " class="">申请时间</div>
</th>
<th align="center" abbr="article_time" axis="col6" class="w80">
<div style="text-align: center;" class="">申请金额</div>
</th>
<th align="center" abbr="article_time" axis="col6" class="w90">
<div style="text-align: center;" class="">银行名称</div>
</th>
<th align="center" abbr="article_time" axis="col6" class="w160">
<div style="text-align: center;" class="">银行账号</div>
</th>
<th align="center" abbr="article_time" axis="col6" class="w80">
<div style="text-align: center; " class="">银行账户</div>
</th>
<th align="center" abbr="article_time" axis="col6" class="w80">
<div style="text-align: center;" class="">状态</div>
</th>
<th align="center" axis="col1" class="handle w90">
<div style="text-align: center;">操作</div>
</th>
<!--删除 20170425-->
<!--<th style="width:100%" axis="col7">
<div></div>
</th>-->
</tr>
</thead>
</table>
</div>
</div>
<div class="tDiv">
<div class="tDiv2">
<div class="fbutton">
<a onclick="act_submit(1)">
<div class="add" title="提现通过">
<span><i class="fa fa-check"></i>提现通过</span>
</div>
</a>
</div>
<div class="fbutton">
<a onclick="act_submit(2)">
<div class="add" title="拒绝提现">
<span><i class="fa fa-ban"></i>拒绝提现</span>
</div>
</a>
</div>
<div class="fbutton">
<a onclick="act_submit(3)">
<div class="add" title="批量删除">
<span><i class="fa fa-close"></i>批量删除</span>
</div>
</a>
</div>
<div class="fbutton">
<div class="add" title="数据导出" id="btnexcel">
<span><i class="fa fa-check"></i>数据导出</span>
</div>
</div>
</div>
<div style="clear:both"></div>
</div>
<div class="bDiv" style="height: auto;">
<div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
<table>
<tbody id="tbsele">
<empty name="list">
<tr data-id="0">
<td class="no-data" align="center" axis="col0" colspan="50">
<i class="fa fa-exclamation-circle"></i>没有符合条件的记录
</td>
</tr>
<else/>
<volist name="list" id="v">
<tr val="<if condition='$v.status eq 0'>{$v['id']}<else/>0</if>">
<td align="center" class="w60">
<div style="text-align: center;">
<if condition="$v['status'] eq 0"><input type="checkbox" name="selected[]" value="{$v['id']}"></if>
</div>
</td>
<td align="center" class="w120">
<div style="text-align: center; ">{$v.order_sn}</div>
</td>
<td align="center" class="w100">
<div style="text-align: center; ">
<a class="open" href="{:U('Admin/user/detail',array('id'=>$v[user_id]))}" target="blank">
{$v.mobile}<i class="fa fa-external-link " title="新窗口打开"></i>
</a>
</div>
</td>
<td align="center" class="w90">
<div style="text-align: center; ">{$v.create_time|date="Y-m-d",###}</div>
</td>
<td align="center" class="w80">
<div style="text-align: center; ">{$v.money}</div>
</td>
<td align="center" class="w90">
<div style="text-align: center; ">
<if condition="$v.bank_type eq 1">{$v.bank_name}
<else/>
微信
</if>
</div>
</td>
<td align="center" class="w160">
<div style="text-align: center; ">
<if condition="$v.bank_type eq 1">{$v.account_bank}
<else/>
无
</if>
</div>
</td>
<td align="center" class="w80">
<div style="text-align: center;">
{$v.account_name}
</div>
</td>
<td align="center" class="w80">
<div style="text-align: center; ">
<if condition="$v[status] eq 0">申请中</if>
<if condition="$v[status] eq 1">申请成功</if>
<if condition="$v[status] eq 2">申请失败</if>
</div>
</td>
<td align="center" class="handle w90">
<div style="text-align: center; ">
<a href="{:U('editWithdrawals',array('id'=>$v['id'],'p'=>$_GET[p]))}" class="btn blue"><i class="fa fa-pencil-square-o"></i>编辑</a>
<if condition="in_array($v[status],array(0,2))">
<a class="btn red" href="javascript:void(0)" onclick="del('{$v[id]}')"><i class="fa fa-trash-o"></i>删除</a>
</if>
</div>
</td>
<!--删除 20170425-->
<!--<td align="" class="" style="width: 100%;">
<div> </div>
</td>-->
</tr>
</volist>
</empty>
</tbody>
</table>
</div>
<div class="iDiv" style="display: none;"></div>
</div>
<!--分页位置-->
<div class="row">
<div class="col-sm-6 text-left"></div>
<div class="col-sm-6 text-right">{$page}</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
// 表格行点击选中切换
$('#flexigrid > table>tbody >tr').click(function() {
$(this).toggleClass('trSelected');
});
// 点击刷新数据
$('.fa-refresh').click(function() {
location.href = location.href;
});
// $('#start_time').layDate();
// $('#end_time').layDate();
});
// 删除操作
function del(id) {
if (!confirm('确定要删除吗?'))
return false;
$.ajax({
url: "/index.php?m=Admin&c=user&a=delWithdrawals&id=" + id,
success: function(v) {
var v = eval('(' + v + ')');
if (v.hasOwnProperty('status') && (v.status == 1))
location.href = "{:U('Admin/user/withdrawals')}";
else
layer.msg(v.msg, {
icon: 2,
time: 1000
}); //alert(v.msg);
}
});
return false;
}
function check_form() {
layer.msg('加载中...', {
icon: 16,
shade: [0.5, '#f5f5f5'],
scrollbar: false,
offset: '10px',
time: 100000
});
var start_time = $.trim($('#add_time_begin').val());
var end_time = $.trim($('#add_time_end').val());
// if(start_time == '' ^ end_time == ''){
// layer.alert('请选择完整的时间间隔', {icon: 2});
// return false;
// }
if (start_time !== '' && end_time !== '') {
$('#create_time').val(start_time + "^" + end_time);
}
if (start_time == '' && end_time == '') {
$('#create_time').val('');
}
return true;
}
//批量操作提交
function act_submit(wst) {
layer.msg('加载中...', {
icon: 16,
shade: [0.5, '#f5f5f5'],
scrollbar: false,
offset: '10px',
time: 100000
});
var a = [];
$("#tbsele").find("tr").each(function(i, o) {
if ($(this).hasClass('trSelected') && $(this).attr('val')>0) {
//a.push($(o).val());
a.push($(this).attr('val'));
}
})
if (a.length == 0) {
layer.alert('请至少选择一项', {
icon: 2
});
return;
}
$.ajax({
type: "POST",
url: "/index.php?m=Admin&c=user&a=withdrawals_update", //+tab,
data: {
id: a,
status: wst
},
dataType: 'json',
success: function(data) {
if (data.status == 1) {
layer.closeAll();
layer.alert(data.msg, {
icon: 1,
closeBtn: 0
}, function() {
window.location.reload();
});
} else {
layer.closeAll();
layer.alert(data.msg, {
icon: 2,
time: 2000
}
, function() {
window.location.reload();
}
);
setTimeout(function () {
window.location.reload();
},2000)
}
},
error: function() {
layer.alert('网络异常', {
icon: 2,
time: 3000
});
}
});
}
//选中全部
$('.hDivBox .sign').click(function() {
var sign = $('#flexigrid > table>tbody>tr');
if ($(this).parent().hasClass('trSelected')) {
sign.each(function() {
$(this).removeClass('trSelected');
});
$(this).parent().removeClass('trSelected');
} else {
sign.each(function() {
$(this).addClass('trSelected');
});
$(this).parent().addClass('trSelected');
}
})
// 导出数据
function ajax_exportreport(form, page) {
cur_page = page; //当前页面 保存为全局变量
location.href="/index.php?m=Admin&c=User&a=exportwithdrawals&p=" + page+$('#' + form).serialize();
}
$("#btnexcel").click(function (){
ajax_exportreport('search-form',1);
})
</script>
</body>
</html>