user_list.html
6.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
<include file="public@header"/>
</head>
<body>
<style>
.pagination{text-align:center;margin-top:20px;margin-bottom: 20px;}
.pagination li{margin:0px 10px; border:1px solid #e6e6e6;padding: 3px 8px;display: inline-block;}
.pagination .active{background-color: #dd1a20;color: #fff;}
.pagination .disabled{color:#aaa;}
</style>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="#">用户列表</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('Users/user_list')}">
<!--时间:-->
<!--<input type="text" class="form-control js-bootstrap-datetime" name="start_time"-->
<!--value="{$start_time|default=''}"-->
<!--style="width: 140px;" autocomplete="off">- -->
<!--<input type="text" class="form-control js-bootstrap-datetime" name="end_time"-->
<!--value="{$end_time|default=''}"-->
<!--style="width: 140px;" autocomplete="off"> -->
序号:
<input type="text" class="form-control" name="id" style="width: 200px;"
value="{$id|default=''}" placeholder="请输入序号">
关键字:
<input type="text" class="form-control" name="keyword" style="width: 200px;"
value="{$keyword|default=''}" placeholder="请输入微信昵称...">
身份:
<select name="identity" class="form-control">
<option value="">全部</option>
<option value="2">一级业务员</option>
<option value="3">二级业务员</option>
<option value="4">学生</option>
<option value="-1">自由人</option>
</select>
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="{:url('Users/user_list')}">清空</a>
</form>
<table class="table table-bordered">
<caption>边框表格布局</caption>
<thead>
<tr>
<th>序号</th>
<th>微信昵称</th>
<th>身份</th>
<th>手机号</th>
<th>邀请人</th>
<th>余额</th>
<th>创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<volist name="data" id="val">
<tr>
<td>{$val.id}</td>
<td>{$val.user_nickname}</td>
<if condition="$val.status eq 2">
<td>一级业务员</td>
<elseif condition="$val.status eq 3"/>
<td>二级业务员</td>
<elseif condition="$val.status eq 4"/>
<td>学生</td>
<else/>
<td>自由人</td>
</if>
<td>{$val.phone}</td>
<td>{$val.inviter_phone}</td>
<td>{$val.balance}</td>
<if condition="$val.status eq 2">
<td>{$val.audit_time|date="Y-m-d H:i:s",###}</td>
<else/>
<td>{$val.create_time|date="Y-m-d H:i:s",###}</td>
</if>
<td style="width:300px;">
<input type="hidden" name="" class="bianji{$val.id}">
<if condition="$val.status eq 0">
<button type="button" class="btn btn-default setup{$val.id}" onclick="set_up({$val.id})">设为业务员</button>
<elseif condition="$val.status eq 1"/>
<button type="button" class="btn btn-default">已设为业务员</button>
<elseif condition="$val.status eq 5"/>
<button type="button" class="btn btn-default">业务员审核中</button>
<elseif condition="$val.status eq 6" />
<button type="button" class="btn btn-default">审核驳回</button>
<else/>
<button type="button" class="btn btn-default" style="background-color: red;">不能设置</button>
</if>
<if condition="$val.status eq 2">
<a href="{:url('Users/teacher_list',array('id'=>$val.id))}"><button type="button" class="btn btn-default">下线名单</button></a>
<elseif condition="$val.status eq 3"/>
<a href="{:url('Users/student_list',array('teacher_id'=>$val.id))}"><button type="button" class="btn btn-default">下线名单</button></a>
<else/>
<button type="button" class="btn btn-default" style="background-color: red;">没有下线</button>
</if>
<if condition="$val.status eq 2">
<a href="{:url('Users/users_money',array('uid'=>$val.uid))}">
<button type="button" class="btn btn-default">余额明细</button>
</a>
<elseif condition="$val.status eq 3"/>
<a href="{:url('Users/users_money',array('uid'=>$val.uid))}">
<button type="button" class="btn btn-default">余额明细</button>
</a>
<else/>
<button type="button" class="btn btn-default" style="background-color: red;">没有余额</button>
</if>
</td>
</tr>
</volist>
</tbody>
</table>
<div class="pagination">
{$data->render()}
</div>
</div>
<script>
/**
*设置为业务员
*/
function set_up(id){
ccc = window.confirm('是否设置为业务员?');
if(ccc){
$.post("{:url('Users/set_salesman')}",{id:id},function(data){
if(data){
$('.setup'+id).remove();
$('.bianji'+id).after("<button type='button' class='btn btn-default'>已设为业务员</button>");
}else{
alert('设置失败');
}
});
}
}
</script>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>