Commit fc0de0cd authored by 邱阿朋's avatar 邱阿朋

refactor(app/vc): 修改报表下载方式并添加 Makefile 构建脚本

- 修改了报表下载的点击方式,使用 XPath定位替代了之前的 ID 定位
- 新增 Makefile构建脚本,实现了项目的安装、构建和清理功能
parent 805e1196
# 默认版本号
DEFAULT_VERSION := 1.0.0
VERSION ?= $(DEFAULT_VERSION)
# 镜像源与依赖文件
PIP_INDEX := https://mirrors.cloud.tencent.com/pypi/simple
REQ_FILE := requirements.txt
# pyinstaller 参数
PYI_FLAGS := -F --noconsole
.PHONY: all install build clean
all: install build
install:
uv pip install -i $(PIP_INDEX) -r $(REQ_FILE)
build:
@echo "version: $(VERSION)"
pyinstaller $(PYI_FLAGS) -n tools_gui_$(VERSION).exe tool_gui.py
pyinstaller $(PYI_FLAGS) -n super_gui_$(VERSION).exe super_gui.py
pyinstaller $(PYI_FLAGS) -n price_gui_$(VERSION).exe price_gui.py
clean:
rm -f *.spec
...@@ -40,7 +40,8 @@ class Spa(AutoInterface): ...@@ -40,7 +40,8 @@ class Spa(AutoInterface):
self.page.ele("#a-autoid-2-announce").click() self.page.ele("#a-autoid-2-announce").click()
self.page.wait(2) self.page.wait(2)
# 点击下载报表选项 # 点击下载报表选项
self.page.ele(f"#invoiceDownloads-{invoice_id}_2").click() # self.page.ele(f"#invoiceDownloads-{invoice_id}_2").click()
self.page.ele('xpath://li[a[contains(text(), "Backup report")]]/a').click()
self.page.wait(1) self.page.wait(1)
# 获取报表表单内容 # 获取报表表单内容
report_table_html = self.page.ele("#backup-report-table").html report_table_html = self.page.ele("#backup-report-table").html
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment