Example #1
0
 def optionCounty(self, County=None):  # 传入区县
     e = self.driver.find_element_by_xpath('//*[@id="f3"]')  # 点击区县下拉框
     await_ele.judgeEle(e)  # 点击元素
     countys = self.driver.find_elements_by_xpath(r'//*[@id="f3"]/option')
     if County is None or County == "":  # 如果没有传入区县或传的是'""'则直接返回省份名组
         return countys
     elementaction.dropDownBox_text(self, countys, County)
Example #2
0
 def optionAuditState(self, AuditState=None):
     e = self.driver.find_element_by_name("auditStatus")
     await_ele.judgeEle(e)
     AuditStates = self.driver.find_elements_by_xpath(
         r'//select[@name="auditStatus"]/option')
     if AuditState is None or AuditState == "":  # 如果没有传入值或传的是'""'则直接返回库位名组
         return AuditStates
     elementaction.dropDownBox_text(self, AuditStates, AuditState)
 def optionOutPutState(self, OutPutState=None):  # 出入库状态
     e = self.driver.find_element_by_id("storageStatus")
     await_ele.judgeEle(e)  # 点击出入库状态
     # 选择出入库状态
     OutPutStates = self.driver.find_elements_by_xpath(r'//select[@id="storageStatus"]/option')
     if OutPutState is None or OutPutState == "":  # 如果没有传入值或传的是'""'则直接返回库位名组
         return OutPutStates
     elementaction.dropDownBox_text(self, OutPutStates, OutPutState)  # 出入库状态
 def optionAllotNumberState(self, AllotNumberState=None):    # 调拨单状态
     e = self.driver.find_element_by_id("auditStatus")
     await_ele.judgeEle(e)       # 点击调拨单状态
     # 选择调拨单状态
     AllotNumberStates = self.driver.find_elements_by_xpath(r'//select[@id="auditStatus"]/option')
     if AllotNumberState is None or AllotNumberState == "":       # 如果没有传入值或传的是'""'则直接返回库位名组
         return AllotNumberStates
     elementaction.dropDownBox_text(self, AllotNumberStates, AllotNumberState)     # 调拨单状态
 def optionAllotType(self, AllotType=None):    # 调拨类型
     e = self.driver.find_element_by_id("allotType")
     await_ele.judgeEle(e)       # 点击调拨类型
     # 选择调拨类型
     AllotTypes = self.driver.find_elements_by_xpath(r'//select[@id="allotType"]/option')
     if AllotType is None or AllotType == "":       # 如果没有传入调拨类型或传的是'""'则直接返回库位名组
         return AllotTypes
     elementaction.dropDownBox_text(self, AllotTypes, AllotType)     # 调拨类型
Example #6
0
 def optionProvince(self, Province=None):  # 传入省份
     e = self.driver.find_element_by_xpath('//*[@id="f1"]')  # 点击省份下拉框
     await_ele.judgeEle(e)  # 点击元素
     # 获取省份名组
     provinces = self.driver.find_elements_by_xpath(r'//*[@id="f1"]/option')
     if Province is None or Province == "":  # 如果没有传入省份或传的是'""'则直接返回省份名组
         return provinces
     elementaction.dropDownBox_text(self, provinces, Province)
Example #7
0
 def optionShopState(self, ShopState=None):  # 传入区县
     e = self.driver.find_element_by_id('shopStatus')  # 点击区县下拉框
     await_ele.judgeEle(e)  # 点击元素
     ShopStates = self.driver.find_elements_by_xpath(
         r'//*[@id="shopStatus"]/option')
     if ShopState is None or ShopState == "":  # 如果没有传入区县或传的是'""'则直接返回省份名组
         return ShopStates
     elementaction.dropDownBox_text(self, ShopStates, ShopState)
 def optionShopStatus(self, ShopStatus=None):
     await_ele.getAwaitEle('id', "shopStatus", self.driver,
                           second=20)  # 判断元素是否可以点击
     ShopStatuss = self.driver.find_elements_by_xpath(
         r'//*[@id="shopStatus"]/option')
     if ShopStatus is not None or ShopStatus == "":  # 如果没有传入仓库或传的是'""'则直接返回仓库名组
         return ShopStatuss
     elementaction.dropDownBox_text(self, ShopStatuss, ShopStatus)
 def optionCity(self, City=None):
     await_ele.getAwaitEle('id', "cityList", self.driver,
                           second=20)  # 判断元素是否可以点击
     Citys = self.driver.find_elements_by_xpath(
         r'//*[@id="cityList"]/option')
     if City is not None or City == "":  # 如果没有传入仓库或传的是'""'则直接返回仓库名组
         return Citys
     elementaction.dropDownBox_text(self, Citys, City)
Example #10
0
 def optionJoinWarehouse(self, WareHouse=None):  # 传入仓名
     e = self.driver.find_element_by_id("inWarehouseCode")     # 点击仓库下拉框
     await_ele.judgeEle(e)  # 点击元素
     # 获取仓库名组
     wareHouses = self.driver.find_elements_by_xpath(r'//select[@id="inWarehouseCode"]/option')
     if WareHouse is None or WareHouse == "":       # 如果没有传入仓库或传的是'""'则直接返回仓库名组
         return wareHouses
     elementaction.dropDownBox_text(self, wareHouses, WareHouse)     # 选择仓库名
