Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amazon_reports
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
common
amazon_reports
Commits
26141363
Commit
26141363
authored
Nov 11, 2024
by
邱阿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
52b6c910
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
16 deletions
+17
-16
domain.py
src/helper/domain.py
+4
-4
payment.py
src/payment.py
+11
-10
return_goods.py
src/return_goods.py
+1
-1
spa_search.py
src/spa_search.py
+1
-1
No files found.
src/helper/domain.py
View file @
26141363
...
...
@@ -7,13 +7,13 @@ from lxml import etree
def
switch_domain
(
country
):
domain
=
"https://vendorcentral.amazon.com/"
if
country
==
"
jp
"
:
if
country
==
"
JP
"
:
domain
=
"https://vendorcentral.amazon.co.jp/"
if
country
==
"
uk
"
:
if
country
==
"
UK
"
:
domain
=
"https://vendorcentral.amazon.co.uk/"
if
country
==
"
fr
"
:
if
country
==
"
FR
"
:
domain
=
"https://vendorcentral.amazon.fr/"
if
country
==
"
ca
"
:
if
country
==
"
CA
"
:
domain
=
"https://vendorcentral.amazon.ca/"
if
country
==
"mx"
:
domain
=
"https://vendorcentral.amazon.com.mx/"
...
...
src/payment.py
View file @
26141363
...
...
@@ -251,7 +251,6 @@ def handle_data(detail_datum, vendor, deduction_points):
def
main
():
list_data
=
export_list_read_data
()
excel
.
save_xls
(
list_data
,
"回款数据.xlsx"
,
"Remittance payments"
)
log
.
info
(
f
"共计:{len(list_data)} 订单"
)
all_normal_pay_data
=
[]
...
...
@@ -268,13 +267,15 @@ def main():
vendor
=
vendor_payment_terms
[
'vendor'
]
deduction_points
=
int
(
vendor_payment_terms
[
'payment_terms'
])
last_two
=
invoice_number
[
-
2
:]
# 取后两位
last_three
=
invoice_number
[
-
3
:]
# 取后三位
# 检查后两位是否在测试列表中
if
last_two
in
[
"PC"
,
"MA"
,
"SC"
]:
invoice_number
=
invoice_number
[:
-
2
]
# 去掉后两位
if
last_three
==
"PCR"
:
invoice_number
=
invoice_number
[:
-
3
]
# 去掉最后三位
if
len
(
invoice_number
)
>
8
:
last_two
=
invoice_number
[
-
2
:]
# 取后两位
last_three
=
invoice_number
[
-
3
:]
# 取后三位
# 检查后两位是否在测试列表中
if
last_two
in
[
"PC"
,
"MA"
,
"SC"
]:
invoice_number
=
invoice_number
[:
-
2
]
# 去掉后两位
if
last_three
==
"PCR"
:
invoice_number
=
invoice_number
[:
-
3
]
# 去掉最后三位
# 下载excel文件并读取数据
detail_data
=
export_details_read_data
(
invoice_number
)
...
...
@@ -319,8 +320,8 @@ def main():
if
__name__
==
'__main__'
:
try
:
country
=
helper
.
get_input_with_default
(
"国家(目前支持[
usa,jp,uk,fr,ca])"
,
"usa
"
)
payeeCode
=
helper
.
get_input_with_default
(
"payeeCode"
,
"
E8PFB
"
)
country
=
helper
.
get_input_with_default
(
"国家(目前支持[
DE,FR,JP,CA,UK,US])"
,
"US
"
)
payeeCode
=
helper
.
get_input_with_default
(
"payeeCode"
,
"
VECET
"
)
domain
.
domain_page
(
page
,
country
)
main
()
page
.
close
()
...
...
src/return_goods.py
View file @
26141363
...
...
@@ -105,7 +105,7 @@ def main():
if
__name__
==
'__main__'
:
try
:
country
=
helper
.
get_input_with_default
(
"国家(目前支持[
usa,jp,uk,fr,ca])"
,
"usa
"
)
country
=
helper
.
get_input_with_default
(
"国家(目前支持[
DE,FR,JP,CA,UK,US])"
,
"US
"
)
domain
.
domain_page
(
page
,
country
)
main
()
page
.
close
()
...
...
src/spa_search.py
View file @
26141363
...
...
@@ -196,7 +196,7 @@ def main():
if
__name__
==
'__main__'
:
try
:
country
=
helper
.
get_input_with_default
(
"国家(目前支持[
usa,jp,uk,fr,ca])"
,
"usa
"
)
country
=
helper
.
get_input_with_default
(
"国家(目前支持[
DE,FR,JP,CA,UK,US])"
,
"US
"
)
domain
.
domain_page
(
page
,
country
)
main
()
page
.
close
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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