| | |
| | | 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 |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | // 搜索供应商 |
| | | onFilterSearch(searchText){ |
| | | this.searchSupplierName = searchText ??'' |
| | | this.pagerOptions.currPage = 1 |
| | | this.getSupplierList() |
| | | }, |
| | | // 搜索产品 |
| | | onProductFilterSearch(searchText){ |
| | | this.productPagerOptions.currPage = 1 |
| | | this.getProductList('name', searchText) |
| | | }, |
| | | // 新建供应商 |