diff --git a/openhis-ui-vue3/src/views/doctorstation/components/infectiousReport/index.vue b/openhis-ui-vue3/src/views/doctorstation/components/infectiousReport/index.vue index e777f337..2fd94a39 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/infectiousReport/index.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/infectiousReport/index.vue @@ -813,9 +813,14 @@ async function initForm() { const res = await getNextCardNo(orgCode); if (res.code === 200 && res.data) { cardNo = res.data; + } else { + // 🔧 BugFix#412: 如果API返回失败,生成临时卡号避免保存失败 + cardNo = 'TEMP_' + Date.now(); } } catch (err) { console.error('获取卡片编号失败:', err); + // 🔧 BugFix#412: 如果API调用异常,生成临时卡号 + cardNo = 'TEMP_' + Date.now(); } form.value = {