|
|
|
@ -1002,7 +1002,9 @@ export default { |
|
|
|
multiPartNoTip: '', |
|
|
|
// 导出相关 |
|
|
|
exportName: "实时库存数据", |
|
|
|
exportLoading: false |
|
|
|
exportLoading: false, |
|
|
|
// 主列表请求序号,避免旧请求覆盖新分页结果 |
|
|
|
mainDataRequestId: 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
@ -1100,11 +1102,18 @@ export default { |
|
|
|
this.getMainData(); |
|
|
|
}, |
|
|
|
getMainData(){ |
|
|
|
const requestId = ++this.mainDataRequestId |
|
|
|
this.dataListLoading = true |
|
|
|
const requestedPage = this.pageIndex |
|
|
|
this.searchData.limit = this.pageSize |
|
|
|
this.searchData.page = requestedPage |
|
|
|
getKuCunLabelData(this.searchData).then(({data}) => { |
|
|
|
const queryData = { |
|
|
|
...this.searchData |
|
|
|
} |
|
|
|
getKuCunLabelData(queryData).then(({data}) => { |
|
|
|
if (requestId !== this.mainDataRequestId) { |
|
|
|
return |
|
|
|
} |
|
|
|
if (data.code === 0 && data.page) { |
|
|
|
const serverPageSize = Number(data.page.pageSize) || this.pageSize |
|
|
|
const totalCount = Number(data.page.totalCount) || 0 |
|
|
|
@ -1128,8 +1137,17 @@ export default { |
|
|
|
this.totalPage = 0 |
|
|
|
this.totalQty = 0 |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
if (requestId !== this.mainDataRequestId) { |
|
|
|
return |
|
|
|
} |
|
|
|
this.dataList = [] |
|
|
|
this.totalPage = 0 |
|
|
|
this.totalQty = 0 |
|
|
|
}).finally(() => { |
|
|
|
this.dataListLoading = false |
|
|
|
if (requestId === this.mainDataRequestId) { |
|
|
|
this.dataListLoading = false |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 分页处理 |
|
|
|
|