feat: add Tkinter GUI application for ERP automation tools

Implement a comprehensive GUI application with the following features:
- Data Extraction tab: Extract material plan data from ERP system
- Material Validation tab: Validate material status and match deletions
- Data Query tab: Query database for production order information
- Settings tab: Manage ERP, database, browser, and path configurations

Key components:
- MainWindow: Tabbed interface with status bar
- ConfigManager: JSON-based configuration management
- LogText: Custom read-only text widget with colored logging
- FileSelector: Reusable file/directory selection component
- ProgressDialog: Modal progress dialog for long operations

Technical details:
- Thread-safe UI updates using root.after()
- Stdout capture for legacy script integration
- Event-based readonly mode allowing copy/select operations
- Custom widget composition to avoid Tkinter ScrolledText issues

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-02-05 13:33:23 +08:00
parent c9e68a2bf0
commit 71621dc8a0
14 changed files with 1977 additions and 1 deletions

36
main_ui.py Normal file
View File

@@ -0,0 +1,36 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ERP 自动化工具 - GUI 版本
这是一个基于 Tkinter 的图形用户界面应用程序,
用于自动化 ERP 系统(用友 YonBIP的数据提取、校验和查询任务。
运行方式:
python main_ui.py
功能:
- 数据提取:从 ERP 系统提取备料计划数据
- 物料校验:校验物料状态并匹配待删除物料
- 数据查询:查询生产订单号等信息
- 设置管理:管理系统配置
"""
import tkinter as tk
from gui.main_window import MainWindow
def main():
"""主函数"""
# 创建根窗口
root = tk.Tk()
# 创建主窗口
app = MainWindow(root)
# 启动主事件循环
root.mainloop()
if __name__ == "__main__":
main()