diff --git a/src/main/resources/templates/pages/depository/table-stock.html b/src/main/resources/templates/pages/depository/table-stock.html index cb156918..c489f917 100644 --- a/src/main/resources/templates/pages/depository/table-stock.html +++ b/src/main/resources/templates/pages/depository/table-stock.html @@ -145,6 +145,7 @@ // 用于保证导入时点击只导入一次 let flagForImport = true; + let reqForPublic = {}; layui.use(['form', 'table', 'upload'], function () { var $ = layui.jquery, @@ -360,6 +361,7 @@ if (data.materialTypeId !== '') { req.materialTypeId = data.materialTypeId; } + reqForPublic = req; //执行搜索重载 table.reload('currentTableId', { url: '/material/findInventory', @@ -405,7 +407,8 @@ url: '/material/findInventory', page: { curr: 1 - } + }, + where:reqForPublic }, 'data'); }); } else { @@ -418,7 +421,8 @@ url: '/material/findInventory', page: { curr: 1 - } + }, + where:reqForPublic }, 'data'); }) } @@ -547,7 +551,7 @@ page: { curr: 1 } - , where: {} + , where:reqForPublic }, 'data'); } }); @@ -683,7 +687,8 @@ url: '/material/findInventory', page: { curr: 1 - } + }, + where:reqForPublic }, 'data'); }) }, @@ -758,7 +763,8 @@ url: '/material/findInventory', page: { curr: 1 - } + }, + where:reqForPublic }, 'data'); } }); @@ -767,10 +773,6 @@ }); return false; } - - $('body').on('click', '[data-refresh]', function () { - location.reload(); - }) }); diff --git a/target/classes/templates/pages/depository/table-stock.html b/target/classes/templates/pages/depository/table-stock.html index cb156918..c489f917 100644 --- a/target/classes/templates/pages/depository/table-stock.html +++ b/target/classes/templates/pages/depository/table-stock.html @@ -145,6 +145,7 @@ // 用于保证导入时点击只导入一次 let flagForImport = true; + let reqForPublic = {}; layui.use(['form', 'table', 'upload'], function () { var $ = layui.jquery, @@ -360,6 +361,7 @@ if (data.materialTypeId !== '') { req.materialTypeId = data.materialTypeId; } + reqForPublic = req; //执行搜索重载 table.reload('currentTableId', { url: '/material/findInventory', @@ -405,7 +407,8 @@ url: '/material/findInventory', page: { curr: 1 - } + }, + where:reqForPublic }, 'data'); }); } else { @@ -418,7 +421,8 @@ url: '/material/findInventory', page: { curr: 1 - } + }, + where:reqForPublic }, 'data'); }) } @@ -547,7 +551,7 @@ page: { curr: 1 } - , where: {} + , where:reqForPublic }, 'data'); } }); @@ -683,7 +687,8 @@ url: '/material/findInventory', page: { curr: 1 - } + }, + where:reqForPublic }, 'data'); }) }, @@ -758,7 +763,8 @@ url: '/material/findInventory', page: { curr: 1 - } + }, + where:reqForPublic }, 'data'); } }); @@ -767,10 +773,6 @@ }); return false; } - - $('body').on('click', '[data-refresh]', function () { - location.reload(); - }) });