Browse Source

2026-08-19

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

24
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
}
})
},
// 分页处理

4
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 = ''

Loading…
Cancel
Save