# -*- coding:utf-8 -*-
# 作者：齐振鋆
# 日期：2023/3/12
# 描述: 库存出入记录
import logging
import allure

from component.GuKeYiTiHua import iframe, list_page, menu, button, order_detail_table
from component.GuKeYiTiHua.StorageManage import first_menu

log = logging.getLogger(__name__)


class StorageAccessRecord(object):
    third_menu = '库存出入记录'

    def __init__(self):
        self.iframe = iframe
        self.menu = menu
        self.list_page = list_page
        self.button = button

    @allure.step('打开菜单：{}'.format(third_menu))
    def open_menu_storage_access_record(self):
        self.iframe.out_frame()
        self.menu.open_menu(first_menu, self.third_menu)

    @allure.step('查询：{}'.format(third_menu))
    def storage_access_record_search(self, tap_name=None, field='订单号', text=None, count=1):
        self.list_page.order_search(self.third_menu, tap_name, field, text, count)
