代码生成主子表序号调整

This commit is contained in:
RuoYi
2020-06-21 23:04:09 +08:00
parent 326fe6a63f
commit 3846329c82
5 changed files with 19 additions and 20 deletions

View File

@ -365,6 +365,7 @@ var sub = {
$("#" + table.options.id).bootstrapTable("updateRow", params);
},
delColumn: function(column) {
sub.editColumn();
var subColumn = $.common.isEmpty(column) ? "index" : column;
var ids = $.table.selectColumns(subColumn);
if (ids.length == 0) {
@ -372,17 +373,6 @@ var sub = {
return;
}
$("#" + table.options.id).bootstrapTable('remove', { field: subColumn, values: ids });
if($.common.equals("index", subColumn))
{
sub.resetIndex();
}
},
resetIndex: function(msg) {
var count = $("#" + table.options.id).bootstrapTable('getData').length;
for (var index = 0; index <= count; index++) {
// 重置序号
$("#" + table.options.id).bootstrapTable('updateRow', { index: index, row: { index: parseInt(index + 1) } })
}
}
};