Пример #1
0
def budget_ri_down2(driver):
    choice_menu(driver, '支出管理', '报销申请')
    start_NORI(driver)
    choice_budget(driver)
    edit_money1(driver, '500')
    enter_apartment(driver)
    choice_path(driver, '报销申请单自审')
    driver.find_element(By.XPATH, "//input[@id='attachmentNumber']").send_keys(5)
    edit_matter1(driver, '核销调减使用')
    pay_setting(driver)
    RIsubmit(driver)
    agree(driver)
    write_off(driver)
    time.sleep(0.5)
    choice_menu(driver, '预算管理', '调整申请')
    time.sleep(3)
    start_add(driver, '+ 发起核销金额调整 ')
    time.sleep(0.1)
    driver.find_element(By.XPATH, "//li[text()='核销金额调减']").click()
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//div[@id='globalLayoutContent']/div/div/div[3]/div[3]/div/div["
                                  "2]/div/div/div/div/div[1]/div[2]/table/tbody/tr[1]").click()
    driver.find_element(By.XPATH, "//span[text()='下一步']/..").click()
    time.sleep(0.1)
    driver.find_element(By.XPATH, "//span[text()='下一步']/..").click()
    time.sleep(0.1)
    driver.find_element(By.XPATH, "//input[@placeholder='请输入调整已核销金额']").send_keys('100')
    driver.find_element(By.XPATH, "//span[text()='下一步']/..").click()
    enter_apartment(driver)
    choice_path(driver, '预算调整单自审')
    edit_matter(driver, '核销调减发起、撤销')
    submit(driver)
    cancel(driver)
    delete_bill(driver)
Пример #2
0
def no_detail_BA_PR1(driver):  # 无明细采购
    BA_for_PR(driver)
    time.sleep(0.5)
    start_BA_PR(driver)
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//span[text()='下一步']/..").click()
    edit_PR(driver)
    time.sleep(0.5)
    driver.execute_script(
        'var q = document.querySelector("#globalLayoutContent").scrollTo(0,1000)'
    )
    choice_supplier(driver)
    # sure_supplier(driver)
    submit(driver)
    agree(driver)
    choice_menu(driver, "采购管理", "采购审批")
    time.sleep(0.1)
    driver.find_element(
        By.XPATH,
        "//div[@class='ant-table-body']/table/tbody/tr[1]/td[1]/div").click()
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//button[text()='更多']").click()
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//button[text()='作废']").click()
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//span[text()='确 定']/..").click()
    driver.refresh()
    time.sleep(1)
    driver.find_element(By.XPATH, "//button[text()='更多']").click()
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//button[text()='删除']").click()
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//span[text()='确 定']/..").click()
Пример #3
0
def cancel_MA(driver):  # 撤销删除
    choice_menu(driver, '重要事项', '事项申请')
    start_add(driver, '发起申请')
    enter_apartment(driver)
    driver.find_element(By.XPATH, "//input[@id='amount']").send_keys('100')
    edit_matter(driver, '事项申请')
    submit(driver)
    cancel(driver)
    delete_bill(driver)
Пример #4
0
def AG_for_RI(driver):  # 新增框架协议,可用于报销/变更
    choice_menu(driver, '合同管理', '框架协议')
    start_add(driver, '+ 申请框架协议')
    enter_apartment(driver)
    enter_ct_type(driver)
    # enter_sign_user(driver)
    ag_enter_sign_user(driver)
    enter_pc_type(driver)
    choice_path(driver, '框架协议单自审')
    edit_ag(driver, '框架协议')
    submit(driver)
    agree(driver)
Пример #5
0
def budget_up2(driver):     # 撤销删除
    choice_menu(driver, '预算管理', '调整申请')
    start_add(driver, '+ 发起预算调整 ')
    time.sleep(0.1)
    driver.find_element(By.XPATH, "//li[text()='预算追加']").click()
    choice_budget(driver)
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//input[@placeholder='请输入调整预算金额']").send_keys('100')
    driver.find_element(By.XPATH, "//span[text()='下一步']/..").click()
    enter_apartment(driver)
    choice_path(driver, '预算调整单自审')
    edit_matter(driver, '预算追加发起、撤销、删除')
    submit(driver)
    cancel(driver)
    time.sleep(0.5)
    delete_bill(driver)
