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
94
95
96
97
98
99
100
| /**
| * 库位使用率
| */
| $(function () {
| $('#test-table').bootstrapTable('destroy')
| $('#test-table').bootstrapTable({
| method: 'GET',
| url: "sap/querySapLog.action",
| cache: false,
| striped: true,
| showColumns: true, //显示隐藏列
| showRefresh: false, //显示刷新按钮
| showExport: false,
| toolbar: "#toolbar",
| singleselect: true,
| clickToSelect: true, // 单击行即可以选中
| search: false,//显示搜素表单
| silent: true, //刷新事件必须设置
| sidePagination: "client", //前端分页
| columns: [
| {
| field: "matnr",
| title: "物料编码",
| align: "center",
| valign: "middle",
| // sortable: "true"
| }, {
| field: "request",
| title: "请求参数",
| align: "center",
| valign: "middle",
| sortable: "true"
| }, {
| field: "response",
| title: "返回参数",
| align: "center",
| valign: "middle",
| sortable: "true"
| }, {
| field: "create_time$",
| title: "记录时间",
| align: "center",
| valign: "middle",
| sortable: "true"
| },
| {
| field: "remark",
| title: "其他信息",
| align: "center",
| valign: "middle",
| sortable: "true"
| },
| {
| field: "type",
| title: "请求结果",
| align: "center",
| valign: "middle",
| sortable: "true",
| formatter: function (item) {
| if (item == 1) {
| return "成功";
| }
| if (item == 2) {
| return "失败"
| }
| }
| },
| ],
| queryParamsType: "undefined",
| queryParams: function queryParams(params) { //设置查询参数
| // var param = {
| // pageNumber: params.pageNumber,
| // pageSize: params.pageSize
| // // searchText: params.searchText
| // };
| // return param;
| },
| formatLoadingMessage: function () {
| return "请稍等,正在加载中...";
| },
|
| formatNoMatches: function () {
| return '无符合条件的记录';
| },
| //注册加载子表的事件。注意下这里的三个参数!
| onExpandRow: function (index, row, $detail) {
| // oInit.InitSubTable(index, row, $detail);
| }
|
| });
| });
|
| /**
| * 条件查询
| * @returns
| */
| function getViewStockUseByCon() {
| // $("#test-table").bootstrapTable('refresh');
| $("#test-table").bootstrapTable('refreshOptions', {pageNumber: 1}); //分页后重新搜索时,初始化页码为1
| }
|
|