示例#1
0
    def test_eyt_16_finace_transact(self):
        '''财务办理'''

        # 权证请款
        self.test_eyt_15_warrant_apply()
        # 业务助理登录
        page = Login(self.company["business_assistant"]["user"])
        rs = common.finace_transact(page, self.applyCode)
        if not rs:
            Log().error("财务办理失败")
            raise

        # page = Login('xn052298')
        # common.finace_transact(page, 'CS20171215C02')

        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode, 1)
        if not res:
            Log().error("没有找到下一步处理人")
            raise
        else:
            self.next_user_id = res
            Log().info("下一步处理人:%s", self.next_user_id)
            # 当前用户退出系统
            self.page.driver.quit()
示例#2
0
	def test_xhd_18_finace_approve_risk_control_manager(self):
		'''财务风控经理审批'''
		
		remark = u'风控经理审批'
		
		self.test_xhd_17_finace_approve_branch_manager()
		page = Login(self.next_user_id)
		result = common.finace_approve(page, self.applyCode, remark)
		if not result:
			Log().error("财务-风控经理审批出错")
			raise
		else:
			Log().info("财务-风控经理审批完成")
		
		# 查看下一步处理人
		res = common.process_monitor(page, self.applyCode, 1)
		if not res:
			Log().error("Can't found the next user id")
			raise
		else:
			self.next_user_id = res
			Log().info("nextId: %s", res)
			print("nextId:" + self.next_user_id)
			# 当前用户退出系统
			self.page.driver.quit()
示例#3
0
	def test_xhd_14_authority_card_member_transact(self):
		'''权证办理'''
		
		# print  u"申请编号:" + self.applyCode
		# 合规审查
		self.test_xhd_13_compliance_audit()
		# 权证员登录
		page = Login(self.company["authority_member"]["user"])
		# 权证员上传权证信息
		res = common.authority_card_transact(page, self.applyCode)
		if not res:
			Log().error("权证员上传资料失败")
			raise
		else:
			Log().info("权证员上传资料成功!")
		# common.authority_card_transact(page, "GZ20171213C06")
		# 查看下一步处理人
		res = common.process_monitor(page, self.applyCode)
		if not res:
			Log().error("Can't found The next UserId!")
			raise
		else:
			self.next_user_id = res
			Log().info("Next UserId is :%s", res)
			# 当前用户退出系统
			self.page.driver.quit()
示例#4
0
    def test_eyt_18_finace_approve_risk_control_manager(self):
        '''财务风控经理审批'''

        remark = u'风控经理审批'

        self.test_eyt_17_finace_approve_branch_manager()
        page = Login(self.next_user_id)
        result = common.finace_approve(page, self.applyCode, remark)
        if not result:
            Log().error("财务流程-风控经理审批出错")
            raise
        else:
            Log().info("财务流程-风控经理审批完成")

        # page = Login('xn003625')
        # common.finace_approve(page, "CS20171215X14", remark)
        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode, 1)
        if not res:
            Log().error("Can't found the next userId!")
            raise
        else:
            self.next_user_id = res
            Log().info("下一步处理人:%s", self.next_user_id)
            # 当前用户退出系统
            self.page.driver.quit()
示例#5
0
	def test_xhd_11_manager_approval(self):
		'''高级审批经理审批'''
		
		# 获取审批经理ID
		self.test_xhd_10_regional_prereview()
		
		# 下一个处理人重新登录
		page = Login(self.next_user_id)
		
		# 审批审核
		result = common.approval_to_review(page, self.applyCode, u'高级审批经理审批')
		if not result:
			Log().error("风控-高级审批经理审批失败")
			raise
		else:
			Log().info("风控-高级审批经理审批完成")
		
		# 查看下一步处理人
		res = common.process_monitor(page, self.applyCode)
		if not res:
			Log().error("Can't found Next userId!")
			raise
		else:
			self.next_user_id = res
			Log().info("next_user_id: %s", res)
			# 当前用户退出系统
			self.page.driver.quit()
示例#6
0
	def test_xhd_10_regional_prereview(self):
		'''区域预复核审批'''
		
		# 获取区域预复核员ID
		self.test_xhd_09_branch_manager_approval()
		
		# 下一个处理人重新登录
		page = Login(self.next_user_id)
		
		# 审批审核
		rs = common.approval_to_review(page, self.applyCode, u'区域预复核通过')
		if not rs:
			Log().error("风控-区域预复核失败")
			raise
		else:
			Log().info("风控-区域预复核成功!")
		
		# 查看下一步处理人
		res = common.process_monitor(page, self.applyCode)
		if not res:
			self.log.error("Can't Get next User")
			raise
		else:
			self.next_user_id = res
			self.log.info("Next deal User:" + self.next_user_id)
			# 当前用户退出系统
			self.page.driver.quit()
