Browse Source

2026-08-19

实时库存管理查询优化
master
fengyuan_yang 1 month ago
parent
commit
d71ee4c163
  1. 22
      src/views/modules/print/rePrintPoPart.vue
  2. 4
      src/views/modules/yieldReport/com_tid_upload_order.vue

22
src/views/modules/print/rePrintPoPart.vue

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

4
src/views/modules/yieldReport/com_tid_upload_order.vue

@ -223,7 +223,7 @@ export default {
scheduledDate: '' scheduledDate: ''
}, },
uploadForm: { uploadForm: {
process: 'bonding',
process: '',
machineNo: '', machineNo: '',
shift: '', shift: '',
operatorNo: '', operatorNo: '',
@ -270,7 +270,7 @@ export default {
scheduledDate: scheduleData.scheduledDate || '' scheduledDate: scheduleData.scheduledDate || ''
} }
this.uploadForm.process = 'bonding'
this.uploadForm.process = ''
this.uploadForm.machineNo = scheduleData.resourceId || scheduleData.resourceDesc || '' this.uploadForm.machineNo = scheduleData.resourceId || scheduleData.resourceDesc || ''
this.uploadForm.shift = scheduleData.shiftNo || '' this.uploadForm.shift = scheduleData.shiftNo || ''
this.uploadForm.operatorNo = '' this.uploadForm.operatorNo = ''

Loading…
Cancel
Save