reward.html
7.4 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
<include file="public@header"/>
<link rel="stylesheet" href="__STATIC__/install/css/mdialog.css">
<style>
.popup{
width: 250px;
height: 100px;
background-color: rgba(0,0,0,0.5);
position: fixed;
top: 50%;
transform: translateY(-50px);
left: 0;
right: 0;
margin: 0 auto;
border-radius: 5px;
color: #ffffff;
}
.popup p{
text-align: center;
margin-top: 20px;
}
.popup span{
text-align: center;
line-height: 30px;
cursor: pointer;
}
.popup .queding{
display: inline-block;
width: 80px;
height: 30px;
background-color: #1E9FFF;
border-radius: 3px;
}
.popup span:hover{
opacity: 0.8;
}
.popup .quxiao{
display: inline-block;
width: 80px;
height: 30px;
ckground-color: #9cb945 ;
color: #333333;
border-radius: 3px;
background-color:#fff;
margin-left: 35px;
}
.btn_list{
margin: 0 auto;
width: 200px;
}
.page_div a {
min-width: 30px;
height: 28px;
border: 1px solid #dce0e0!important;
text-align: center;
margin: 0 4px;
cursor: pointer;
line-height: 28px;
color: #666666;
font-size: 13px;
display: inline-block;
background: #fff;
}
#firstPage, #lastPage {
width: 50px;
color: #0073A9;
border: 1px solid #0073A9!important;
}
#prePage, #nextPage {
width: 70px;
color: #0073A9;
border: 1px solid #0073A9!important;
}
.page_div .current {
background-color: #0073A9;
border-color: #0073A9;
color: #FFFFFF;
}
.totalPages {
margin: 0 10px;
color: #0073A9;
}
.totalSize {
color: #0073A9;
}
.totalPages span, .totalSize span {
margin: 0 5px;
}
</style>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a>中介信誉管理</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('AdminOauth/reward')}">
<input type="hidden" name="id" value="{$user.id}">
时间:
<input type="text" class="form-control js-bootstrap-datetime start_time" name="start_time"
value="{$start_time|default=''}"
style="width: 140px;" autocomplete="off"> -
<input type="text" class="form-control js-bootstrap-datetime end_time" name="end_time"
value="{$end_time|default=''}"
style="width: 140px;" autocomplete="off">
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="{:url('AdminOauth/reward',array('id'=>$user.id))}">清空</a>
</form>
<div class="well form-inline margin-top-20" style="background-color: #C8EBFA;">
<div style="text-align: center;">用户信息:</div>
<div style="text-align: center;">
<span>用户id:{$user.id}</span>
<span>用户名:{$user.name}</span>
<span>手机号:{$user.tel}</span>
<span class="btn btn-default" onclick="window.location.href='/User/Admin_oauth/intermediary.html'" >返回</span>
</div>
</div>
<form method="post" class="js-ajax-form margin-top-20">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>ID</th>
<!--<th>推荐人</th>-->
<!--<th>推荐人id</th>-->
<th>来源</th>
<th>被推荐人姓名</th>
<th>被推荐人手机号</th>
<th>信誉奖励分</th>
<th>奖励时间</th>
<th>状态</th>
<th align="center">操作</th>
</tr>
</thead>
<tbody>
<foreach name="lists" item="vo">
<tr>
<td>{$vo.id}</td>
<td>
<eq name="vo.type" value="1">注册获得</eq>
<eq name="vo.type" value="2">推荐获得</eq>
<eq name="vo.type" value="3">签到获得</eq>
<eq name="vo.type" value="4">成交获得</eq>
<!--<eq name="vo.type" value="5">支付诚意金后返回金额</eq>-->
</td>
<td>{$vo.recommen_name}</td>
<td>{$vo.recommen_tel}</td>
<td>{$vo.number}</td>
<td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
<td>
<eq name="vo.status" value="1">
正常
</eq>
<eq name="vo.status" value="9">
已删除
</eq>
</td>
<td>
<span class="recovery" style="color: #18BC9C; text-decoration:underline; cursor: pointer;" index="{$vo.id}">删除</span>
</td>
</tr>
</foreach>
</tbody>
</table>
<div id="page1" class="page_div"></div>
</form>
<div class="popup" style="display: none;">
<p>确认删除该记录</p>
<div class="btn_list">
<span class="queding">确认</span>
<span class="quxiao">取消</span>
</div>
</div>
</div>
<script src="__STATIC__/js/paging.js"></script>
<script src="__STATIC__/js/admin.js"></script>
<script src="__STATIC__/js/layer/layer.js"></script>
<script type="text/javascript" src="__STATIC__/js/zepto.min.js"></script>
<script type="text/javascript" src="__STATIC__/js/mdialog.js"></script>
<script type="">
$('.recovery').click(function () {
var id = $(this).attr('index');
$('.popup').css('display','block');
// 删除
$('.queding').click(function () {
$.ajax({
type:"POST",
url:"{:url('AdminOauth/delReward')}",
data:{
"id":id,
},
success:function (data) {
new TipBox({type:'success',str:'操作成功',hasBtn:true});
$('.popup').css('display','none');
},
error:function () {
new TipBox({type:'error',str:'对不起,出错了!',hasBtn:true});
$('.popup').css('display','none');
}
})
})
})
$('.quxiao').click(function () {
$('.popup').css('display','none');
})
// 分页
var page = "{$page}";
var count = "{$count}";
var page_int = parseInt(page);
var pageNext = "{$Request.param.page}";
var id = "{$user.id}";
var end_time = $('.end_time').val();
var start_time = $('.start_time').val();
$("#page1").paging({
pageNo: pageNext, // 当前页
totalPage: page_int, // 总页数(可以用Math.ceil()向上取整来计算)
totalSize: count, //总条数
callback: function(num) {
var url = "/User/Admin_oauth/reward.html?page="+num+"&id="+id+"&end_time="+end_time+"&start_time="+start_time;
window.location.href = url;
}
})
</script>
</body>
</html>