feat(programs): Excel 导入改为全量覆盖模式
已存在 code 的程序不再跳过,而是: - 用 Excel 中的字段更新 program(保留 id) - 删除该 program 的全部旧步骤 - 按 Excel 中的步骤重新写入 返回值变量名 importedCount -> processedCount 更准确。 Toast 文案同步:成功处理 / Excel 无有效数据。
This commit is contained in:
@@ -441,9 +441,9 @@ class _ProgramsPageState extends ConsumerState<ProgramsPage> {
|
||||
|
||||
if (!context.mounted) return;
|
||||
if (importedCount > 0) {
|
||||
ToastService.showSuccess(context, '成功导入 $importedCount 个程序');
|
||||
ToastService.showSuccess(context, '成功处理 $importedCount 个程序');
|
||||
} else {
|
||||
ToastService.showWarning(context, '未导入新程序(编号可能已存在)');
|
||||
ToastService.showWarning(context, 'Excel 中无有效程序数据');
|
||||
}
|
||||
} catch (e) {
|
||||
if (!context.mounted) return;
|
||||
|
||||
Reference in New Issue
Block a user