feat: Web 表格编辑、易耗品出库单自动生成与文档完善

- 新增 fill_consumable_doc,根据 CSV 填写 Word 出库单(宋体五号)
- Web 处理完成后自动生成出库单并提供下载
- 前端拆分为 static 资源,支持在线编辑 CSV 与分步提交财务系统
- 补充 API.md、README(含 Mermaid 数据流)及 config.example.json

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wandering
2026-05-26 14:17:26 +08:00
parent 70f61be3aa
commit a72c4ffaab
12 changed files with 1674 additions and 442 deletions

View File

@@ -297,23 +297,13 @@ class ReimburseBot:
for i, inv in enumerate(invoices):
file_path = attachment_files[i] if i < len(attachment_files) else None
self.page.click("#insertAcc", timeout=5000)
self.page.wait_for_timeout(1000)
try:
self._wait_for("#insertAcc", timeout=20000) # 等待增加按钮出现
self.page.click("#insertAcc", timeout=5000) #点击增加按钮出现
self._wait_for("#fjlx", timeout=5000)
except Exception:
pass
try:
self.page.select_option("#fjlx", "1")
except Exception:
pass
try:
explanation = f"{inv['item_name']} - {inv['invoice_no']}"
self.page.fill("#fpsmxx", explanation)
self.page.fill("#fpsmxx", explanation)
except Exception:
pass
@@ -323,16 +313,14 @@ class ReimburseBot:
self.page.wait_for_timeout(1000)
except Exception as e:
log.error(f"文件上传失败: {e}")
try:
self.page.click("#cjtj", timeout=5000)
self.page.wait_for_timeout(1500)
except Exception:
try:
self.page.press("body", "Escape")
except Exception:
pass
log.info("上传附件完成")
except Exception as e:
log.error(f"附件上传失败: {e}")
self._screenshot("step6_error")