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
b3967d2c
Commit
b3967d2c
authored
Nov 01, 2024
by
邱阿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
1f0db93b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
return_goods.exe
dist/return_goods.exe
+0
-0
spa_search.exe
dist/spa_search.exe
+0
-0
return_goods.py
src/return_goods.py
+12
-12
No files found.
dist/return_goods.exe
View file @
b3967d2c
No preview for this file type
dist/spa_search.exe
View file @
b3967d2c
No preview for this file type
src/return_goods.py
View file @
b3967d2c
...
...
@@ -65,7 +65,7 @@ def main():
relations_dict
=
api
.
sku_relations
()
# 下载并读取list数据
list_data
=
export_list_read_data
()
list_data
=
list_data
[
220
:]
log
.
info
(
f
"共计:{len(list_data)} 订单"
)
new_list_data
=
[]
...
...
@@ -87,17 +87,17 @@ def main():
relation
=
relations_dict
.
get
(
item_row
.
get
(
'ASIN'
))
erp_sku
=
relation
.
get
(
'erp_sku'
)
data_dict
=
data
.
to_dict
()
data_dict
[
'Return Date'
]
=
data_dict
[
'Return Date'
]
.
strftime
(
'
%
m/
%
d/
%
Y'
)
data_dict
[
'Return ID'
]
=
str
(
data_dict
[
'Return ID'
])
data_dict
[
'PO'
]
=
item_row
.
get
(
'Purchase order'
)
data_dict
[
'ASIN'
]
=
item_row
.
get
(
'ASIN'
)
data_dict
[
'SKU'
]
=
erp_sku
if
erp_sku
is
not
None
else
""
,
data_dict
[
'Quantity'
]
=
item_row
.
get
(
'Quantity'
)
data_dict
.
update
({
'Return Date'
:
data_dict
[
'Return Date'
]
.
strftime
(
'
%
m/
%
d/
%
Y'
),
'Return ID'
:
str
(
data_dict
[
'Return ID'
]),
'PO'
:
item_row
.
get
(
'Purchase order'
),
'ASIN'
:
item_row
.
get
(
'ASIN'
)
,
'SKU'
:
erp_sku
if
erp_sku
is
not
None
else
""
,
'Quantity'
:
item_row
.
get
(
'Quantity'
),
# 替换回会数量和金额为详情里面的值
data_dict
[
'Return quantity'
]
=
item_row
.
get
(
'Quantity'
)
data_dict
[
'Total cost'
]
=
item_row
.
get
(
'Total amount'
)
'Return quantity'
:
item_row
.
get
(
'Quantity'
),
# 替换回会数量
'Total cost'
:
item_row
.
get
(
'Total amount'
)
# 替换金额
})
# 追加数据
new_list_data
.
append
(
data_dict
)
...
...
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