Example #11
0
 def optionSign(self, Sign=None):  # 传入标记
     e = self.driver.find_element_by_name("sign")  # 获取标记下拉框元素
     await_ele.judgeEle(e, second=20)  # 点击元素
     # 获取标记名组
     Signs = self.driver.find_elements_by_xpath(r'//*[@name="sign"]/option')
     if Sign is None or Sign == "":  # 如果没有传入仓库或传的是'""'则直接返回仓库名组
         return Sign
     elementaction.dropDownBox_text(self, Signs, Sign)  # 选择仓库名
 def optionInventoryState(self, InventoryState=None):
     e = self.driver.find_element_by_name("storageStatus")
     await_ele.judgeEle(e)  # 点击元素
     InventoryStates = self.driver.find_elements_by_xpath(
         r'//select[@name="storageStatus"]/option')
     if InventoryState is None or InventoryState == "":  # 如果没有传入或传的是'""'则直接返回元素名组
         return InventoryStates
     elementaction.dropDownBox_text(self, InventoryStates, InventoryState)
 def optionOrderState(self, OrderState=None):
     e = self.driver.find_element_by_name("auditStatus")
     await_ele.judgeEle(e)  # 点击元素
     OrderStates = self.driver.find_elements_by_xpath(
         r'//select[@name="auditStatus"]/option')
     if OrderState is None or OrderState == "":  # 如果没有传入或传的是'""'则直接返回元素名组
         return OrderStates
     elementaction.dropDownBox_text(self, OrderStates, OrderState)
Example #14
0
 def optionJoinStorageLocation(self, StorageLocation=None):    # 传入库位名
     e = self.driver.find_element_by_id("inLocationCode")
     await_ele.judgeEle(e)       # 点击库位
     # 选择库位
     storageLocations = self.driver.find_elements_by_xpath(r'//select[@id="inLocationCode"]/option')
     if StorageLocation is None or StorageLocation == "":       # 如果没有传入库位或传的是'""'则直接返回库位名组
         return storageLocations
     elementaction.dropDownBox_text(self, storageLocations, StorageLocation)     # 选择库位名
 def optionWarehouse(self, WareHouse=None):
     e = self.driver.find_element_by_name("warehouseCode")
     await_ele.judgeEle(e)  # 点击元素
     # 获取仓库名组
     wareHouses = self.driver.find_elements_by_xpath(
         r'//select[@name="warehouseCode"]/option')
     if WareHouse is None or WareHouse == "":  # 如果没有传入或传的是'""'则直接返回元素名组
         return wareHouses
     elementaction.dropDownBox_text(self, wareHouses, WareHouse)
 def optionStockRemovalState(self, StockRemovalState=None):
     e = self.driver.find_element_by_name("outStatus")
     await_ele.judgeEle(e)  # 点击元素
     StockRemovalStates = self.driver.find_elements_by_xpath(
         r'//select[@name="outStatus"]/option')
     if StockRemovalState is None or StockRemovalState == "":  # 如果没有传入或传的是'""'则直接返回元素名组
         return StockRemovalStates
     elementaction.dropDownBox_text(self, StockRemovalStates,
                                    StockRemovalState)
Example #17
0
 def optionCity(self, WareHouse=None):  # 传入城市
     e = self.driver.find_element_by_id("cityList")  # 点击城市下拉框
     await_ele.judgeEle(e)  # 点击元素
     # 获取城市名组
     wareHouses = self.driver.find_elements_by_xpath(
         r'//select[@id="cityList"]/option')
     if WareHouse is None or WareHouse == "":  # 如果没有传入城市或传的是'""'则直接返回省份名组
         return wareHouses
     elementaction.dropDownBox_text(self, wareHouses, WareHouse)  # 选择城市名
Example #18
0
 def optionProvince(self, WareHouse=None):  # 传入省份
     e = self.driver.find_element_by_id("f1")  # 点击省份下拉框
     await_ele.judgeEle(e)  # 点击元素
     # 获取省份名组
     wareHouses = self.driver.find_elements_by_xpath(
         r'//select[@id="f1"]/option')
     if WareHouse is None or WareHouse == "":  # 如果没有传入省份或传的是'""'则直接返回省份名组
         return wareHouses
     elementaction.dropDownBox_text(self, wareHouses, WareHouse)  # 选择省份名
Example #19
0
 def optionCity(self, City=None):  # 传入城市
     e = self.driver.find_element_by_id("cityList")  # 点击城市下拉框
     await_ele.judgeEle(e)  # 点击元素
     # 获取城市名组
     citys = self.driver.find_elements_by_xpath(
         '//*[@id="cityList"]/option')
     if City is None or City == "":  # 如果没有传入城市或传的是'""'则直接返回省份名组
         return citys
     elementaction.dropDownBox_text(self, citys, City)
Example #20
0
 def optionCityNewAdd(self, City=None):  # 传入城市
     e = self.driver.find_element_by_xpath(
         '//div/div[2]/div/select[@id="f2"]')  # 点击城市下拉框
     await_ele.judgeEle(e)  # 点击元素
     # 获取城市名组
     sleep(0.5)
     citys = self.driver.find_elements_by_xpath(
         '//div/div[2]/div/select[@id="f2"]/option')
     if City is None or City == "":  # 如果没有传入城市或传的是'""'则直接返回省份名组
         return citys
     elementaction.dropDownBox_text(self, citys, City)
Example #21
0
 def setRule(self, week, Rule=None):
     rules = self.driver.find_elements_by_xpath(
         '//*[@id="week"]/div[%s]/div[2]/a' % week)
     if Rule is None or Rule == "":  # 如果没有传入仓库或传的是'""'则直接返回仓库名组
         return rules
     elementaction.dropDownBox_text(self, rules, Rule)  # 选择规则