minor fixes

This commit is contained in:
2025-06-06 15:31:22 +08:00
parent 8c649a8a97
commit e56a9ae4b0

View File

@@ -408,6 +408,7 @@ def main(workbook=None):
if number not in modified:
# 选择商机
try:
selected = False
proforma = lookup(number, '形式发票', workbook).map(lambda x: x[0]).unwrap()
index = 1
dropdown = locate(".component-business-select .mm-selector-rendered")
@@ -419,9 +420,13 @@ def main(workbook=None):
if element.text.startswith(proforma):
driver.execute_script("arguments[0].scrollIntoView({ block: 'center', inline: 'nearest' });", element)
element.click()
selected = True
break
if not selected:
raise Exception('无法找到对应商机')
except Exception as e:
print(f"[警告] {number}: 录入商机时发生错误:{e}")
print(f"[警告] {number}: 关联商机时发生错误:{e}")
warn = True
# 编辑运费