示例#7
0
	def test_xhd_09_branch_manager_approval(self):
		'''分公司经理审批'''
		
		# 获取分公司经理登录ID
		self.test_xhd_08_branch_supervisor_approval()
		
		# 下一个处理人重新登录
		page = Login(self.next_user_id)
		
		# 审批审核
		res = common.approval_to_review(page, self.applyCode, u'分公司经理同意审批')
		if not res:
			Log().error("风控-分公司审批失败")
			raise
		else:
			Log().info("风控-分公司经理完成!")
		
		# 查看下一步处理人
		res = common.process_monitor(page, self.applyCode)
		if not res:
			Log().error("Can't found the next userId!")
			raise
		else:
			self.next_user_id = res
			Log().info("next User Id is :%s", res)
			# 当前用户退出系统
			self.page.driver.quit()
示例#8
0
    def test_eyt_10_regional_prereview(self):
        '''区域预复核审批'''

        # 获取区域预复核员ID
        self.test_eyt_09_branch_manager_approval()

        # 下一个处理人重新登录
        page = Login(self.next_user_id)

        # 审批审核
        res = common.approval_to_review(page, self.applyCode, u'区域预复核通过')
        if not res:
            Log().error("区域预复核失败")
            raise
        else:
            Log().info("区域预复核审批完成!")

        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode)
        if not res:
            Log().error("Can't not found the next UserId")
            raise
        else:
            self.next_user_id = res
            Log().info("next_user_id %s", self.next_user_id)
            # 当前用户退出系统
            self.page.driver.quit()
示例#9
0
	def test_xhd_19_finace_approve_financial_accounting(self):
		'''财务会计审批'''
		
		remark = u'财务会计审批'
		
		self.test_xhd_18_finace_approve_risk_control_manager()
		page = Login(self.next_user_id)
		result = common.finace_approve(page, self.applyCode, remark)
		if not result:
			Log().error("财务-财务会计审批出错!")
			raise
		else:
			Log().info("财务-财务会计审批完成!")
		
		# 查看下一步处理人
		res = common.process_monitor(page, self.applyCode, 1)
		if not res:
			Log().error("can't found The next user Id!")
			raise
		else:
			self.next_user_id = res
			print("nextId:" + self.next_user_id)
			Log().info("nextId :%s", res)
			# 当前用户退出系统
			self.page.driver.quit()
示例#10
0
    def test_eyt_15_warrant_apply(self):
        '''权证请款-原件请款'''

        # 获取合同打印专员ID
        self.test_eyt_14_authority_card_member_transact()
        page = Login(self.next_user_id)
        # 权证请款
        res = common.warrant_apply(page, self.applyCode)
        if res:
            Log().info("权证请款成功")
        else:
            Log().error("权证请款失败")
            raise
示例#11
0
    def test_eyt_20_finace_approve_financial_manager(self):
        '''财务经理审批'''

        remark = u'财务经理审批'

        self.test_eyt_19_finace_approve_financial_accounting()
        page = Login(self.next_user_id)
        res = common.finace_approve(page, self.applyCode, remark)
        if not res:
            Log().error("财务流程-财务经理审批失败")
            raise
        else:
            Log().info("财务流程-财务经理审批完成")
            self.page.driver.quit()
示例#12
0
    def test_eyt_21_funds_raise(self):
        '''资金主管募资审批'''

        remark = u'资金主管审批'

        self.test_eyt_20_finace_approve_financial_manager()
        page = Login('xn0007533')
        res = common.funds_raise(page, self.applyCode, remark)
        if not res:
            Log().error("募资-资金主管审批失败")
            raise
        else:
            Log().info("募资-资金主管审批完成!")
            self.page.driver.quit()
示例#13
0
    def setUp(self):
        self._init_params()
        self.page = Login()
        self.applyCode = ""
        self.log = Log()

        try:
            import config
            rootdir = config.__path__[0]
            config_env = os.path.join(rootdir, 'env.json')
            print("config_env:" + config_env)
            with open(config_env, 'r') as f:
                self.da = json.load(f)
                self.number = self.da["number"]
                self.env = self.da["enviroment"]

            filename = "data_cwd.json"
            data, company = enviroment_change(filename, self.number, self.env)
            # 录入的源数据
            self.data = data
            # 分公司选择
            self.company = company
        except Exception as e:
            print('load config error:', str(e))
            raise
