|
|
@@ -0,0 +1,291 @@
|
|
|
+<include file="public@header"/>
|
|
|
+</head>
|
|
|
+<style>
|
|
|
+ .form-inline .form-control {
|
|
|
+ margin: 10px 0;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+
|
|
|
+ .form-inline span {
|
|
|
+ margin-left: 5px;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+ .margin-left-10 {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .profile em {
|
|
|
+ font-style: normal;
|
|
|
+ color: #0b6cbc;
|
|
|
+ }
|
|
|
+
|
|
|
+ .profile em.red {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+
|
|
|
+ span.sort {
|
|
|
+ color: red;
|
|
|
+ display: inline-block;
|
|
|
+ margin-left: 2px;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+ td img.avatar, td img.sex {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ vertical-align: middle;
|
|
|
+ border-radius: 100%;
|
|
|
+ }
|
|
|
+ .form .form-control {
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+ .form .control-label {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .table-actions span {
|
|
|
+ margin-right: 10px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ .table-actions span em {
|
|
|
+ font-style: normal;
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+ .layui-layer-page .layui-layer-content {
|
|
|
+ overflow: hidden !important;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+<body>
|
|
|
+<div class="wrap js-check-wrap">
|
|
|
+ <ul class="nav nav-tabs">
|
|
|
+ <li class="active"><a>注销用户列表</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <form id="search" class="well form-inline margin-top-20" method="post" action="{:url('admin/pools/logout')}">
|
|
|
+ <span>会员ID:</span>
|
|
|
+ <input class="form-control" type="text" name="uid" style="width: 150px;" value="{:input('request.uid')}"
|
|
|
+ placeholder="会员ID">
|
|
|
+ <span>用户昵称:</span>
|
|
|
+ <input class="form-control" type="text" name="user_nickname" style="width: 200px;"
|
|
|
+ value="{:input('request.user_nickname')}" placeholder="用户昵称"><br>
|
|
|
+ <span>用户姓名:</span>
|
|
|
+ <input class="form-control" type="text" name="real_name" style="width: 200px;"
|
|
|
+ value="{:input('request.real_name')}" placeholder="用户姓名">
|
|
|
+ <span>手机号:</span>
|
|
|
+ <input class="form-control" type="text" name="mobile" style="width: 200px;" value="{:input('request.mobile')}"
|
|
|
+ placeholder="手机号">
|
|
|
+
|
|
|
+ <input id="sort" type="hidden" name="sort" value="{$params.sort?$params.sort: 1}">
|
|
|
+ <input id="sortType" type="hidden" name="sort_type" value="{$params.sort_type?$params.sort_type: 'desc'}">
|
|
|
+ <input type="submit" class="btn btn-primary margin-left-10 " value="搜索"/>
|
|
|
+
|
|
|
+ <a class="btn btn-default margin-left-10" href="{:url('admin/pools/logout')}">清空</a>
|
|
|
+ <if condition="$is_admin eq 1">
|
|
|
+ <a class="btn btn-warning margin-left-10" href="{:url('admin/pools/export',['type'=>6])}">导出</a>
|
|
|
+ </if>
|
|
|
+ </form>
|
|
|
+ <form class="form-horizontal js-ajax-form margin-top-20" role="form">
|
|
|
+ <div class="table-actions">
|
|
|
+ <span>共计<em>{$total}</em>个资源</span>
|
|
|
+ <a class="btn btn-primary btn-sm" onclick="doDistribute()">分配用户</a>
|
|
|
+ <a class="btn btn-danger btn-sm" onclick="doDelete()">批量移除</a>
|
|
|
+ </div>
|
|
|
+ <table class="table table-hover table-bordered">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th width="60"><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">全选</th>
|
|
|
+ <th>ID</th>
|
|
|
+ <th width="120">用户名</th>
|
|
|
+ <th>基本资料</th>
|
|
|
+ <th>姓名</th>
|
|
|
+ <th>手机号</th>
|
|
|
+ <th width="100">VIP会员</th>
|
|
|
+ <th width="100">充值过</th>
|
|
|
+ <th width="100">消费过</th>
|
|
|
+ <th width="180">注册时间 <span class="row sort join-time" data-status="{$params.sort == 1? $params.sort_type : 'desc'}" onclick="sort(this,1)"><if condition="$params.sort eq 1 && $params.sort_type eq 'asc'">↓<else>↑</if></span></th>
|
|
|
+ <th width="150">最后登录<span class="row sort last-time" data-status="{$params.sort == 2? $params.sort_type : 'desc'}" onclick="sort(this,2)"><if condition="$params.sort eq 2 && $params.sort_type eq 'asc'">↓<else>↑</if></span></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <foreach name="list" item="vo">
|
|
|
+ <tr>
|
|
|
+ <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
|
|
|
+ value="{$vo.id}" data-id="{$vo.user_id}" title="ID:{$vo.id}"></td>
|
|
|
+ <td>{$vo.user_id}</td>
|
|
|
+ <td>
|
|
|
+ <img class="avatar" src="{$vo.avatar}"> <if condition="$vo['sex'] eq 1"><img class="sex" src="/static/images/male.png" alt=""><else><img class="sex" src="/static/images/fmale.png" alt=""></if> <span>{$vo['user_nickname']}</span>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <p class="profile">{$vo.profile_text}</p>
|
|
|
+ </td>
|
|
|
+ <td>{$vo['real_name']}</td>
|
|
|
+ <td>{$vo['mobile']? $vo['mobile']:'无'}</td>
|
|
|
+ <td>
|
|
|
+ <if condition="$vo['is_vip'] eq 1">
|
|
|
+ <span style="color: green;">是</span>
|
|
|
+ <else>
|
|
|
+ <span style="color: red;">否</span>
|
|
|
+ </if>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <if condition="$vo['is_recharge'] eq 1">
|
|
|
+ <span style="color: green;">是</span>
|
|
|
+ <else>
|
|
|
+ <span style="color: red;">否</span>
|
|
|
+ </if>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <if condition="$vo['is_cost'] eq 1">
|
|
|
+ <span style="color: green;">是</span>
|
|
|
+ <else>
|
|
|
+ <span style="color: red;">否</span>
|
|
|
+ </if>
|
|
|
+ </td>
|
|
|
+ <td>{$vo['create_time']}</td>
|
|
|
+ <td>{$vo['last_login_time']}</td>
|
|
|
+ </foreach>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <div class="pagination">{$page}</div>
|
|
|
+
|
|
|
+ <div id="distribute" style="display: none; margin-top: 20px;">
|
|
|
+ <div class="form">
|
|
|
+ <form method="post" class="form-horizontal js-ajax-form margin-top-20" >
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-sm-3 control-label"><span class="form-required">*</span>分配给销售</label>
|
|
|
+ <div class="col-sm-6">
|
|
|
+ <select class="form-control" id="sale" onchange="selectSale(this)">
|
|
|
+ <option value="0">请选择</option>
|
|
|
+ <foreach name="sales" item="vo">
|
|
|
+ <option value="{$vo.id}">{$vo.user_login}<if condition="$vo.real_name">[{$vo.real_name}]</if></option>
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group">
|
|
|
+ <label class="col-sm-3 control-label"><span class="form-required"></span>到期时间(天)</label>
|
|
|
+ <div class="col-sm-8">
|
|
|
+ <input type="text" class="form-control" id="expire_at" name="expire_at" placeholder="默认取平台设置">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+</div>
|
|
|
+<script src="__STATIC__/js/admin.js"></script>
|
|
|
+<script src="__STATIC__/js/clipboard.min.js"></script>
|
|
|
+<script src="__STATIC__/js/layer/layer.js"></script>
|
|
|
+<script src="__STATIC__/js/position/position1.js" type="text/javascript"></script>
|
|
|
+<script src="__STATIC__/js/height/height.js" type="text/javascript"></script>
|
|
|
+<script>
|
|
|
+ var saleUid = 0;
|
|
|
+ /**
|
|
|
+ * 排序
|
|
|
+ * @param type
|
|
|
+ */
|
|
|
+ function sort(ele,type){
|
|
|
+ $("#sort").val(type);
|
|
|
+ var status = $(ele).attr('data-status');
|
|
|
+ $("#sortType").val(status=='desc'? 'asc': 'desc');
|
|
|
+ $(ele).html(status == 'desc'? '↓' : '↑');
|
|
|
+ $(ele).attr('data-status', status=='desc'? 'asc': 'desc');
|
|
|
+
|
|
|
+ $("#search").submit();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 选择销售用户
|
|
|
+ * @param ele
|
|
|
+ */
|
|
|
+ function selectSale(ele){
|
|
|
+ saleUid = $(ele).val();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分配资源
|
|
|
+ * @returns {boolean}
|
|
|
+ */
|
|
|
+ function doDistribute(){
|
|
|
+ var ids = [];
|
|
|
+ $(".js-check:checked").each(function () {
|
|
|
+ var id = $(this).attr('data-id');
|
|
|
+ if (id > 0) {
|
|
|
+ ids.push(id);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (ids.length <= 0) {
|
|
|
+ layer.msg('请先选择操作项');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ layer.open({
|
|
|
+ type: 1, //1:页面层,2:iframe层,3:加载层,4:tips层。
|
|
|
+ title: '分配'+(ids.length)+'个资源给销售',
|
|
|
+ shadeClose: false, //不开启遮罩关闭,也就是说,点击弹出层其它地方不会关闭弹出框
|
|
|
+ shade: 0.8, //遮罩
|
|
|
+ offset: 'auto',
|
|
|
+ area: ['480px', '260px'],
|
|
|
+ content: $("#distribute"),
|
|
|
+ btn: ['确定分配','取消'],
|
|
|
+ btnAlign: 'c',
|
|
|
+ yes: function(){
|
|
|
+ if(saleUid<=0){
|
|
|
+ layer.msg('请选择分配的销售用户')
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var expire_at = $("#expire_at").val();
|
|
|
+ if (confirm('确定批量分配选择项?不可恢复')) {
|
|
|
+ $.post('/admin/pools/distribute', {ids: ids, sale_uid: saleUid, expire_at: expire_at, type: 4}, function (res) {
|
|
|
+ if (res.code == 1) {
|
|
|
+ layer.msg(res.msg)
|
|
|
+ setTimeout(function () {
|
|
|
+ location.reload();
|
|
|
+ }, 2000)
|
|
|
+ } else {
|
|
|
+ layer.msg(res.msg);
|
|
|
+ }
|
|
|
+ }, "json")
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cancel: function(){
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 清除
|
|
|
+ * @returns {boolean}
|
|
|
+ */
|
|
|
+ function doDelete() {
|
|
|
+ var ids = [];
|
|
|
+ $(".js-check:checked").each(function () {
|
|
|
+ var id = $(this).val();
|
|
|
+ if (id > 0) {
|
|
|
+ ids.push(id);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (ids.length <= 0) {
|
|
|
+ layer.msg('请先选择操作项');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (confirm('确定批量移除选择项到售前公海?不可恢复')) {
|
|
|
+ $.post('/admin/pools/clear', {ids: ids, type: 4}, function (res) {
|
|
|
+ if (res.code == 1) {
|
|
|
+ layer.msg(res.msg)
|
|
|
+ setTimeout(function () {
|
|
|
+ location.reload();
|
|
|
+ }, 1200)
|
|
|
+ } else {
|
|
|
+ layer.msg(res.msg)
|
|
|
+ }
|
|
|
+ }, "json")
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+</body>
|
|
|
+</html>
|