feat: 更新主窗口逻辑,修复光标定位问题并调整数据库字段处理

This commit is contained in:
zhu-mengmeng 2025-07-21 08:33:12 +08:00
parent bc2ca6919e
commit 5be57a052b
2 changed files with 4 additions and 1 deletions

Binary file not shown.

View File

@ -923,7 +923,7 @@ class MainWindow(MainWindowUI):
response = gc_api.get_gc_info(gc_note)
if response.get("status", False):
gc_info = response.get("data", {})
self._current_gc_qd = gc_info.get("qd",0)
self._current_gc_qd = gc_info.get("qd","")
self._current_gc_sc_gch = gc_info.get("sc_gch", "") # 保存sc_gch字段
# 先获取当前 info_table 已有的数据
order_info = {}
@ -1000,6 +1000,9 @@ class MainWindow(MainWindowUI):
# 清空工程号输入框
self.order_edit.clear()
# 将光标重新定位到工程号输入框
self.order_edit.setFocus()
logging.info(f"已生成虚拟工程号并直接添加: {virtual_gc_note}")
except Exception as e: