下级用户列表

This commit is contained in:
youda 2025-07-04 15:39:09 +08:00
parent 3a3deec1b1
commit 910979ca65
3 changed files with 332 additions and 163 deletions

View File

@ -594,7 +594,7 @@ class User extends Base
$v['tx_money'] = $tx_money;
$v['profit_loss'] = $profit_loss;
$v['lirun'] = $lirun;
$v['liruntips'] = '收入('.$shouru.'- 发货金额('.$fh_money.') - 用户剩余达达券('.$money2.') - 盒柜剩余('.$shang_money.' ) ;';
$v['liruntips'] = '收入(' . $shouru . '- 发货金额(' . $fh_money . ') - 用户剩余达达券(' . $money2 . ') - 盒柜剩余(' . $shang_money . ' ) ;';
$v['shouru'] = $shouru;
$cz_money_total += $cz_yue;
@ -750,6 +750,8 @@ class User extends Base
public function user_team(Request $request)
{
$id = $request->param('id');
$addtime = $request->param('addtime');
// 将UID转换为用户ID
$id = $this->convertUidToUserId($id);
// dd($id);
@ -772,14 +774,39 @@ class User extends Base
$data['list'] = $list->toArray()['data'];
$data['count'] = $list->total();
$data['page'] = $page;
$start_time = 0;
$end_time = 0;
if ($addtime) {
$addtime = explode(' - ', $addtime);
$start_time = strtotime($addtime[0]);
$end_time = strtotime($addtime[1]);
// $where[] = ['addtime', 'BETWEEN', [$start_time, $end_time]];
}
foreach ($data['list'] as &$value) {
$value['total'] = ProfitMoney::where('type', 5)
->where('user_id', $id)
->where('share_uid', $value['id'])
->sum('change_money');
// dd();
$order_user_id = $value['id'];
// select IFNULL(sum(price),0) price,IFNULL(sum(use_money),0) use_money from `order` where user_id=23796 and status=1 addtime> 1745550000 and addtime<1746374399 ;
// 订单统计查询
$orderQuery = \app\common\model\Order::where('user_id', $value['id'])
->where('status', 1);
// 添加时间筛选条件
if ($start_time > 0 && $end_time > 0) {
$orderQuery->where('addtime', 'between', [$start_time, $end_time]);
}
// 执行查询并获取结果
$orderStats = $orderQuery->field('IFNULL(sum(price),0) as price, IFNULL(sum(use_money),0) as use_money')
->find();
$value['order_price'] = $orderStats['price'];
$value['order_use_money'] = $orderStats['use_money'];
}
// dd($data['list']);
View::assign('list', $data['list']);
View::assign('count', $data['count']);
View::assign('page', $page);
@ -1521,7 +1548,7 @@ class User extends Base
public function getUserProfitLoss()
{
$param = input();
// 构建查询条件
$where = [];
$whereUser = 'u.status=1 and u.istest=0 and o.status=1';
@ -1542,7 +1569,7 @@ class User extends Base
$whereUser3 = " and addtime < {$end_time} ";
}
}
// 处理用户ID/UID参数
if (!empty($param['uid'])) {
$uid = trim($param['uid']);
@ -1559,9 +1586,9 @@ class User extends Base
}
}
}
// 构建SQL查询
// 构建SQL查询 - 不应用分页限制,获取全部数据
// 构建SQL查询 - 不应用分页限制,获取全部数据
$sql = "select c.* from (
select t.*,
(CASE
@ -1583,28 +1610,28 @@ class User extends Base
(TRUNCATE(IFNULL((SELECT money FROM profit_money2 where user_id=o.user_id {$whereUser1} order by id desc LIMIT 1),0)/100, 2)) sy_money
FROM `order` o LEFT join `user` u ON o.user_id=u.id where {$whereUser} group by o.user_id ) t where use_money>0
) c order by yue_money desc";
//添加日志记录
\think\facade\Log::info($sql);
//添加日志记录
\think\facade\Log::info($sql);
// 分页处理
$page = isset($param['page']) ? intval($param['page']) : 1;
$limit = isset($param['limit']) ? intval($param['limit']) : 20;
// 获取总记录数
$countSql = "SELECT COUNT(*) as count FROM ({$sql}) as temp";
$count = \think\facade\Db::query($countSql)[0]['count'];
// 添加分页
$sql .= " LIMIT " . (($page - 1) * $limit) . ", {$limit}";
// 执行查询
$list = \think\facade\Db::query($sql);
// 处理结果数据
foreach ($list as &$item) {
// 处理图片URL
$item['headimg'] = empty($item['headimg']) ? '' : imageUrl($item['headimg']);
// 格式化数值
$item['money'] = floatval($item['money']);
$item['integral'] = floatval($item['integral']);
@ -1616,12 +1643,12 @@ class User extends Base
$item['fh_money'] = floatval($item['fh_money']);
$item['bb_money'] = floatval($item['bb_money']);
$item['yue_money'] = floatval($item['yue_money']);
// 处理盈亏状态
$item['profit_status'] = $item['yue_money'] > 0 ? '亏损' : '盈利';
$item['profit_value'] = abs($item['yue_money']);
}
return json([
'code' => 0,
'msg' => '',
@ -1636,7 +1663,7 @@ class User extends Base
public function exportUserProfitLoss()
{
$param = input();
// 构建查询条件
$where = [];
$whereUser = 'u.status=1 and u.istest=0 and o.status=1';
@ -1657,7 +1684,7 @@ class User extends Base
$whereUser3 = " and addtime < {$end_time} ";
}
}
// 处理用户ID/UID参数
if (!empty($param['uid'])) {
$uid = trim($param['uid']);
@ -1674,7 +1701,7 @@ class User extends Base
}
}
}
// 构建SQL查询 - 不应用分页限制,获取全部数据
$sql = "select c.* from (
select t.*,
@ -1697,18 +1724,18 @@ class User extends Base
(TRUNCATE(IFNULL((SELECT money FROM profit_money2 where user_id=o.user_id {$whereUser1} order by id desc LIMIT 1),0)/100, 2)) sy_money
FROM `order` o LEFT join `user` u ON o.user_id=u.id where {$whereUser} group by o.user_id ) t where use_money>0
) c order by yue_money desc";
//添加日志记录
\think\facade\Log::info($sql);
// 执行查询
$list = \think\facade\Db::query($sql);
// 处理结果数据
foreach ($list as &$item) {
// 处理图片URL
$item['headimg'] = empty($item['headimg']) ? '' : imageUrl($item['headimg']);
// 格式化数值
$item['money'] = floatval($item['money']);
$item['integral'] = floatval($item['integral']);
@ -1720,22 +1747,22 @@ class User extends Base
$item['fh_money'] = floatval($item['fh_money']);
$item['bb_money'] = floatval($item['bb_money']);
$item['yue_money'] = floatval($item['yue_money']);
// 处理盈亏状态
$item['profit_status'] = $item['yue_money'] > 0 ? '亏损' : '盈利';
$item['profit_value'] = abs($item['yue_money']);
}
// 引入PHPExcel
// ThinkPHP 6.0使用composer自动加载
if (!class_exists('\\PhpOffice\\PhpSpreadsheet\\Spreadsheet')) {
return json(['code' => 1, 'msg' => '请先安装PhpSpreadsheet扩展']);
}
// 使用PhpSpreadsheet
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
// 设置文档属性
$spreadsheet->getProperties()
->setCreator("系统")
@ -1743,7 +1770,7 @@ class User extends Base
->setTitle("用户盈亏列表")
->setSubject("用户盈亏列表")
->setDescription("用户盈亏列表导出数据");
// 设置表头
$headers = [
'A' => '序号',
@ -1766,14 +1793,14 @@ class User extends Base
'R' => '亏损/盈利金额',
// 'S' => '利润值'
];
foreach ($headers as $key => $val) {
$sheet->setCellValue($key . '1', $val);
// 设置表头单元格样式
$sheet->getStyle($key . '1')->getFont()->setBold(true);
$sheet->getStyle($key . '1')->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
}
// 写入数据
$row = 2;
foreach ($list as $index => $item) {
@ -1796,7 +1823,7 @@ class User extends Base
$sheet->setCellValue('Q' . $row, $item['profit_status']);
$sheet->setCellValue('R' . $row, $item['profit_value']);
$sheet->setCellValue('S' . $row, $item['yue_money']);
// 为亏损和盈利设置不同颜色
if ($item['yue_money'] > 0) {
// 亏损标红
@ -1809,23 +1836,23 @@ class User extends Base
$sheet->getStyle('R' . $row)->getFont()->getColor()->setARGB('FF008000');
// $sheet->getStyle('S' . $row)->getFont()->getColor()->setARGB('FF008000');
}
$row++;
}
// 调整列宽
foreach ($headers as $key => $val) {
$sheet->getColumnDimension($key)->setAutoSize(true);
}
// 设置sheet名称
$sheet->setTitle('用户盈亏列表');
// 输出Excel文件
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="用户盈亏列表_' . date('YmdHis') . '.xlsx"');
header('Cache-Control: max-age=0');
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xlsx');
$writer->save('php://output');
exit;
@ -1839,7 +1866,7 @@ class User extends Base
if (empty($uid)) {
return 0;
}
// 如果是数字可能是用户ID或UID
if (is_numeric($uid)) {
$user = \app\common\model\User::where('id', $uid)->whereOr('uid', $uid)->find();
@ -1857,17 +1884,17 @@ class User extends Base
public function getUserMoney2Records()
{
$param = input();
// 验证参数
if (empty($param['user_id'])) {
return json(['code' => 1, 'msg' => '缺少用户ID参数']);
}
// 分页参数
$page = isset($param['page']) ? intval($param['page']) : 1;
$limit = isset($param['limit']) ? intval($param['limit']) : 10;
$offset = ($page - 1) * $limit;
// 时间范围处理
$whereTime = '';
if (!empty($param['time_range'])) {
@ -1878,27 +1905,27 @@ class User extends Base
$whereTime = " and addtime > {$start_time} and addtime < {$end_time}";
}
}
// 获取总记录数
$countSql = "SELECT COUNT(*) as count FROM profit_money2 WHERE user_id = :user_id {$whereTime}";
$count = \think\facade\Db::query($countSql, ['user_id' => $param['user_id']])[0]['count'];
// 构建SQL查询并添加分页
$sql = "SELECT (change_money/100) change_money, (money/100) money, content, FROM_UNIXTIME(addtime) as addtime_fmt, addtime
FROM profit_money2
WHERE user_id = :user_id {$whereTime}
ORDER BY id desc
LIMIT {$offset}, {$limit}";
// 执行查询
$list = \think\facade\Db::query($sql, ['user_id' => $param['user_id']]);
// 处理数据将达达券值转换为显示格式乘以100
foreach ($list as &$item) {
$item['change_money'] = floatval($item['change_money']) * 100;
$item['money'] = floatval($item['money']) * 100;
}
return json([
'code' => 0,
'msg' => '',
@ -1906,4 +1933,141 @@ class User extends Base
'data' => $list
]);
}
/**
* 导出团队用户列表到Excel
*/
public function exportUserTeam(Request $request)
{
$id = $request->param('id');
$addtime = $request->param('addtime');
// 将UID转换为用户ID
$id = $this->convertUidToUserId($id);
// 查询数据(不分页,获取全部)
$list = \app\common\model\User::where('pid', $id)->select();
$start_time = 0;
$end_time = 0;
if ($addtime) {
$addtime = explode(' - ', $addtime);
$start_time = strtotime($addtime[0]);
$end_time = strtotime($addtime[1]);
}
// 处理数据
foreach ($list as &$value) {
$value['total'] = ProfitMoney::where('type', 5)
->where('user_id', $id)
->where('share_uid', $value['id'])
->sum('change_money');
// 订单统计查询
$orderQuery = \app\common\model\Order::where('user_id', $value['id'])
->where('status', 1);
// 添加时间筛选条件
if ($start_time > 0 && $end_time > 0) {
$orderQuery->where('addtime', 'between', [$start_time, $end_time]);
}
// 执行查询并获取结果
$orderStats = $orderQuery->field('IFNULL(sum(price),0) as price, IFNULL(sum(use_money),0) as use_money')
->find();
$value['order_price'] = $orderStats['price'];
$value['order_use_money'] = $orderStats['use_money'];
// 格式化时间
// $value['addtime_format'] = date('Y-m-d H:i:s', $value['addtime']);
// 处理状态
$value['status_text'] = $value['status'] == 1 ? '正常' : '封号';
}
// 引入PHPExcel
if (!class_exists('\\PhpOffice\\PhpSpreadsheet\\Spreadsheet')) {
return json(['code' => 1, 'msg' => '请先安装PhpSpreadsheet扩展']);
}
// 使用PhpSpreadsheet
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
// 设置文档属性
$spreadsheet->getProperties()
->setCreator("系统")
->setLastModifiedBy("系统")
->setTitle("下级用户列表")
->setSubject("下级用户列表")
->setDescription("下级用户列表导出数据");
// 设置表头
$headers = [
'A' => '序号',
'B' => '用户ID',
'C' => 'UID',
'D' => '手机号',
'E' => '昵称',
'F' => 'RMB消费',
'G' => '钻石消费',
'H' => '钻石',
'I' => 'UU币',
'J' => '达达卷',
'K' => '佣金',
'L' => '状态',
// 'M' => '时间'
];
foreach ($headers as $key => $val) {
$sheet->setCellValue($key . '1', $val);
// 设置表头单元格样式
$sheet->getStyle($key . '1')->getFont()->setBold(true);
$sheet->getStyle($key . '1')->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
}
// 写入数据
$row = 2;
foreach ($list as $index => $item) {
$sheet->setCellValue('A' . $row, $index + 1);
$sheet->setCellValue('B' . $row, $item['id']);
$sheet->setCellValue('C' . $row, isset($item['uid']) ? $item['uid'] : $item['id']);
$sheet->setCellValue('D' . $row, $item['mobile']);
$sheet->setCellValue('E' . $row, $item['nickname']);
$sheet->setCellValue('F' . $row, $item['order_price']);
$sheet->setCellValue('G' . $row, $item['order_use_money']);
$sheet->setCellValue('H' . $row, $item['money']);
$sheet->setCellValue('I' . $row, $item['integral']);
$sheet->setCellValue('J' . $row, $item['money2']);
$sheet->setCellValue('K' . $row, $item['total']);
$sheet->setCellValue('L' . $row, $item['status_text']);
// $sheet->setCellValue('M' . $row, $item['addtime_format']);
// 为不同状态设置不同颜色
if ($item['status'] != 1) {
// 封号标红
$sheet->getStyle('L' . $row)->getFont()->getColor()->setARGB('FFFF0000');
}
$row++;
}
// 调整列宽
foreach ($headers as $key => $val) {
$sheet->getColumnDimension($key)->setAutoSize(true);
}
// 设置sheet名称
$sheet->setTitle('下级用户列表');
// 输出Excel文件
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="下级用户列表_' .$id.'_' . date('YmdHis') . '.xlsx"');
header('Cache-Control: max-age=0');
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xlsx');
$writer->save('php://output');
exit;
}
}

