mirror of https://gitee.com/y_project/RuoYi.git
优化主子表单删方法
parent
977ceb562e
commit
53bb1da7a1
|
@ -465,9 +465,8 @@ var sub = {
|
|||
}
|
||||
$("#" + table.options.id).bootstrapTable('remove', { field: subColumn, values: ids });
|
||||
},
|
||||
delRowByIndex: function(defindex, index) {
|
||||
delRowByIndex: function(value) {
|
||||
sub.editRow();
|
||||
var value = $.common.isNotEmpty(index) ? index : defindex;
|
||||
$("#" + table.options.id).bootstrapTable('remove', { field: "index", values: [value] });
|
||||
sub.editRow();
|
||||
},
|
||||
|
|
|
@ -171,7 +171,8 @@
|
|||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + $.table.serialNumber(index) + '\', \'' + row.index + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
|
|
@ -351,7 +351,8 @@
|
|||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + $.table.serialNumber(index) + '\', \'' + row.index + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
|
|
@ -363,7 +363,8 @@
|
|||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + $.table.serialNumber(index) + '\', \'' + row.index + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue