diff --git a/db/jtDB.db b/db/jtDB.db index 6ca54fc..3afa978 100644 Binary files a/db/jtDB.db and b/db/jtDB.db differ diff --git a/widgets/main_window.py b/widgets/main_window.py index 3a017ad..76c58bd 100644 --- a/widgets/main_window.py +++ b/widgets/main_window.py @@ -734,15 +734,24 @@ class MainWindow(MainWindowUI): if response.get("status", False): gc_info = response.get("data", {}) self._current_gc_qd = gc_info.get("qd",0) - self.update_info_table({"qd": self._current_gc_qd}) + # 先获取当前 info_table 已有的数据 + order_info = {} + for field_name, label in self.info_values.items(): + order_info_key = self.FIELD_MAPPING.get(field_name) + if order_info_key: + order_info[order_info_key] = label.text() + # 更新/补充 qd 字段 + order_info["qd"] = self._current_gc_qd + # 再调用 update_info_table + self.update_info_table(order_info) self.add_new_inspection_row(gc_note, self._current_order_code) else: self.add_new_inspection_row(gc_note, self._current_order_code) - + else: logging.warning("工程号为空") QMessageBox.warning(self, "输入提示", "请输入有效的工程号") - + def add_new_inspection_row(self, gc_note, order_code): """在微丝产线表格中添加一条新记录,添加到表格末尾