admin
2025-08-08 035edfa382d349ba66240fbfef68c14c7cfc95d1
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
<!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>