| | |
| | | </div> |
| | | |
| | | <van-list |
| | | style="margin-bottom: 50px" |
| | | v-model="loadings" |
| | | :finished="finished" |
| | | :finished-text="$t('hj43')" |
| | |
| | | this.finished = false; |
| | | this.listArr = []; |
| | | this.pageNumVal = 1; |
| | | this.getStock(e, this.zxactive); |
| | | this.loadings = true; |
| | | this.getStock(e, this.zxactive, 1); |
| | | }, |
| | | zxactive(e) { |
| | | this.finished = false; |
| | | this.listArr = []; |
| | | this.pageNumVal = 1; |
| | | this.getStock(this.active, e); |
| | | this.loadings = true; |
| | | this.getStock(this.active, e, 1); |
| | | }, |
| | | sousuo(e) { |
| | | this.finished = false; |
| | | this.listArr = []; |
| | | this.pageNumVal = 1; |
| | | this.getStock(this.active, this.zxactive); |
| | | this.loadings = true; |
| | | this.getStock(this.active, this.zxactive, 1); |
| | | }, |
| | | }, |
| | | data() { |
| | |
| | | mounted() { |
| | | this.listArr = []; |
| | | this.pageNumVal = 1; |
| | | this.getStock(this.active, this.zxactive); |
| | | this.getStock(this.active, this.zxactive, 1); |
| | | }, |
| | | methods: { |
| | | filterSH(val) { |
| | |
| | | }); |
| | | }, |
| | | // 获取列表 |
| | | getStock: handleDt.debounce(async function (a, b) { |
| | | getStock: handleDt.debounce(async function (a, b, c) { |
| | | a = this.active; |
| | | let stockType = ""; |
| | | if (a !== "") { |
| | | let array = this.tabsList.filter((item) => item.key === a); |
| | | stockType = array[0].name; |
| | | } |
| | | let pageNumVal = c || this.pageNumVal; |
| | | let opt = { |
| | | pageNum: this.pageNumVal, |
| | | pageNum: pageNumVal, |
| | | pageSize: 15, |
| | | stockPlate: "", |
| | | keyWords: this.sousuo, |
| | |
| | | orderBy: "", |
| | | }; |
| | | let data = await api.getStockByType(opt); |
| | | this.loading = false; |
| | | this.loadings = false; |
| | | if (data.status === 0) { |
| | | if (this.listArr.length >= data.data.total) { |
| | | console.log(data.data.list.length < 15); |
| | | if (data.data.list.length < 15) { |
| | | this.finished = true; |
| | | } |
| | | if (this.pageNumVal !== 1) { |
| | | if (pageNumVal !== 1) { |
| | | this.listArr = [...this.listArr, ...data.data.list]; |
| | | } else { |
| | | this.listArr = data.data.list; |
| | | } |
| | | } else { |
| | | this.loading = false; |
| | | this.finished = true; |
| | | } |
| | | }, 500), |
| | | onLoads() { |
| | | if (!this.loading) { |
| | | this.pageNumVal++; |
| | | this.loading = true; |
| | | this.getStock(); |
| | | } |
| | | console.log(333333); |
| | | // if (!this.loading) { |
| | | this.pageNumVal++; |
| | | this.loadings = true; |
| | | this.getStock(); |
| | | // } |
| | | }, |
| | | optionszx() {}, |
| | | }, |