|
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
<i class="fa fa-trash-o"></i> 删除
</a>
</div>
<table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover text-nowrap"></table>
</div>
</div>
</div>
</div>
</div>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
let prefix = ctx + "reservation";
let company =[[${@companyService.getCode()}]];
let datas = [[${@dict.getType('reservation_type')}]];
$(function() {
let options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
modalName: "预约",
search: false,
pageSize: 10,
columns: [{
checkbox: true
},
{
field : 'id',
title : 'id',
visible: false
},
{
field : 'warehouseCode',
title : '仓库编码',
visible: false
},
{
field: 'companyCode',
title: '货主',
align: 'center',
visible: false,
formatter: function(value, row, index) {
let actions = [];
$.each(company, function(index, dict) {
if (dict.code == value) {
actions.push("<span class='badge badge-info'>" + dict.name + "</span>");
return false;
}
});
return actions.join('');
}
},
{
field : 'name',
title : '姓名',
align: "center"
},
{
field : 'phone',
title : '联系方式',
align: "center",
},
{
field : 'carPlate',
title : '车牌号',
align: "center",
},
{
field : 'status',
title : '状态',
align: "center",
formatter: function (value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
field : 'stationCode',
title : '站台',
align: "center",
},
{
field : 'appointment',
title : '预约时间',
align: "center",
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
let actions = [];
actions.push('<a class="btn btn-info btn-xs" href="#" onclick="$.operate.edit(\''+row.id+'\')"><i class="fa fa-edit"></i>编辑</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>
|