示例#14
0
	def test_xhd_12_contract_signing(self):
		'''签约'''
		
		rec_bank_info = dict(
				recBankNum=self.data['houseCommonLoanInfoList'][0]['recBankNum'],
				recPhone=self.data['houseCommonLoanInfoList'][0]['recPhone'],
				recBankProvince=self.data['houseCommonLoanInfoList'][0]['recBankProvince'],
				recBankDistrict=self.data['houseCommonLoanInfoList'][0]['recBankDistrict'],
				recBank=self.data['houseCommonLoanInfoList'][0]['recBank'],
				recBankBranch=self.data['houseCommonLoanInfoList'][0]['recBankBranch'],
				)
		
		# 扣款银行信息
		rep_bank_info = dict(
				rep_name=u'习近平',
				rep_id_num='420101198201013526',
				rep_bank_code='6210302082441017886',
				rep_phone='13686467482',
				provice=u'湖南省',
				district=u'长沙',
				rep_bank_name=u'中国银行',
				rep_bank_branch_name=u'北京支行',
				)
		
		# 获取合同打印专员ID
		self.test_xhd_11_manager_approval()
		
		# 下一个处理人重新登录
		page = Login(self.next_user_id)
		
		# 签约
		rs = common.make_signing(page, self.applyCode, rec_bank_info)
		if not rs:
			Log().error("签约失败")
			raise
		else:
			Log().info("签约成功")
		
		# 查看下一步处理人
		res = common.process_monitor(page, self.applyCode)
		if not res:
			self.log.error("Can't Get Next User")
			raise
		else:
			self.next_user_id = res
			# 当前用户退出系统
			self.page.driver.quit()
示例#15
0
	def test_xhd_13_compliance_audit(self):
		'''合规审查'''
		
		# 获取下一步合同登录ID
		self.test_xhd_12_contract_signing()
		
		# 下一个处理人重新登录
		page = Login(self.next_user_id)
		
		# 合规审查
		res = common.compliance_audit(page, self.applyCode)
		if not res:
			Log().error("合规审查失败")
			raise
		else:
			Log().info("合规审查成功")
			self.page.driver.quit()
示例#16
0
    def test_13_compliance_audit(self):
        '''合规审查'''

        # i_frame = 'bTabs_tab_house_commonIndex_todoList'
        # 获取下一步合同登录ID
        self.test_12_contract_signing()

        # 下一个处理人重新登录
        page = Login(self.next_user_id)

        # 合规审查
        res = common.compliance_audit(page, self.cust_info['applyCode'])
        if res:
            Log().info("合规审查通过")
        else:
            Log().error("合规审查失败")
            raise
        page.driver.quit()
示例#17
0
    def setUp(self):
        self.page = Login()
        self.applyCode = ''
        self.next_user_id = ""
        self.cust_info = dict(
            _borrow_info=dict(
                custName=getName(),
                idNum="360101199101011054",
                phone="13564789215",
                address=u"湖南长沙",
                companyName=u'小牛普惠管理有限公司',
                postName=u'工程师',
                workDate=u'2011-02-03',  # 入职日期
                workYear=5,  # 工作年限
                monthIncoming=15000  # 月均收入
            ),
            _cust_base_info=dict(
                productName=u'过桥通-1.0(一线城市)',  # 贷款产品
                applyAmount=50000,  # 申请金额
                applyPeriod=10,  # 贷款天数
                branchManager=u"小明",
                branchManagerCode="xn111",
                teamGroup=u"A队",
                teamGroupCode="xn0001",
                teamManager=u"小王",
                teamManagerCode="xn0001",
                sale=u"王刚",
                saleCode="xn0002",
                monthIncome=3000,
                checkApprove=u"同意",
            ))

        self.loan_amount = 200000  # 拆分金额
        self.log = Log()

        try:
            import config
            rootdir = config.__path__[0]
            config_env = os.path.join(rootdir, 'env.json')
            # print("config_env:" + config_env)
            with open(config_env, 'r') as f:
                self.da = json.load(f)
                self.number = self.da["number"]
                self.env = self.da["enviroment"]

            filename = "data_gqt.json"
            data, company = enviroment_change(filename, self.number, self.env)
            # 录入的源数据
            self.data = data
            # 分公司选择
            self.company = company
        except Exception as e:
            print('load config error:', str(e))
            raise
