From 98893b8c44ad3c4d4277e1503457a767a77f1409 Mon Sep 17 00:00:00 2001 From: SkyLi Date: Fri, 15 May 2026 17:16:37 +0800 Subject: [PATCH] =?UTF-8?q?=5Fsave=5Ffixed=5Ffrom=5Fentries=E7=A7=BB?= =?UTF-8?q?=E5=88=B0=E9=AA=8C=E8=AF=81=E4=B9=8B=E5=89=8D=EF=BC=8C=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E4=B8=8B=E6=8B=89=E9=80=89=E6=8B=A9=E7=9A=84=E4=BA=A7?= =?UTF-8?q?=E5=93=81/=E5=AE=A2=E6=88=B7=E5=B7=B2=E5=86=99=E5=85=A5config?= =?UTF-8?q?=E5=86=8D=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index b571198..3c7ac30 100644 --- a/main.py +++ b/main.py @@ -630,6 +630,9 @@ class App: messagebox.showwarning("提示", "Excel 中没有数据") return + # 保存固定值到配置文件(必须在验证之前,确保用户选择的产品/客户已写入 config) + self._save_fixed_from_entries() + # 验证必要字段是否有数据来源(固定值 > Excel > 默认值) fixed_values = get_fixed_values(self.config) defaults = get_defaults(self.config) @@ -646,9 +649,6 @@ class App: self.paused = False self._set_controls_state("running") - # 保存固定值到配置文件 - self._save_fixed_from_entries() - # 清空结果表格 for item in self.result_tree.get_children(): self.result_tree.delete(item)