Compare commits
1 Commits
bugfix/518
...
284818bd8f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
284818bd8f |
@@ -1944,6 +1944,30 @@ function handleQuoteBilling() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 🔧 修复 Bug #445: 过滤掉已生成医嘱的项目,避免"引用计费"后已提交项目重新出现在"待生成"列表
|
||||||
|
// 原因:后端返回的计费数据中,已生成医嘱的项目可能没有 requestId 字段
|
||||||
|
// 方案:用 chargeItemId/requestId/id 与已有的 temporaryAdvices 做匹配,排除已生成项目
|
||||||
|
if (temporaryAdvices.value.length > 0) {
|
||||||
|
const existingAdviceIds = new Set()
|
||||||
|
temporaryAdvices.value.forEach(a => {
|
||||||
|
const om = a.originalMedicine || {}
|
||||||
|
if (om.requestId) existingAdviceIds.add(String(om.requestId))
|
||||||
|
if (om.chargeItemId) existingAdviceIds.add(String(om.chargeItemId))
|
||||||
|
if (om.id) existingAdviceIds.add(String(om.id))
|
||||||
|
})
|
||||||
|
if (existingAdviceIds.size > 0) {
|
||||||
|
temporaryBillingMedicines.value = temporaryBillingMedicines.value.filter(m => {
|
||||||
|
const mRequestId = m.requestId != null ? String(m.requestId) : null
|
||||||
|
const mChargeItemId = m.chargeItemId != null ? String(m.chargeItemId) : null
|
||||||
|
const mId = m.id != null ? String(m.id) : null
|
||||||
|
if (mRequestId && existingAdviceIds.has(mRequestId)) return false
|
||||||
|
if (mChargeItemId && existingAdviceIds.has(mChargeItemId)) return false
|
||||||
|
if (mId && existingAdviceIds.has(mId)) return false
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
temporaryMedicalLoading.value = false // 🔧 新增:加载完成
|
temporaryMedicalLoading.value = false // 🔧 新增:加载完成
|
||||||
ElMessage.success('已成功引用最新计费药品信息!')
|
ElMessage.success('已成功引用最新计费药品信息!')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user