示例#18
0
	def test_xhd_17_finace_approve_branch_manager(self):
		'''财务分公司经理审批'''
		
		remark = u"财务分公司经理审批"
		
		# 下一个处理人
		self.test_xhd_16_finace_transact()
		page = Login(self.next_user_id)
		result = common.finace_approve(page, self.applyCode, remark)
		if not result:
			raise
		# 查看下一步处理人
		res = common.process_monitor(page, self.applyCode, 1)
		if not res:
			Log().error("Can't found the next user Id")
			raise
		else:
			self.next_user_id = res
			Log().info("Next user Id is: %s", res)
			print("nextId:" + res)
			# 当前用户退出系统
			self.page.driver.quit()
示例#19
0
    def test_eyt_19_finace_approve_financial_accounting(self):
        '''财务会计审批'''

        remark = u'财务会计审批'

        self.test_eyt_18_finace_approve_risk_control_manager()
        page = Login(self.next_user_id)
        rs = common.finace_approve(page, self.applyCode, remark)
        if not rs:
            Log().error("财务流程-财务会计审批失败")
            raise
        else:
            Log().info("财务流程-财务会计审批完成")

        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode, 1)
        if not res:
            Log().error("Can't found The next UserId")
            raise
        else:
            self.next_user_id = res
            Log().info("nextId is %s", self.next_user_id)
            # 当前用户退出系统
            self.page.driver.quit()
示例#20
0
	def test_xhd_16_finace_transact(self):
		'''财务办理'''
		
		# 权证请款
		self.test_xhd_15_warrant_apply()
		# 业务助理登录
		page = Login(self.company["business_assistant"]["user"])
		result = common.finace_transact(page, self.applyCode)
		if not result:
			Log().error("财务办理失败")
			raise
		else:
			Log().info("财务办理成功")
		
		# 查看下一步处理人
		res = common.process_monitor(page, self.applyCode, 1)
		if not res:
			Log().error("Can't found the next user id")
			raise
		else:
			self.next_user_id = res
			Log().info("Next user Id is: %s", res)
			# 当前用户退出系统
			self.page.driver.quit()
示例#21
0
    def test_eyt_17_finace_approve_branch_manager(self):
        '''财务分公司经理审批'''

        remark = u"财务分公司经理审批"

        # 下一个处理人
        self.test_eyt_16_finace_transact()
        page = Login(self.next_user_id)
        result = common.finace_approve(page, self.applyCode, remark)
        if not result:
            Log().error("财务流程-分公司经理审批失败")
            raise
        # page = Login('xn028154')
        # common.finace_approve(page, "CS20171215X14", remark)
        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode, 1)
        if not res:
            Log().error("没有找到下一步处理人")
            raise
        else:
            self.next_user_id = res
            Log().info("下一步处理人: %s", self.next_user_id)
            # 当前用户退出系统
            self.page.driver.quit()
示例#22
0
    def test_eyt_14_authority_card_member_transact(self):
        '''权证办理'''

        # print  u"申请编号:" + self.applyCode
        # 合规审查
        self.test_13_compliance_audit()
        # 权证员登录
        page = Login(self.company["authority_member"]["user"])
        # 权证员上传权证信息
        rs = common.authority_card_transact(page, self.applyCode)
        if not rs:
            Log().error("上传权证信息失败")
            raise
        # common.authority_card_transact(page, "GZ20171213C06")
        # 查看下一步处理人
        res = common.process_monitor(page, self.applyCode)
        if not res:
            Log().error("权证办理-没找到下一步处理人")
            raise
        else:
            self.next_user_id = res
            Log().info("下一步处理人:%s", self.next_user_id)
            # 当前用户退出系统
            self.page.driver.quit()
示例#23
0
    def setUp(self):
        try:
            import config
            rootdir = config.__path__[0]
            config_env = os.path.join(rootdir, 'env.json')
            print("config_env:" + config_env)
            with open(config_env, 'r') as f:
                self.da = json.load(f)
                self.number = self.da["number"]
                self.env = self.da["enviroment"]

            filename = "data_cwd.json"
            data, company = custom.enviroment_change(filename, self.number,
                                                     self.env)
            self.page = Login()
            self.log = Log()

            self.evt = dict(data=data, company=company)
        except Exception as e:
            print('load config error:', str(e))
            raise