作业按次登记/默认出勤补齐异常提示,日志写入失败不再影响登记结果

1. 作业按次登记路由:操作日志写入失败仅记录错误,不把成功登记变成 500
2. 作业登记与默认出勤提交:补 catch 分支,任何异常都会弹出具体错误提示(不再静默失败)
This commit is contained in:
canglan committed 2026-10-25 16:46:00 +08:00
1 parent 250acf35fd
commit c87f62baf7
3 files changed
+19 -12

No files matched your search

+3 -1
View File
@@ -251,8 +251,10 @@ async function submitDefaultAttendance() {
await loadExistingRecords();
loadAttendanceRecords();
} else {
showToast((res && res.message) || '默认出勤失败', 'error');
showToast((res && (res.message || res.detail)) || '默认出勤失败', 'error');
}
} catch (err) {
showToast('默认出勤失败:' + (err && err.message ? err.message : '未知错误'), 'error');
} finally {
btn.disabled = false;
btn.textContent = '开始补全';