Compare commits
2 Commits
develop
...
300d53bdc6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
300d53bdc6 | ||
|
|
284818bd8f |
@@ -926,24 +926,37 @@ function handleDelete() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hasSavedItem) {
|
if (hasSavedItem) {
|
||||||
// 有已保存的行,调用后端API删除
|
// 🔧 Bug #454: 删除前弹出确认提示,告知用户将级联删除关联检验申请单
|
||||||
|
const hasLabItem = deleteList.some(item => item.adviceType === 3);
|
||||||
|
const confirmMsg = hasLabItem
|
||||||
|
? '删除此医嘱将同时删除关联的检验申请单,是否确认删除?'
|
||||||
|
: '确认删除选中的医嘱项目吗?';
|
||||||
|
|
||||||
|
proxy.$modal.confirm(confirmMsg).then(() => {
|
||||||
savePrescription({ adviceSaveList: deleteList }).then((res) => {
|
savePrescription({ adviceSaveList: deleteList }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
proxy.$modal.msgSuccess('操作成功');
|
proxy.$modal.msgSuccess('操作成功');
|
||||||
getListInfo(false);
|
getListInfo(false);
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// 只有新增行,已经在前端删除完成
|
|
||||||
proxy.$modal.msgSuccess('操作成功');
|
|
||||||
}
|
|
||||||
|
|
||||||
expandOrder.value = [];
|
expandOrder.value = [];
|
||||||
groupIndexList.value = [];
|
groupIndexList.value = [];
|
||||||
groupList.value = [];
|
groupList.value = [];
|
||||||
isAdding.value = false;
|
isAdding.value = false;
|
||||||
adviceQueryParams.value.adviceType = undefined;
|
adviceQueryParams.value.adviceType = undefined;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
// 用户取消删除
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 只有新增行,已经在前端删除完成
|
||||||
|
proxy.$modal.msgSuccess('操作成功');
|
||||||
|
expandOrder.value = [];
|
||||||
|
groupIndexList.value = [];
|
||||||
|
groupList.value = [];
|
||||||
|
isAdding.value = false;
|
||||||
|
adviceQueryParams.value.adviceType = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function handleNumberClick(item, index) {
|
function handleNumberClick(item, index) {
|
||||||
prescriptionList.value[index].unitPrice = item.price;
|
prescriptionList.value[index].unitPrice = item.price;
|
||||||
|
|||||||
@@ -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