Browse Source

主子表根据序号删除方法加入表格ID参数

RuoYi 3 years ago
parent
commit
f1233c85d7
1 changed files with 3 additions and 2 deletions
  1. 3 2
      ruoyi-admin/src/main/resources/static/ruoyi/js/common.js

+ 3 - 2
ruoyi-admin/src/main/resources/static/ruoyi/js/common.js

@@ -465,9 +465,10 @@ var sub = {
         }
         $("#" + table.options.id).bootstrapTable('remove', { field: subColumn, values: ids });
     },
-    delRowByIndex: function(value) {
+    delRowByIndex: function(value, tableId) {
+    	var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
     	sub.editRow();
-        $("#" + table.options.id).bootstrapTable('remove', { field: "index", values: [value] });
+        $("#" + currentId).bootstrapTable('remove', { field: "index", values: [value] });
         sub.editRow();
     },
     addRow: function(row, tableId) {