fix: 修复搜索供应商列表结果为空时产品列表不为空的bug, 修复产品列表翻页后搜索供应商时产品列表页码未重置的bug, 修复供应商列表/产品列表/采购订单/质检单/退货单翻页后再搜索页码未重置的bug
4个文件已修改
24 ■■■■■ 已修改文件
src/views/purchaseManage/purchase/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchaseManage/quality/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchaseManage/returned/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/supplierManage/supplier/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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()
    },
    // 新建
src/views/purchaseManage/quality/index.vue
@@ -154,6 +154,7 @@
    },
    onFilterSearch(searchText){
      this.search = searchText ?? ''
      this.pagerOptions.currPage = 1
      this.getData()
    },
   
src/views/purchaseManage/returned/index.vue
@@ -146,6 +146,7 @@
    },
    onFilterSearch(searchText){
      this.search = searchText ?? ''
      this.pagerOptions.currPage = 1
      this.getData()
    },
   
src/views/supplierManage/supplier/index.vue
@@ -280,7 +280,17 @@
          this.$nextTick(() => {
            this.$refs.tableSupplier.$refs.table.setCurrentRow(this.tableList.tableInfomation[0])
          })
          // 重新获取供应商列表后应该重置产品列表页码
          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)
    },
    // 新建供应商