Remove manual exit prompt in main script to allow automated execution. Add logic in DiscreteMaterialPlanCleaner to navigate the "Material Plan" popup, handling nested iframes and waiting for data to load. Implement iteration over material details to extract codes and names, handling cases where no details exist.
27 lines
558 B
Python
27 lines
558 B
Python
"""
|
|
主程序 - 使用离散备料计划维护数据清理工具
|
|
"""
|
|
import os
|
|
from utils.离散备料计划维护数据清理 import DiscreteMaterialPlanCleaner
|
|
|
|
|
|
def main():
|
|
# 创建清理器
|
|
cleaner = DiscreteMaterialPlanCleaner(
|
|
username="BLDpengqiangqiang",
|
|
password="Cqbld123456.",
|
|
headless=False,
|
|
verbose=True
|
|
)
|
|
|
|
# 设置文件路径
|
|
order_id_file = os.path.join(os.path.dirname(__file__), "orderID.txt")
|
|
|
|
# 执行清理
|
|
cleaner.clean(order_id_file)
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|