From 0f8844dcb400fcdee4ea7831336a6aff382a8cc2 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期六, 23 九月 2023 14:59:16 +0800
Subject: [PATCH] fix: 修复搜索供应商列表结果为空时产品列表不为空的bug, 修复产品列表翻页后搜索供应商时产品列表页码未重置的bug, 修复供应商列表/产品列表/采购订单/质检单/退货单翻页后再搜索页码未重置的bug
---
src/views/supplierManage/supplier/index.vue | 14 +++++++++++++-
src/views/purchaseManage/purchase/index.vue | 10 +---------
src/views/purchaseManage/returned/index.vue | 1 +
src/views/purchaseManage/quality/index.vue | 1 +
4 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue
index 0511bbe..faee6f8 100644
--- a/src/views/purchaseManage/purchase/index.vue
+++ b/src/views/purchaseManage/purchase/index.vue
@@ -156,17 +156,9 @@
})
},
// 鎼滅储
- searchClick(val, content) {
- console.log(val, content)
- this.search = content
- this.getData()
- },
- resetClick() {
- this.search = ""
- this.getData()
- },
onFilterSearch(searchText){
this.search = searchText ?? ''
+ this.pagerOptions.currPage = 1
this.getData()
},
// 鏂板缓
diff --git a/src/views/purchaseManage/quality/index.vue b/src/views/purchaseManage/quality/index.vue
index e38a6d2..8b2521d 100644
--- a/src/views/purchaseManage/quality/index.vue
+++ b/src/views/purchaseManage/quality/index.vue
@@ -154,6 +154,7 @@
},
onFilterSearch(searchText){
this.search = searchText ?? ''
+ this.pagerOptions.currPage = 1
this.getData()
},
diff --git a/src/views/purchaseManage/returned/index.vue b/src/views/purchaseManage/returned/index.vue
index fc773c5..ce8dc79 100644
--- a/src/views/purchaseManage/returned/index.vue
+++ b/src/views/purchaseManage/returned/index.vue
@@ -146,6 +146,7 @@
},
onFilterSearch(searchText){
this.search = searchText ?? ''
+ this.pagerOptions.currPage = 1
this.getData()
},
diff --git a/src/views/supplierManage/supplier/index.vue b/src/views/supplierManage/supplier/index.vue
index 985fb9a..0755ae7 100644
--- a/src/views/supplierManage/supplier/index.vue
+++ b/src/views/supplierManage/supplier/index.vue
@@ -280,7 +280,17 @@
this.$nextTick(() => {
this.$refs.tableSupplier.$refs.table.setCurrentRow(this.tableList.tableInfomation[0])
})
- this.getProductList()
+
+ // 閲嶆柊鑾峰彇渚涘簲鍟嗗垪琛ㄥ悗搴旇閲嶇疆浜у搧鍒楄〃椤电爜
+ this.productPagerOptions.currPage = 1;
+ // 濡傛灉渚涘簲鍟嗗垪琛ㄤ负绌�,鍒欏彲鎻愪緵浜у搧鍒楄〃涔熷簲涓虹┖
+ if (list.length){
+ this.getProductList()
+ }else {
+ this.productTableList.tableInfomation=[]
+ this.productPagerOptions.currPage = 1;
+ this.productPagerOptions.totalCount = 0
+ }
}
})
},
@@ -306,10 +316,12 @@
// 鎼滅储渚涘簲鍟�
onFilterSearch(searchText){
this.searchSupplierName = searchText ??''
+ this.pagerOptions.currPage = 1
this.getSupplierList()
},
// 鎼滅储浜у搧
onProductFilterSearch(searchText){
+ this.productPagerOptions.currPage = 1
this.getProductList('name', searchText)
},
// 鏂板缓渚涘簲鍟�
--
Gitblit v1.8.0