fix(erp): 修复采购计划到货统计准确性问题

- 直接从到货明细重新计算到货/在途统计数据,避免数据库缓存导致的数据不准确
- 更新在途状态判断逻辑,在途等于所有已上传但尚未到货的卷,不论WMS中是否有记录
- 移除未到货状态,未到货的全部计入在途状态
- 立即加载详情而不等待WMS刷新,提升用户体验
- 在WMS钢卷导出功能中添加钢卷ID字段支持
This commit is contained in:
2026-07-04 14:19:25 +08:00
parent d42c4c5a94
commit ec40ab90ba
5 changed files with 36 additions and 8 deletions

View File

@@ -209,7 +209,9 @@ export default {
this.activeTab = 'all'
this.current = { ...p }
this.deliveryList = []
// 打开即静默按钢卷表复核一次到货状态
// 立即加载详情,不等待 WMS 刷新
this.refreshDetail()
// 后台静默按钢卷表复核一次到货状态
const planId = p.planId
refreshArrival(planId).catch(() => {}).finally(() => {
if (this.current.planId === planId) this.refreshDetail()
@@ -238,13 +240,11 @@ export default {
},
statusText(row) {
if (row.arrived === 1) return '已到货'
if (row.inTransit === 1) return '在途'
return '未到'
return '在途'
},
statusClass(row) {
if (row.arrived === 1) return 'yes'
if (row.inTransit === 1) return 'transit'
return 'no'
return 'transit'
},
handleUploadSuccess(res) {
if (res.code === 200) {