setjiangli.html
4.8 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
<include file="public/layout" />
<body style="background-color: #FFF; overflow: auto; min-width: 100%; height:200px">
<form method="post" enctype="multipart/form-data" id="handlepost">
<div style="margin: 0 auto; width: 60%; margin-top: 40px; text-align: center">
<dl class="row">
<dd class="opt">
<span>一级奖励</span> <input id="first_money" name="first_money" value="{$config.first_money}" style="width: 260px" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')" maxlength="8" class="input-txt" type="text">元
</dd>
</dl>
<dl class="row" style="margin-top: 20px;">
<dd class="opt">
<span>二级奖励</span> <input id="second_money" name="second_money" value="{$config.second_money}" style="width: 260px" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')" maxlength="8" class="input-txt" type="text">元
</dd>
</dl>
<dl class="row" style="margin-top: 20px;">
<dd class="opt">
<span>三级奖励</span> <input id="third_money" name="third_money" value="{$config.third_money}" style="width: 180px" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')" maxlength="8" class="input-txt" type="text">元<a href="http://law.npc.gov.cn/FLFG/flfgByID.action?flfgID=197880&showDetailType=QW&zlsxid=23" target="_blank" style="margin-left: 5px; " ><span> <font color="red"><span class="fa fa-warning"></span> <b style="text-decoration: underline ">警告</b></font></span></a></span>
</dd>
</dl>
</div>
<div style="text-align: left;margin-top: 50px; ">
<a style="float: right; margin-right: 30px;vertical-align: middle" id="sumbitbtn" href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="adsubmit()">确认提交</a>
<label for="is_invitation_rate" style="margin-left: 30px;top: 10px;position: relative"><input id="is_invitation_rate" type="checkbox" <if condition="$distribut.is_invitation_rate eq 1">checked</if> style="top: 1px;position: relative"/>是否参与邀请送积分或代金券</label>
<input id="input_is_invitation_rate" name="is_invitation_rate" type="hidden" value="1"/>
</div>
</form>
</body>
<script>
function adsubmit() {
var first_money=$("#first_money").val();
if(first_money==""){
layer.msg('请输入一级奖励', {icon: 2,time: 2000});
return false;
}
var second_money=$("#second_money").val();
if(second_money==""){
layer.msg('请输入二级奖励', {icon: 2,time: 2000});
return false;
}
var third_money=$("#third_money").val();
if(third_money==""){
layer.msg('请输入三级奖励', {icon: 2,time: 2000});
return false;
}
if($('#is_invitation_rate').is(':checked')){
$("#input_is_invitation_rate").val("1");
}else{
$("#input_is_invitation_rate").val("0");
}
var i0=layer.msg('提交中...', {icon: 16,shade: [0.5, '#adadad'],scrollbar: false,offset: '50px', time:0}) ;
var url="/index.php/admin/system/setjiangli/is_ajax/1";
$.ajax({
type: "POST",
url: url, //+tab,
data: $('#handlepost').serialize(), // 你的formid
success: function (data) {
layer.close(i0);
layer.msg(data.msg, {icon: 1,time:2000});
if(data.code==1){
setTimeout(function () {
window.parent.call_back();
},1000);
}
},error:function () {
layer.close(i0);
layer.msg('系统繁忙,请重新再试', {icon: 2,time:2000});
}
});
}
//设置弹窗
$("#third_money").click(function () {
//示范一个公告层
//询问框
layer.confirm('<div style="padding: 10px; line-height: 28px; font-size: 14px; background-color: #fff; color: #000; font-weight: 300;"> 您已设置直接奖励,如设间接奖励将违反国家发布的《禁止传销条例》<br>第7条规定,将存在公众号查封的危险性,请慎重考虑!<br><b>详情查看:<a href="http://law.npc.gov.cn/FLFG/flfgByID.action?flfgID=197880&showDetailType=QW&zlsxid=23" target="_blank"><font color=blue>中国普法网—《禁止传销条例》</font></a></b> </div>', {
btn: ['继续设置','取消设置'],//按钮
title:'<span class="fa fa-warning"></span>危险提示'
}, function(){
$("#third_money").focus();
layer.closeAll();
}, function(){
layer.msg('已经把值设置为0了', {icon: 1});
$("#third_money").val("0");
});
})
</script>
</html>