withdrawals.html
8.68 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
<!DOCTYPE html >
<html>
<head>
<meta charset="UTF-8">
<title>流动资金提现</title>
<style type="text/css">
.sub-btn:hover{color: #fff;}
</style>
<include file="public/header" />
<script type="text/javascript" src="__STATIC__/js/layer.js"></script>
<body>
<include file="public/menu" />
<include file="public/navBall"/>
<form action="{:U('/Mobile/User/withdrawals')}" method="post" name="points" id="points">
<input name="bank_name" type="hidden" value="{$topres['bank_name']}"/>
<input name="stoid" value="{$Think.request.stoid}" type="hidden">
<ul class="withdrawals">
<!--<li>
余额 <i class="ml20 cr">¥20.00</i>
</li>-->
<li class="dn">
到帐银行卡<span class="cr ml10">民生银行(621691****6856)</span>
</li>
<li>
<span class="fl">可提现余额<i class="cr ml10">¥</i><i class="cr limitsum">{$liudong_money}</i></span>
<p class="clear"></p>
</li>
<li>
<p>提现金额</p>
<span class="vam">¥</span><input name="money" class="tx_money" id="tx_money" type="number" value="" placeholder="请输入金额,最少提现¥{$distribut_min}"/>
</li>
<li>
<ol>
<li>
请按要求正确填写,预计1-7个工作日到账
</li>
<li>
<span>提现方式</span>
<if condition="$switch_list['is_closetxbank'] neq 1">
<a onclick="set_bank_type(1)">
<div class="radio radioOn ml10 mr5 bank_type1"></div>
<span>银行卡</span>
</a>
</if>
<if condition="$isck eq 1">
<a onclick="set_bank_type(2)">
<if condition="$switch_list.is_closetxbank eq 1">
<div class="radio ml10 radioOn mr5 bank_type2"></div>
<else/>
<div class="radio ml10 mr5 bank_type2"></div>
</if>
<span>微信余额</span>
</a>
</if>
<input id="bank_type" name="bank_type" type="hidden" value="<if condition="$isck eq 1">
<if condition="$switch_list.is_closetxbank eq 1">2<else/>1</if><else/><if condition="$switch_list['is_closetxbank'] neq 1">1<else/>0</if>">
</if>
</li>
<li id="cahao_li">
卡号
<input id="account_bank" class="input_info" type="tel" name="account_bank" size="25" placeholder="请输入您的银行账号" onkeyup="formatBankNo(this)"
onkeydown="formatBankNo(this)" onblur="getbankname(this)" value="{$topres['account_bank']}"/>
</li>
<li>
姓名
<input id="account_name" class="input_info" name="account_name" type="text" placeholder="请输入银行卡的开户人姓名" value="{$topres['account_name']}"/>
</li>
<li id="yinhan_li">
<span class="fl">银行</span><span class="fl bank_name" id="txtBankName" style="color: #999; padding-left: 20px;">{$topres['bank_name']} </span><p class="clear"></p>
</li>
</ol>
</li>
<li>
<if condition="$rmon egt $needmon">
<a class="sub-btn" onClick="checkup()">确认提现</a>
<else/>
<a class="sub-btn" style="background:gainsboro">满{$needmon}元才可提现</a>
</if>
</li>
</ul>
</form>
<input id="distribut_min" value="{$distribut_min}" type="hidden"/>
<input id="distribut_need" value="{$needmon}" type="hidden"/>
</body>
<script type="text/javascript">
String.prototype.replaceAll = function(s1,s2){
return this.replace(new RegExp(s1,"gm"),s2);
}
$(function(){
// $(".tx_money").focus(function(){
// if($(this).length > 0){
// $(this).css("color","#C4182E");
// }else{
// $(this).css("color","#999");
// }
// });
// $(".tx_money").focusout(function(){
// $(this).css("color","#999");
// });
<if condition="$isck eq 1 and $switch_list['is_closetxbank'] eq 1">
set_bank_type(2);
</if>
});
/*---开始充值---*/
function checkup() {
var dis_min=$("#distribut_min").val();
var dis_need=$("#distribut_need").val();
if(parseInt(dis_min)<=0 || parseInt(dis_need)<=0){
layer.open({content:'请联系商家设置满多少才能提现及最低提现额度',time:3});
return false;
}
var bank_type=$("#bank_type").val();
if (bank_type==0)
{
layer.open({content:"商家未设置提现方式,无法提现",time:3});
return false;
}
var num00=$(".limitsum").text().replaceAll(',',"");
if( parseFloat(num00)<parseFloat(dis_need)){
layer.open({content:"余额要满"+dis_need+"元才能体现",time:3});
return false;
}
if($(".tx_money").val()=="" || parseFloat(num00)<parseFloat($(".tx_money").val()) || parseFloat($(".tx_money").val())<=0)
{
$(".tx_money").val('');
layer.open({content:'请输入正确金额',time:3});
return false;
}
if(parseInt($("#tx_money").val())<parseInt($("#distribut_min").val())){
layer.open({content:'最少提现'+$("#distribut_min").val()+'元',time:3});
return false;
}
if($("input[name=account_bank]").val()=="" && bank_type=="1" )
{
layer.open({content:'请输入银行帐号',time:3});
return false;
}
if($("input[name=account_name]").val()=="")
{
layer.open({content:'请输入姓名',time:3});
return false;
}
if($("input[name=bank_name]").val()=="" && bank_type=="1" )
{
layer.open({content:'请输入银行名称',time:3});
return false;
}
$("#points").submit();
}
function formatBankNo(BankNo) {
if (BankNo.value == "") return;
var account = new String(BankNo.value);
account = account.substring(0, 22); /*帐号的总数, 包括空格在内 */
if (account.match(".[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{7}") == null) {
/* 对照格式 */
if (account.match(".[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{7}|" + ".[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{7}|" +
".[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{7}|" + ".[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{7}") == null) {
var accountNumeric = accountChar = "", i;
for (i = 0; i < account.length; i++) {
accountChar = account.substr(i, 1);
if (!isNaN(accountChar) && (accountChar != " ")) accountNumeric = accountNumeric + accountChar;
}
account = "";
for (i = 0; i < accountNumeric.length; i++) { /* 可将以下空格改为-,效果也不错 */
if (i == 4) account = account + " "; /* 帐号第四位数后加空格 */
if (i == 8) account = account + " "; /* 帐号第八位数后加空格 */
if (i == 12) account = account + " "; /* 帐号第十二位后数后加空格 */
account = account + accountNumeric.substr(i, 1)
}
}
}
else {
account = " " + account.substring(1, 5) + " " + account.substring(6, 10) + " " + account.substring(14, 18) + "-" + account.substring(18, 25);
}
if (account != BankNo.value) BankNo.value = account;
}
function getbankname(obj) {
var bankno = $(obj).val();
if(bankno!="")
{
$("input[name=bank_name]").val("");
$("#txtBankName").text("");
}
var getparam = "&bankno=" + bankno;
$.ajax({
type: "GET",
url: "/index.php?m=mobile&c=User&a=getbankname"+getparam+"&stoid="+{:I('get.stoid')}, //+tab,
success: function(data) {
if (data.code == 1) {
$("input[name=bank_name]").val(data.bankname);
$("#txtBankName").text(data.bankname);
IsDo = true;
}
else if(data.code == -2)
{
layer.open({content:'网络异常,请重试',time:1});
//layer.open("网络异常,请重试!",{icon:2,time:1000});
}
else
{
$(obj).val(''); $("#account_bank").focus();
layer.open({content:'请输入正确帐号',time:1});
}
}
});
}
function set_bank_type(ind) {
$("#bank_type").val(ind);
if(ind==1){
$(".bank_type1").addClass("radioOn");
$(".bank_type2").removeClass("radioOn");
$("#cahao_li").show();
$("#yinhan_li").show();
$("#account_name").attr("placeholder",'请输入银行卡的开户人姓名');
}
if(ind==2){
$(".bank_type1").removeClass("radioOn");
$(".bank_type2").addClass("radioOn");
$("#cahao_li").hide();
$("#yinhan_li").hide();
$("#account_name").attr("placeholder",'请输入微信的开户人姓名');
}
}
</script>