Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-sc
Commits
17aca1c1
Commit
17aca1c1
authored
Nov 08, 2023
by
章 登恒
Browse files
commit
parent
df707e9d
Changes
7
Hide whitespace changes
Inline
Side-by-side
testcase/test_scene1/test_scene1_mainflow.py
View file @
17aca1c1
from
testcase.test_scene1.scene1_mainflow
import
*
def
test_scene1_mainflow
():
try
:
print
(
'
\n
流程一:采购_采退开始!!!'
)
step1
=
LoginSys
()
step2
=
PurchaseOrder
()
step3
=
Instore
()
step4
=
PurchaseReject
()
step5
=
Outstore
()
step1
.
loginsys
(
SIT_URL
,
usr2
,
pwd2
)
#登录系统
step2
.
data_add_purchase
()
#填写表单数据
step2
.
button_click1
()
#1为保存,否则为提交
step2
.
switch_loggin
(
usr1
,
pwd1
)
#切换登录
step2
.
approve_order
()
#1为审核通过,否则为审核驳回
purchord
=
step2
.
return_pchno
()
#获取采购订单号
step3
.
switch_loggin
(
usr4
,
pwd4
)
step3
.
take_over_goods
(
purchord
)
#仓库收货:1为收货单据撤回,2为提交,其余为保存
step3
.
switch_loggin
(
usr5
,
pwd5
)
step3
.
goods_check
(
purchord
)
#仓库验收:1为保存,否则为提交
step3
.
switch_loggin
(
usr4
,
pwd4
)
step3
.
goods_grounding
(
purchord
)
#仓库上架:1为保存,否则为提交
step4
.
switch_loggin
(
usr2
,
pwd2
)
step4
.
relate_order
(
purchord
)
#创建采退单1为保存,否则为提交
rejpurchord
=
step4
.
return_rejpchno
()
#获取采退单号
step4
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
approve_order
(
rejpurchord
)
#审核/驳回采退单:type=1为审核通过,否则为审核驳回
step4
.
switch_loggin
(
usr4
,
pwd4
)
step5
.
deliver_goods
(
rejpurchord
)
#仓库发货
step5
.
picking_goods
(
rejpurchord
)
#仓库拣货
step5
.
switch_loggin
(
usr5
,
pwd5
)
step5
.
outbound_review
(
rejpurchord
)
#出库复核
print
(
'流程一:采购_采退结束!!!'
)
except
Exception
as
e
:
step6
=
ExceptionHandling
()
traceback
.
print_exc
()
step6
.
handle
(
errmsg1
,
e
)
print
(
'
\n
流程一:采购_采退开始!!!'
)
step1
=
LoginSys
()
step2
=
PurchaseOrder
()
step3
=
Instore
()
step4
=
PurchaseReject
()
step5
=
Outstore
()
step1
.
loginsys
(
SIT_URL
,
usr2
,
pwd2
)
#登录系统
step2
.
data_add_purchase
()
#填写表单数据
step2
.
button_click1
()
#1为保存,否则为提交
step2
.
switch_loggin
(
usr1
,
pwd1
)
#切换登录
step2
.
approve_order
()
#1为审核通过,否则为审核驳回
purchord
=
step2
.
return_pchno
()
#获取采购订单号
step3
.
switch_loggin
(
usr4
,
pwd4
)
step3
.
take_over_goods
(
purchord
)
#仓库收货:1为收货单据撤回,2为提交,其余为保存
step3
.
switch_loggin
(
usr5
,
pwd5
)
step3
.
goods_check
(
purchord
)
#仓库验收:1为保存,否则为提交
step3
.
switch_loggin
(
usr4
,
pwd4
)
step3
.
goods_grounding
(
purchord
)
#仓库上架:1为保存,否则为提交
step4
.
switch_loggin
(
usr2
,
pwd2
)
step4
.
relate_order
(
purchord
)
#创建采退单1为保存,否则为提交
rejpurchord
=
step4
.
return_rejpchno
()
#获取采退单号
step4
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
approve_order
(
rejpurchord
)
#审核/驳回采退单:type=1为审核通过,否则为审核驳回
step4
.
switch_loggin
(
usr4
,
pwd4
)
step5
.
deliver_goods
(
rejpurchord
)
#仓库发货
step5
.
picking_goods
(
rejpurchord
)
#仓库拣货
step5
.
switch_loggin
(
usr5
,
pwd5
)
step5
.
outbound_review
(
rejpurchord
)
#出库复核
print
(
'流程一:采购_采退结束!!!'
)
testcase/test_scene3/scene3_mainflow.py
View file @
17aca1c1
...
...
@@ -14,7 +14,7 @@ warehousename = '103999'#仓库名称
purcontractnumber
=
41007
#采购合同号
salcontractnumber
=
'YLTEST88'
#销售合同号
salesman
=
'杨春刚'
#业务员名称
salcust
=
100
0486
#销售客户名称
salcust
=
100
3758
#销售客户名称
productcode
=
10156326
#商品编码
productdate
=
'2023-10-01'
#生产日期
expirdate
=
'2026-09-30'
#失效日期
...
...
@@ -127,7 +127,7 @@ class QuickPurchase():#快速采购单界面操作
# '//div[@class="multiple-header string_col" and text()="38443"]/ancestor-or-self::td/preceding-sibling::td/div/label/span/span').click()
# 勾选查询出的合同号并点击确定按钮
btn_div
=
chrome
.
find_element_by_xpath
(
'//span/input[@type="radio" and @value="0
9f1f6e22a40715aa4f23cc8b2cb2cece
"]'
)
'//span/input[@type="radio" and @value="0
326acb1c3399e0e83b3758a32a675057
"]'
)
chrome
.
execute_script
(
"arguments[0].click();"
,
btn_div
)
sleep
(
1
)
chrome
.
find_element_by_xpath
(
'(//button[@class="el-button el-button--primary el-button--default"])[2]'
).
click
()
...
...
@@ -229,6 +229,6 @@ if __name__ == '__main__':
traceback
.
print_exc
()
step6
.
handle
(
errmsg3
,
e
)
finally
:
chrome
.
quit
()
#
finally:
#
chrome.quit()
testcase/test_scene3/test_scene3_mainflow.py
View file @
17aca1c1
from
testcase.test_scene3.scene3_mainflow
import
*
def
test_scene3_mainflow
():
try
:
print
(
'
\n
流程三:经销商向总代采购,货从供应商发(经销商快采快销场景)平台端流程开始!!!'
)
# step1 = LoginSys()
step2_1
=
QuickPurchase
()
step2_2
=
PurchaseOrder
()
step3
=
SalesOrder
()
# step1.loginsys(SIT_URL,usr2,pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_quickpurchase
()
owtorder
=
step2_1
.
return_owtorder
()
step2_2
.
button_click1
()
print
(
"快速采购单提交成功,订单号为:"
,
owtorder
)
step2_2
.
switch_loggin
(
usr1
,
pwd1
)
step2_2
.
query_click
(
'快速采购订单'
,
owtorder
,
'vxe-body--column col_19 col--ellipsis dw-click-cell'
)
step2_2
.
button_click2
()
step3
.
push_wms
(
owtorder
)
print
(
'流程三:经销商向总代采购,货从供应商发(经销商快采快销场景)平台端流程结束!!!'
)
except
(
Exception
,
AssertionError
)
as
e
:
step6
=
ExceptionHandling
()
traceback
.
print_exc
()
step6
.
handle
(
errmsg3
,
e
)
print
(
'
\n
流程三:经销商向总代采购,货从供应商发(经销商快采快销场景)平台端流程开始!!!'
)
# step1 = LoginSys()
step2_1
=
QuickPurchase
()
step2_2
=
PurchaseOrder
()
step3
=
SalesOrder
()
# step1.loginsys(SIT_URL,usr2,pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_quickpurchase
()
owtorder
=
step2_1
.
return_owtorder
()
step2_2
.
button_click1
()
print
(
"快速采购单提交成功,订单号为:"
,
owtorder
)
step2_2
.
switch_loggin
(
usr1
,
pwd1
)
step2_2
.
query_click
(
'快速采购订单'
,
owtorder
,
'vxe-body--column col_19 col--ellipsis dw-click-cell'
)
step2_2
.
button_click2
()
step3
.
push_wms
(
owtorder
)
print
(
'流程三:经销商向总代采购,货从供应商发(经销商快采快销场景)平台端流程结束!!!'
)
testcase/test_scene4/test_scene4_mainflow1.py
View file @
17aca1c1
...
...
@@ -2,44 +2,41 @@ from testcase.test_scene4.scene4_mainflow import *
def
test_scene4_mainflow1
():
try
:
print
(
'
\n
流程四:调拨出库-红冲流程开始!!!'
)
# step1 = LoginSys()
step2_1
=
TransferOut
()
step2_2
=
PurchaseOrder
()
step3
=
Outstore
()
step4
=
TransferIn
()
step5
=
Instore1
()
step6
=
TransferOffSetting
()
# step1.loginsys(SIT_URL,usr2,pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_allocate
()
#填写主表数据
sttorder
=
step2_1
.
return_sttorder
()
step2_2
.
button_click1
()
#提交
step2_2
.
switch_loggin
(
usr1
,
pwd1
)
step2_2
.
query_click
(
'调拨出库单'
,
sttorder
,
'vxe-body--column col_19 col--left col--ellipsis dw-click-cell'
,
qrcond
=
'调拨出库单号'
)
step2_2
.
button_click2
(
msg1
=
'发送成功'
)
#审核
step3
.
switch_loggin
(
usr4
,
pwd4
)
step3
.
deliver_goods
(
sttorder
)
# 仓库发货
step3
.
picking_goods
(
sttorder
)
# 仓库拣货
step3
.
switch_loggin
(
usr5
,
pwd5
)
step3
.
outbound_review
(
sttorder
,
type
=
3
)
# 出库复核
step3
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
transfer_in
(
sttorder
)
#检查自动审配订单状态
ottorder
=
step4
.
return_ottorder
()
#获取调拨入库单号
step6
.
ottorder_cancel
()
#整单取消调拨入库单
step6
.
switch_loggin
(
usr2
,
pwd2
)
step6
.
ottorder_offset
(
sttorder
)
#新建调拨出库红冲单
smtorder
=
step6
.
return_smtorder
()
step5
.
switch_loggin
(
usr4
,
pwd4
)
step5
.
take_over_goods
(
smtorder
)
# 仓库收货:1为收货单据撤回,2为提交,其余为保存
step5
.
switch_loggin
(
usr5
,
pwd5
)
step5
.
goods_check
(
smtorder
,
type
=
3
)
# 仓库验收:1为保存,否则为提交
step5
.
switch_loggin
(
usr4
,
pwd4
)
step5
.
goods_grounding
(
smtorder
)
# 仓库上架:1为保存,否则为提交
print
(
'流程四:调拨出库-红冲流程结束!!!'
)
except
(
Exception
,
AssertionError
)
as
e
:
step7
=
ExceptionHandling
()
traceback
.
print_exc
()
step7
.
handle
(
errmsg4
,
e
)
print
(
'
\n
流程四:调拨出库-红冲流程开始!!!'
)
# step1 = LoginSys()
step2_1
=
TransferOut
()
step2_2
=
PurchaseOrder
()
step3
=
Outstore
()
step4
=
TransferIn
()
step5
=
Instore1
()
step6
=
TransferOffSetting
()
# step1.loginsys(SIT_URL,usr2,pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_allocate
()
#填写主表数据
sttorder
=
step2_1
.
return_sttorder
()
step2_2
.
button_click1
()
#提交
step2_2
.
switch_loggin
(
usr1
,
pwd1
)
step2_2
.
query_click
(
'调拨出库单'
,
sttorder
,
'vxe-body--column col_19 col--left col--ellipsis dw-click-cell'
,
qrcond
=
'调拨出库单号'
)
step2_2
.
button_click2
(
msg1
=
'发送成功'
)
#审核
step3
.
switch_loggin
(
usr4
,
pwd4
)
step3
.
deliver_goods
(
sttorder
)
# 仓库发货
step3
.
picking_goods
(
sttorder
)
# 仓库拣货
step3
.
switch_loggin
(
usr5
,
pwd5
)
step3
.
outbound_review
(
sttorder
,
type
=
3
)
# 出库复核
step3
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
transfer_in
(
sttorder
)
#检查自动审配订单状态
ottorder
=
step4
.
return_ottorder
()
#获取调拨入库单号
step6
.
ottorder_cancel
()
#整单取消调拨入库单
step6
.
switch_loggin
(
usr2
,
pwd2
)
step6
.
ottorder_offset
(
sttorder
)
#新建调拨出库红冲单
smtorder
=
step6
.
return_smtorder
()
step5
.
switch_loggin
(
usr4
,
pwd4
)
step5
.
take_over_goods
(
smtorder
)
# 仓库收货:1为收货单据撤回,2为提交,其余为保存
step5
.
switch_loggin
(
usr5
,
pwd5
)
step5
.
goods_check
(
smtorder
,
type
=
3
)
# 仓库验收:1为保存,否则为提交
step5
.
switch_loggin
(
usr4
,
pwd4
)
step5
.
goods_grounding
(
smtorder
)
# 仓库上架:1为保存,否则为提交
print
(
'流程四:调拨出库-红冲流程结束!!!'
)
testcase/test_scene4/test_scene4_mainflow2.py
View file @
17aca1c1
...
...
@@ -2,42 +2,39 @@ from testcase.test_scene4.scene4_mainflow import *
def
test_scene4_mainflow1
():
try
:
print
(
'
\n
流程四:调拨出库-入库流程开始!!!'
)
# step1 = LoginSys()
step2_1
=
TransferOut
()
step2_2
=
PurchaseOrder
()
step3
=
Outstore
()
step4
=
TransferIn
()
step5
=
Instore1
()
step6
=
TransferOffSetting
()
# step1.loginsys(SIT_URL, usr2, pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_allocate
()
# 填写主表数据
sttorder
=
step2_1
.
return_sttorder
()
step2_2
.
button_click1
()
# 提交
step2_2
.
switch_loggin
(
usr1
,
pwd1
)
step2_2
.
query_click
(
'调拨出库单'
,
sttorder
,
'vxe-body--column col_19 col--left col--ellipsis dw-click-cell'
,
qrcond
=
'调拨出库单号'
)
step2_2
.
button_click2
(
msg1
=
'发送成功'
)
# 审核
step3
.
switch_loggin
(
usr4
,
pwd4
)
step3
.
deliver_goods
(
sttorder
)
# 仓库发货
step3
.
picking_goods
(
sttorder
)
# 仓库拣货
step3
.
switch_loggin
(
usr5
,
pwd5
)
step3
.
outbound_review
(
sttorder
,
type
=
3
)
# 出库复核
step3
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
transfer_in
(
sttorder
)
# 检查自动审配订单状态
ottorder
=
step4
.
return_ottorder
()
# 获取调拨入库单号
step5
.
switch_loggin
(
usr4
,
pwd4
)
step5
.
take_over_goods
(
ottorder
)
# 仓库收货:1为收货单据撤回,2为提交,其余为保存
step5
.
switch_loggin
(
usr5
,
pwd5
)
step5
.
goods_check
(
ottorder
,
type
=
3
)
# 仓库验收:1为保存,否则为提交
step5
.
switch_loggin
(
usr4
,
pwd4
)
step5
.
goods_grounding
(
ottorder
)
# 仓库上架:1为保存,否则为提交
print
(
'流程四:调拨出库-入库流程结束!!!'
)
except
(
Exception
,
AssertionError
)
as
e
:
step7
=
ExceptionHandling
()
traceback
.
print_exc
()
step7
.
handle
(
errmsg4
,
e
)
print
(
'
\n
流程四:调拨出库-入库流程开始!!!'
)
# step1 = LoginSys()
step2_1
=
TransferOut
()
step2_2
=
PurchaseOrder
()
step3
=
Outstore
()
step4
=
TransferIn
()
step5
=
Instore1
()
step6
=
TransferOffSetting
()
# step1.loginsys(SIT_URL, usr2, pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_allocate
()
# 填写主表数据
sttorder
=
step2_1
.
return_sttorder
()
step2_2
.
button_click1
()
# 提交
step2_2
.
switch_loggin
(
usr1
,
pwd1
)
step2_2
.
query_click
(
'调拨出库单'
,
sttorder
,
'vxe-body--column col_19 col--left col--ellipsis dw-click-cell'
,
qrcond
=
'调拨出库单号'
)
step2_2
.
button_click2
(
msg1
=
'发送成功'
)
# 审核
step3
.
switch_loggin
(
usr4
,
pwd4
)
step3
.
deliver_goods
(
sttorder
)
# 仓库发货
step3
.
picking_goods
(
sttorder
)
# 仓库拣货
step3
.
switch_loggin
(
usr5
,
pwd5
)
step3
.
outbound_review
(
sttorder
,
type
=
3
)
# 出库复核
step3
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
transfer_in
(
sttorder
)
# 检查自动审配订单状态
ottorder
=
step4
.
return_ottorder
()
# 获取调拨入库单号
step5
.
switch_loggin
(
usr4
,
pwd4
)
step5
.
take_over_goods
(
ottorder
)
# 仓库收货:1为收货单据撤回,2为提交,其余为保存
step5
.
switch_loggin
(
usr5
,
pwd5
)
step5
.
goods_check
(
ottorder
,
type
=
3
)
# 仓库验收:1为保存,否则为提交
step5
.
switch_loggin
(
usr4
,
pwd4
)
step5
.
goods_grounding
(
ottorder
)
# 仓库上架:1为保存,否则为提交
print
(
'流程四:调拨出库-入库流程结束!!!'
)
testcase/test_scene6/test_scene6_mainflow1.py
View file @
17aca1c1
from
testcase.test_scene6.scene6_mainflow
import
*
def
test_scene6_mainflow1
():
try
:
print
(
'
\n
流程六:手术请领-手术还回流程开始!!!'
)
# step1 = LoginSys()
step2_1
=
SurgicalOrder
()
step2_2
=
PurchaseOrder
()
step3
=
SurgicalDispensing
()
step4
=
SurgicalLending
()
step5_1
=
Outstore
()
step5_2
=
Outstore1
()
step6
=
SurgicalReturn
()
step7_1
=
Instore1
()
step7_2
=
Instore
()
step8
=
SurgicalLendingSale
()
# step1.loginsys(SIT_URL, usr2, pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_surgical
()
step2_2
.
button_click1
()
qltorder
=
step2_1
.
return_qltorder
()
step3
.
dispensing
(
qltorder
)
step4
.
lending
(
qltorder
)
step4
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
query_click
(
menu_name
=
'手术借出单'
,
orderno
=
qltorder
,
el
=
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
qrcond
=
'请领单号'
)
jctorder
=
step4
.
return_jctorder
()
step4
.
button_click2
()
step4
.
switch_loggin
(
usr4
,
pwd4
)
step5_1
.
deliver_goods
(
jctorder
)
# 仓库发货
step5_1
.
picking_goods
(
jctorder
)
# 仓库拣货
step5_1
.
switch_loggin
(
usr5
,
pwd5
)
step5_2
.
outbound_review1
(
jctorder
,
type
=
3
)
# 出库复核
step5_1
.
switch_loggin
(
usr2
,
pwd2
)
step6
.
data_add_surgicalreturn
(
jctorder
)
#新增手术还回收货
hhshtorder
=
step6
.
return_hhshtorder
()
step7_1
.
switch_loggin
(
usr5
,
pwd5
)
step7_1
.
goods_check
(
hhshtorder
,
type
=
3
)
#仓库验收
hhtorderno
=
step7_1
.
return_hhtorderno
()
step7_1
.
switch_loggin
(
usr4
,
pwd4
)
step7_2
.
goods_grounding
(
hhtorderno
)
#仓库上架
# step8.data_add_surgicallendingsale(jctorder)#新建销售单
# xstorderno = step8.return_xstorderno()#返回销售单号
# step8.switch_loggin(usr3,pwd3)
# step8.query_click(menu_name='手术借出转销售', orderno=xstorderno,
# el='vxe-body--column col_19 col--center col--ellipsis dw-click-cell',
# qrcond='销售订单号')#进入表单视图
# step8.button_click2()#审核订单
print
(
'流程六:手术请领-手术还回流程结束!!!'
)
except
(
Exception
,
AssertionError
)
as
e
:
step9
=
ExceptionHandling
()
traceback
.
print_exc
()
step9
.
handle
(
errmsg6
,
e
)
print
(
'
\n
流程六:手术请领-手术还回流程开始!!!'
)
# step1 = LoginSys()
step2_1
=
SurgicalOrder
()
step2_2
=
PurchaseOrder
()
step3
=
SurgicalDispensing
()
step4
=
SurgicalLending
()
step5_1
=
Outstore
()
step5_2
=
Outstore1
()
step6
=
SurgicalReturn
()
step7_1
=
Instore1
()
step7_2
=
Instore
()
step8
=
SurgicalLendingSale
()
# step1.loginsys(SIT_URL, usr2, pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_surgical
()
step2_2
.
button_click1
()
qltorder
=
step2_1
.
return_qltorder
()
step3
.
dispensing
(
qltorder
)
step4
.
lending
(
qltorder
)
step4
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
query_click
(
menu_name
=
'手术借出单'
,
orderno
=
qltorder
,
el
=
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
qrcond
=
'请领单号'
)
jctorder
=
step4
.
return_jctorder
()
step4
.
button_click2
()
step4
.
switch_loggin
(
usr4
,
pwd4
)
step5_1
.
deliver_goods
(
jctorder
)
# 仓库发货
step5_1
.
picking_goods
(
jctorder
)
# 仓库拣货
step5_1
.
switch_loggin
(
usr5
,
pwd5
)
step5_2
.
outbound_review1
(
jctorder
,
type
=
3
)
# 出库复核
step5_1
.
switch_loggin
(
usr2
,
pwd2
)
step6
.
data_add_surgicalreturn
(
jctorder
)
#新增手术还回收货
hhshtorder
=
step6
.
return_hhshtorder
()
step7_1
.
switch_loggin
(
usr5
,
pwd5
)
step7_1
.
goods_check
(
hhshtorder
,
type
=
3
)
#仓库验收
hhtorderno
=
step7_1
.
return_hhtorderno
()
step7_1
.
switch_loggin
(
usr4
,
pwd4
)
step7_2
.
goods_grounding
(
hhtorderno
)
#仓库上架
# step8.data_add_surgicallendingsale(jctorder)#新建销售单
# xstorderno = step8.return_xstorderno()#返回销售单号
# step8.switch_loggin(usr3,pwd3)
# step8.query_click(menu_name='手术借出转销售', orderno=xstorderno,
# el='vxe-body--column col_19 col--center col--ellipsis dw-click-cell',
# qrcond='销售订单号')#进入表单视图
# step8.button_click2()#审核订单
print
(
'流程六:手术请领-手术还回流程结束!!!'
)
testcase/test_scene6/test_scene6_mainflow2.py
View file @
17aca1c1
from
testcase.test_scene6.scene6_mainflow
import
*
def
test_scene6_mainflow2
():
try
:
print
(
'
\n
流程六:手术请领-销售流程开始!!!'
)
# step1 = LoginSys()
step2_1
=
SurgicalOrder
()
step2_2
=
PurchaseOrder
()
step3
=
SurgicalDispensing
()
step4
=
SurgicalLending
()
step5_1
=
Outstore
()
step5_2
=
Outstore1
()
step6
=
SurgicalReturn
()
step7_1
=
Instore1
()
step7_2
=
Instore
()
step8
=
SurgicalLendingSale
()
# step1.loginsys(SIT_URL, usr2, pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_surgical
()
step2_2
.
button_click1
()
qltorder
=
step2_1
.
return_qltorder
()
step3
.
dispensing
(
qltorder
)
step4
.
lending
(
qltorder
)
step4
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
query_click
(
menu_name
=
'手术借出单'
,
orderno
=
qltorder
,
el
=
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
qrcond
=
'请领单号'
)
jctorder
=
step4
.
return_jctorder
()
step4
.
button_click2
()
step4
.
switch_loggin
(
usr4
,
pwd4
)
step5_1
.
deliver_goods
(
jctorder
)
# 仓库发货
step5_1
.
picking_goods
(
jctorder
)
# 仓库拣货
step5_1
.
switch_loggin
(
usr5
,
pwd5
)
step5_2
.
outbound_review1
(
jctorder
,
type
=
3
)
# 出库复核
step5_1
.
switch_loggin
(
usr2
,
pwd2
)
# step6.data_add_surgicalreturn(jctorder)#新增手术还回收货
# hhshtorder = step6.return_hhshtorder()
# step7_1.switch_loggin(usr5,pwd5)
# step7_1.goods_check(hhshtorder,type=3)#仓库验收
# step7_1.switch_loggin(usr4,pwd4)
# step7_2.goods_grounding(hhshtorder)#仓库上架
step8
.
data_add_surgicallendingsale
(
jctorder
)
#新建销售单
xstorderno
=
step8
.
return_xstorderno
()
#返回销售单号
step8
.
switch_loggin
(
usr3
,
pwd3
)
step8
.
query_click
(
menu_name
=
'手术借出转销售'
,
orderno
=
xstorderno
,
el
=
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
qrcond
=
'销售订单号'
)
#进入表单视图
step8
.
button_click2
()
#审核订单
print
(
'流程六:手术请领-销售流程结束!!!'
)
except
(
Exception
,
AssertionError
)
as
e
:
step9
=
ExceptionHandling
()
traceback
.
print_exc
()
step9
.
handle
(
errmsg6
,
e
)
finally
:
chrome
.
quit
()
\ No newline at end of file
print
(
'
\n
流程六:手术请领-销售流程开始!!!'
)
# step1 = LoginSys()
step2_1
=
SurgicalOrder
()
step2_2
=
PurchaseOrder
()
step3
=
SurgicalDispensing
()
step4
=
SurgicalLending
()
step5_1
=
Outstore
()
step5_2
=
Outstore1
()
step6
=
SurgicalReturn
()
step7_1
=
Instore1
()
step7_2
=
Instore
()
step8
=
SurgicalLendingSale
()
# step1.loginsys(SIT_URL, usr2, pwd2)
step2_2
.
switch_loggin
(
usr2
,
pwd2
)
step2_1
.
data_add_surgical
()
step2_2
.
button_click1
()
qltorder
=
step2_1
.
return_qltorder
()
step3
.
dispensing
(
qltorder
)
step4
.
lending
(
qltorder
)
step4
.
switch_loggin
(
usr1
,
pwd1
)
step4
.
query_click
(
menu_name
=
'手术借出单'
,
orderno
=
qltorder
,
el
=
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
qrcond
=
'请领单号'
)
jctorder
=
step4
.
return_jctorder
()
step4
.
button_click2
()
step4
.
switch_loggin
(
usr4
,
pwd4
)
step5_1
.
deliver_goods
(
jctorder
)
# 仓库发货
step5_1
.
picking_goods
(
jctorder
)
# 仓库拣货
step5_1
.
switch_loggin
(
usr5
,
pwd5
)
step5_2
.
outbound_review1
(
jctorder
,
type
=
3
)
# 出库复核
step5_1
.
switch_loggin
(
usr2
,
pwd2
)
# step6.data_add_surgicalreturn(jctorder)#新增手术还回收货
# hhshtorder = step6.return_hhshtorder()
# step7_1.switch_loggin(usr5,pwd5)
# step7_1.goods_check(hhshtorder,type=3)#仓库验收
# step7_1.switch_loggin(usr4,pwd4)
# step7_2.goods_grounding(hhshtorder)#仓库上架
step8
.
data_add_surgicallendingsale
(
jctorder
)
#新建销售单
xstorderno
=
step8
.
return_xstorderno
()
#返回销售单号
step8
.
switch_loggin
(
usr3
,
pwd3
)
step8
.
query_click
(
menu_name
=
'手术借出转销售'
,
orderno
=
xstorderno
,
el
=
'vxe-body--column col_19 col--center col--ellipsis dw-click-cell'
,
qrcond
=
'销售订单号'
)
#进入表单视图
step8
.
button_click2
()
#审核订单
print
(
'流程六:手术请领-销售流程结束!!!'
)
chrome
.
quit
()
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment