list.html
2.32 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<title>Yoho!Buy运营平台</title>
<script src="/ufoPlatform/js/include.js"></script>
</head>
<body class="easyui-layout">
<div region="north" style="height:180px;">
<script>
document.write(addHead('资源管理', '资源管理'));
</script>
</div>
<div id="tradeBillsList" region="center">
<table id="tradeBillsListTable"></table>
</div>
<script>
$(function() {
getTradeBillsList();
});
function getTradeBillsList(){
$("#tradeBillsListTable").myDatagrid({
fit: true,
fitColumns: true,
striped: true,
url: contextPath + "/resource/getResources?debug=XYZ",
method: 'POST',
queryParams: {},
loadFilter: function (data) {
var temp = defaultLoadFilter(data);
temp=null==temp?[]:temp;
temp.rows = temp.list;
return temp;
},
columns: [[{
title: "ID",
field: "id",
width: 30,
align: "center"
},{
title: "资源名称",
field: "name",
width: 30,
align: "center"
},{
title: "平台",
field: "platform",
width: 30,
align: "center"
},{
title: "位置码",
field: "code",
width: 20,
align: "center"
},{
title: "创建时间",
field: "createTime",
width: 20,
align: "center"
}, {
title: "操作",
field: "asdf",
width: 40,
align: "center",
formatter: function (value, rowData, rowIndex) {
if (rowData.tradeStatus != 100) {
var btn= `<a role='refundsConfirm' onclick='openEditDialog(${rowData.id})' style='margin-left:10px;background-color: #5cb85c !important;'>内容编辑</a>`;
return btn;
}
}
}]],
cache: false,
pagination: true,
//pageSize: 20,
idField: "id",
singleSelect: true,
onLoadSuccess: function (data) {
$(this).datagrid("getPanel").find("a[role='refundsConfirm']").linkbutton({});
}
});
}
function openEditDialog(id) {
//重新赋值
}
</script>
</body>
</html>