Пример #6
0
def invalid_MA(driver):  # 通过 作废
    choice_menu(driver, '重要事项', '事项申请')
    start_add(driver, '发起申请')
    enter_apartment(driver)
    driver.find_element(By.XPATH, "//input[@id='amount']").send_keys('100')
    edit_matter(driver, '事项申请')
    submit(driver)
    agree(driver)
    time.sleep(0.1)
    choice_menu(driver, '重要事项', '事项申请')
    time.sleep(0.5)
    driver.find_element(
        By.XPATH,
        "//div[@class='ant-table-body']/table/tbody/tr[1]/td[1]/div").click()
    time.sleep(1)
    invalid(driver)
Пример #7
0
def change_AG(driver):
    AG_for_RI(driver)
    choice_menu(driver, '合同管理', '框架协议')
    driver.refresh()
    time.sleep(0.1)
    driver.find_element(
        By.XPATH,
        "//div[@class='ant-table-body']/table/tbody/tr[1]/td[1]/div").click()
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//button[text()='更多']").click()
    time.sleep(0.01)
    driver.find_element(By.XPATH, "//button[text()='协议变更']").click()
    time.sleep(0.5)
    driver.find_element(
        By.XPATH,
        "//textarea[@id='description']").send_keys('变更' +
                                                   time.strftime('%m%d%H%M%S'))
    submit(driver)
    agree(driver)
Пример #8
0
def copy_MA(driver):  # 驳回复制 通过
    choice_menu(driver, '重要事项', '事项申请')
    start_add(driver, '发起申请')
    enter_apartment(driver)
    driver.find_element(By.XPATH, "//input[@id='amount']").send_keys('100')
    edit_matter(driver, '事项申请')
    submit(driver)
    refuse(driver)
    time.sleep(0.1)
    choice_menu(driver, '重要事项', '事项申请')
    time.sleep(0.5)
    driver.find_element(
        By.XPATH,
        "//div[@class='ant-table-body']/table/tbody/tr[1]/td[1]/div").click()
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//button[text()='复制单据']").click()
    edit_matter(driver, '驳回复制')
    submit(driver)
    agree(driver)
Пример #9
0
def CS(driver):  # 发起议事会签
    choice_menu(driver, '重要事项', '议事会签')
    start_add(driver, "+ 发起会签")
    cs_date(driver)
    driver.find_element(
        By.XPATH,
        "//input[@id='location']").send_keys('地点' +
                                             time.strftime('%m%d%H%M%S'))
    cs_date(driver)
    enter_host_user(driver)
    enter_record_user(driver)
    enter_cs_type(driver)
    edit_matter1(driver, '会签测试')
    choice_user(driver)
    driver.find_element(By.XPATH, "//span[text()='下一步']/..").click()
    time.sleep(0.5)
    driver.find_element(
        By.XPATH, "//textarea").send_keys('测试' + time.strftime('%m%d%H%M%S'))
    submit(driver)
Пример #10
0
def budget_down3(driver):     # 驳回删除
    choice_menu(driver, '预算管理', '调整申请')
    start_add(driver, '+ 发起预算调整 ')
    time.sleep(0.1)
    driver.find_element(By.XPATH, "//li[text()='预算追加']").click()
    choice_budget(driver)
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//input[@placeholder='请输入调整预算金额']").send_keys('100')
    driver.find_element(By.XPATH, "//span[text()='下一步']/..").click()
    enter_apartment(driver)
    choice_path(driver, '预算调整单自审')
    edit_matter(driver, '预算调减发起、驳回、删除')
    submit(driver)
    refuse(driver)
    time.sleep(0.5)
    choice_menu(driver, '预算管理', '调整申请')
    time.sleep(1)
    driver.find_element(By.XPATH, "//div[@class='ant-table-body']/table/tbody/tr[1]/td[1]/div").click()
    time.sleep(0.5)
    delete_bill(driver)
Пример #11
0
def budget_down1(driver):     # 撤销复制单据
    choice_menu(driver, '预算管理', '调整申请')
    start_add(driver, '+ 发起预算调整 ')
    time.sleep(0.1)
    driver.find_element(By.XPATH, "//li[text()='预算追加']").click()
    choice_budget(driver)
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//input[@placeholder='请输入调整预算金额']").send_keys('100')
    driver.find_element(By.XPATH, "//span[text()='下一步']/..").click()
    enter_apartment(driver)
    choice_path(driver, '预算调整单自审')
    edit_matter(driver, '预算调减发起、撤销')
    submit(driver)
    cancel(driver)
    time.sleep(0.5)
    driver.find_element(By.XPATH, "//button[text()='复制单据']").click()
    time.sleep(0.1)
    driver.find_element(By.XPATH, "//span[text()='下一步']/..").click()
    edit_matter(driver, '、复制单据、通过')
    submit(driver)
    agree(driver)