diff --git a/src/views/modules/print/rePrintPoPart.vue b/src/views/modules/print/rePrintPoPart.vue index f5a253c..a76d61e 100644 --- a/src/views/modules/print/rePrintPoPart.vue +++ b/src/views/modules/print/rePrintPoPart.vue @@ -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 + } }) }, // 分页处理 diff --git a/src/views/modules/yieldReport/com_tid_upload_order.vue b/src/views/modules/yieldReport/com_tid_upload_order.vue index 11fdcbd..7956424 100644 --- a/src/views/modules/yieldReport/com_tid_upload_order.vue +++ b/src/views/modules/yieldReport/com_tid_upload_order.vue @@ -223,7 +223,7 @@ export default { scheduledDate: '' }, uploadForm: { - process: 'bonding', + process: '', machineNo: '', shift: '', operatorNo: '', @@ -270,7 +270,7 @@ export default { scheduledDate: scheduleData.scheduledDate || '' } - this.uploadForm.process = 'bonding' + this.uploadForm.process = '' this.uploadForm.machineNo = scheduleData.resourceId || scheduleData.resourceDesc || '' this.uploadForm.shift = scheduleData.shiftNo || '' this.uploadForm.operatorNo = ''