View File

@ -36,6 +36,8 @@ Route::rule('chongzhi', 'User/chongzhi', 'GET|POST');
Route::rule('userdel', 'User/userdel', 'GET|POST');
Route::rule('usertest', 'User/usertest', 'GET|POST');
Route::rule('user_exportUserTeam', 'User/exportUserTeam', 'GET|POST');
Route::rule('user_profit_loss', 'User/user_profit_loss', 'GET|POST');
Route::rule('user_profit_loss_list', 'User/userProfitLossList', 'GET');
Route::rule('get_user_profit_loss', 'User/getUserProfitLoss', 'POST');
@ -517,3 +519,4 @@ Route::rule('ff_products_status', 'FFProductsController/status', 'POST');
Route::rule('ff_products_hot', 'FFProductsController/hot', 'POST');
Route::rule('ff_products_new', 'FFProductsController/new', 'POST');
Route::rule('ff_products_recommend', 'FFProductsController/recommend', 'POST');

View File

@ -1,130 +1,132 @@
{include file="Public:header2"/}
<body>
<div class="layui-fluid">
<div class="layui-card">
<!-- <form method="get" class="layui-form layui-card-header layuiadmin-card-header-auto">-->
<!-- <div class="layui-form-item">-->
<!-- <div class="layui-inline">-->
<!-- <div class="layui-input-inline" style="width: 150px;margin-left: 0px">-->
<!-- <input type="text" name="user_id" value="{$Request.get.user_id}" placeholder="请输入UID" autocomplete="off" class="layui-input">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-inline">-->
<!-- <div class="layui-input-inline" style="width: 150px;margin-left: 0px">-->
<!-- <input type="text" name="mobile" value="{$Request.get.mobile}" placeholder="请输入手机号" autocomplete="off" class="layui-input">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-inline">-->
<!-- <div class="layui-input-inline" style="width: 150px;margin-left: 0px">-->
<!-- <input type="text" name="nickname" value="{$Request.get.nickname}" placeholder="请输入昵称" autocomplete="off" class="layui-input">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-inline" >-->
<!-- <div class="layui-input-inline" style="width: 300px;margin-left: 0px">-->
<!-- <input type="text" id="addtime" name="addtime" value="{$Request.get.addtime}" class="layui-input" placeholder="登录时间" autocomplete="off" >-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-inline">-->
<!-- <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="LAY-user-front-search">-->
<!-- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>-->
<!-- </button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </form>-->
<div class="layui-fluid">
<div class="layui-card">
<form method="get" class="layui-form layui-card-header layuiadmin-card-header-auto">
<div class="layui-form-item">
<div class="layui-card-body">
<xblock>
<div style="padding-bottom: 10px;">
<span style="line-height:40px;float:right;">共有数据: {$count}条</span>
</div>
</xblock>
<table class="layui-table">
<thead>
<tr>
<th>序号</th>
<th>用户信息</th>
<th>钻石</th>
<th>UU币</th>
<th>达达卷</th>
<th>佣金</th>
<th>状态</th>
<th>时间</th>
<!-- <th>操作</th>-->
</tr>
</thead>
<tbody>
{volist name="list" id="vo" key="index"}
<tr>
<td>{$start_index + $index}</td>
<td style="text-align: left">
<div style="display: flex;">
<div><img src="{:imageUrl($vo['headimg'])}" alt="" width="50px" height="50px"></div>
<div style="margin-left: 10px">
<p style="color: #e91e63;font-size: 9px">真实ID{$vo['id']}</p>
<p style="color: #e91e63;font-size: 9px">UID{:isset($vo['uid']) ? $vo['uid'] : $vo['id']}</p>
<p style="color: #666666ba;font-size: 9px">{$vo['mobile']}</p>
<p style="color: #666666ba;font-size: 9px">{$vo['nickname']}</p>
</div>
<div class="layui-inline">
<div class="layui-input-inline" style="width: 300px;margin-left: 0px">
<input type="text" id="addtime" name="addtime" value="{$Request.get.addtime}"
class="layui-input" placeholder="消费时间" autocomplete="off">
</div>
</td>
</div>
<input type="hidden" name="id" value="{$Request.get.id}" />
<div class="layui-inline">
<button class="layui-btn layuiadmin-btn-useradmin" lay-submit
lay-filter="LAY-user-front-search">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
</div>
</div>
</form>
<td>{$vo['money']}
<!-- <br/><a style="text-decoration:none" name="{$vo.nickname}" onClick="chongzhi({$vo.id},this.name,1,'余额')"class="layui-btn layui-btn-danger layui-btn-xs">充值</a>-->
</td>
<td>{$vo['integral']}
<!-- <br/><a style="text-decoration:none" name="{$vo.nickname}" onClick="chongzhi({$vo.id},this.name,2,'吧唧币')"class="layui-btn layui-btn-danger layui-btn-xs">充值</a>-->
</td>
<td>{$vo['money2']}
<!-- <br/><a style="text-decoration:none" name="{$vo.nickname}" onClick="chongzhi({$vo.id},this.name,3,'积分')"class="layui-btn layui-btn-danger layui-btn-xs">充值</a>-->
</td>
<td>{$vo['total']}
<!-- <br/><a style="text-decoration:none" name="{$vo.nickname}" onClick="chongzhi({$vo.id},this.name,3,'积分')"class="layui-btn layui-btn-danger layui-btn-xs">充值</a>-->
</td>
<td>
{if condition="$vo['status'] eq 1"}
<button class="layui-btn layui-btn-success layui-btn-radius layui-btn-sm">正常</button>
{else /}
<button class="layui-btn layui-btn-danger layui-btn-radius layui-btn-sm">封号</button>
<div class="layui-card-body">
<xblock>
<div style="padding-bottom: 10px;">
<button class="layui-btn layui-btn-normal" onclick="exportExcel()"><i class="layui-icon layui-icon-export"></i> 导出Excel</button>
<span style="line-height:40px;float:right;">共有数据: {$count}条</span>
</div>
</xblock>
<table class="layui-table">
<thead>
<tr>
<th>序号</th>
<th>用户信息</th>
<th>实际消费</th>
<th>钻石</th>
<th>UU币</th>
<th>达达卷</th>
<th>佣金</th>
<th>状态</th>
<th>时间</th>
<!-- <th>操作</th>-->
</tr>
</thead>
<tbody>
{volist name="list" id="vo" key="index"}
<tr>
<td>{$start_index + $index}</td>
<td style="text-align: left">
<div style="display: flex;">
<div><img src="{:imageUrl($vo['headimg'])}" alt="" width="50px" height="50px"></div>
<div style="margin-left: 10px">
<p style="color: #e91e63;font-size: 9px">真实ID{$vo['id']}</p>
<p style="color: #e91e63;font-size: 9px">UID{:isset($vo['uid']) ? $vo['uid'] :
$vo['id']}</p>
<p style="color: #666666ba;font-size: 9px">{$vo['mobile']}</p>
<p style="color: #666666ba;font-size: 9px">{$vo['nickname']}</p>
</div>
</div>
</td>
<td>
<p style="font-size: 9px"> RMB消费{$vo['order_price']}</p>
</p>
<p style="font-size: 9px">钻石消费:{$vo['order_use_money']}</p>
</td>
<td>{$vo['money']}
<!-- <br/><a style="text-decoration:none" name="{$vo.nickname}" onClick="chongzhi({$vo.id},this.name,1,'余额')"class="layui-btn layui-btn-danger layui-btn-xs">充值</a>-->
</td>
<td>{$vo['integral']}
<!-- <br/><a style="text-decoration:none" name="{$vo.nickname}" onClick="chongzhi({$vo.id},this.name,2,'吧唧币')"class="layui-btn layui-btn-danger layui-btn-xs">充值</a>-->
</td>
<td>{$vo['money2']}
<!-- <br/><a style="text-decoration:none" name="{$vo.nickname}" onClick="chongzhi({$vo.id},this.name,3,'积分')"class="layui-btn layui-btn-danger layui-btn-xs">充值</a>-->
</td>
<td>{$vo['total']}
<!-- <br/><a style="text-decoration:none" name="{$vo.nickname}" onClick="chongzhi({$vo.id},this.name,3,'积分')"class="layui-btn layui-btn-danger layui-btn-xs">充值</a>-->
</td>
<td>
{if condition="$vo['status'] eq 1"}
<button class="layui-btn layui-btn-success layui-btn-radius layui-btn-sm">正常</button>
{else /}
<button class="layui-btn layui-btn-danger layui-btn-radius layui-btn-sm">封号</button>
{/if}
</td>
<td>{$vo['addtime']|date="Y-m-d H:i:s"}</td>
</tr>
{/volist}
{if condition="empty($list)"}
<tr>
<td colspan='10' style="text-align:center;">暂时没有数据!</td>
</tr>
{/if}
</td>
<td>{$vo['addtime']|date="Y-m-d H:i:s"}</td>
</tr>
{/volist}
{if condition="empty($list)"}
<tr>
<td colspan='10' style="text-align:center;">暂时没有数据!</td>
</tr>
{/if}
</tbody>
</table>
<div class="my_page layui-box layui-laypage layui-laypage-default">
{$page|raw}
</tbody>
</table>
<div class="my_page layui-box layui-laypage layui-laypage-default">
{$page|raw}
</div>
</div>
</div>
</div>
</div>
{include file="Public:footer"/}
<script type="text/javascript">
layui.use(['table', 'laydate'], function () {
//执行一个laydate实例
var laydate = layui.laydate;
laydate.render({
elem: '#addtime'
,type: 'datetime'
,range: true
{include file="Public:footer"/}
<script type="text/javascript">
layui.use(['table', 'laydate'], function () {
//执行一个laydate实例
var laydate = layui.laydate;
laydate.render({
elem: '#addtime'
, type: 'datetime'
, range: true
});
});
});
</script>
// 导出Excel函数
function exportExcel() {
var addtime = $('#addtime').val();
var id = $('input[name="id"]').val();
// 构建URL并打开新窗口
var url = '/admin/user_exportUserTeam?id=' + id;
if (addtime) {
url += '&addtime=' + encodeURIComponent(addtime);
}
window.location.href = url;
}
</script>
</body>
</html>
</html>