<!DOCTYPE html>
|
<html lang="zh">
|
<head>
|
<meta charset="UTF-8">
|
<meta name="renderer" content="webkit">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"/>
|
<title>已分配设备列表</title>
|
<link rel="stylesheet" type="text/css" href="/admin/layui/css/layui.css"/>
|
<link rel="stylesheet" type="text/css" href="/admin/css/admin.css"/>
|
<script src="js/http_api.js"></script>
|
<style>
|
.layui-table-cell {
|
height: 50px;
|
white-space: normal;
|
max-height: 50px;
|
}
|
|
/* 添加横向滚动样式 */
|
.scroll-x {
|
overflow: hidden !important;
|
overflow-x: auto !important;
|
white-space: nowrap;
|
outline: none;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="page-content-wrap">
|
|
<div class="scroll-x">
|
<table class="layui-table" lay-even lay-skin="nob" id="clientsTable" style="height: 100%"></table>
|
</div>
|
</div>
|
|
<script src="/admin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
|
<script src="/admin/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
|
<script>
|
layui.use(['table', 'layer'], function () {
|
var table = layui.table;
|
var layer = layui.layer;
|
var urlParams = new URLSearchParams(window.location.search);
|
var taskId = urlParams.get('taskId');
|
|
// 渲染表格
|
var tableIns = table.render({
|
elem: '#clientsTable',
|
url: '/admin/api/ordertask/js2/assignedClients',
|
where: {
|
taskId: taskId
|
},
|
parseData: function(res) {
|
return {
|
"code": res.code,
|
"msg": res.msg,
|
"count": res.data.count,
|
"data": res.data.list
|
}
|
},
|
page: true,
|
cols: [[
|
{field: 'clientId', title: '客户端ID', width: 100},
|
{field: 'orderNo', title: '订单号', width: 150},
|
{field: 'productName', title: '商品名称', width: 150},
|
{field: 'shopName', title: '店铺名称', width: 120},
|
{field: 'couponCode', title: '券码', width: 120},
|
{
|
field: 'executionStatus', title: '执行状态', width: 120, templet: function (d) {
|
switch (d.executionStatus) {
|
case 0: return '<span style="color: #999">未下单</span>';
|
case 1: return '<span style="color: #009900">已下单</span>';
|
case -1: return '<span style="color: #ff0000">下单失败</span>';
|
case 2: return '<span style="color: #009900">确认收货成功</span>';
|
case -2: return '<span style="color: #ff0000">确认收货失败</span>';
|
case 3: return '<span style="color: #009900">评价成功</span>';
|
case -3: return '<span style="color: #ff0000">评价失败</span>';
|
default: return '未知状态';
|
}
|
}
|
},
|
{field: 'statusDescription', title: '状态说明', width: 150},
|
{field: 'orderTime', title: '下单时间', width: 160},
|
{field: 'receiveTime', title: '收货时间', width: 160},
|
{field: 'reviewTime', title: '评价时间', width: 160},
|
{field: 'createTime', title: '创建时间', width: 160},
|
{field: 'updateTime', title: '更新时间', width: 160}
|
]]
|
});
|
});
|
</script>
|
</body>
|
</html>
|