|
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
var datas = [[${@dict.getType('sys_normal_disable')}]];
var containerStatus = [[${@dict.getType('containerStatus')}]];
var editFlag = [[${@permission.hasPermi('general:container:edit')}]];
var removeFlag = [[${@permission.hasPermi('general:container:remove')}]];
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
modalName: "容器",
search: false,
sortName: "created",
sortOrder: "desc",
columns: [{
checkbox: true
},
{
field : 'id',
title : 'id'
},
{
|
|
104
105
106
107
108
109
110
111
112
113
114
|
title : '容器类型',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectPrefixToName(containerTypes, value);
}
},
{
field : 'locationCode',
title : '库位编码'
},
{
|
|
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
field : 'status',
title : '状态',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(containerStatus, value);
}
},
{
field : 'printCount',
title : '打印次数',
visible:false
},
{
field : 'created',
title : '创建时间'
},
{
field : 'createdBy',
title : '创建用户'
},
/*{
field : 'lastUpdated',
title : '更新时间'
},
{
field : 'lastUpdatedBy',
title : '最后更新人'
},*/
{
field : 'enable',
title : '是否有效' ,
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(datas, value);
}
},
{
field : 'userDef1',
title : '自定义字段1' ,
visible:false
},
{
field : 'userDef2',
title : '自定义字段2' ,
visible:false
},
{
field : 'userDef3',
title : '自定义字段3' ,
visible:false
},
{
field : 'userDef4',
title : '自定义字段4' ,
visible:false
},
{
field : 'userDef5',
title : '自定义字段5' ,
visible:false
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
//actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.checklook(\'' + row.id + '\')"><i class="fa fa-search"></i>查看</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>
|