fix: Bug #412 门诊医生站传染病报告卡保存失败(添加临时卡号生成避免空值)

This commit is contained in:
2026-04-23 22:05:16 +08:00
parent 1fc2032aa8
commit 2d55387ba9

View File

@@ -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 = {