From b47491974d81fce3bc059791ba8ae41ee8f5e99b Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 17 Mar 2023 10:48:01 +0800
Subject: [PATCH] 后台修改

---
 src/main/resources/templates/febs/views/modules/goods/goodsList.html |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsList.html b/src/main/resources/templates/febs/views/modules/goods/goodsList.html
index e5e0519..a56a05d 100644
--- a/src/main/resources/templates/febs/views/modules/goods/goodsList.html
+++ b/src/main/resources/templates/febs/views/modules/goods/goodsList.html
@@ -104,6 +104,9 @@
             tableIns;
 
         form.render();
+        let currPageGoods = 1;//首先默认值为1,防止出错
+        //获取当前页
+        currPageGoods = $view.find(".layui-laypage-em").next().html();
 
         // 表格初始化
         initTable();
@@ -194,14 +197,14 @@
         // 查询按钮
         $query.on('click', function () {
             var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type});
-            tableIns.reload({where: params, page: {curr: 1}});
+            tableIns.reload({where: params, page: {curr: currPageGoods}});
         });
 
         // 刷新按钮
         $reset.on('click', function () {
             $searchForm[0].reset();
             sortObject.type = 'null';
-            tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
+            tableIns.reload({where: getQueryParams(), page: {curr: currPageGoods}, initSort: sortObject});
         });
 
         $add.on('click', function () {

--
Gitblit v1.9.1