Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
hh_ccs
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
贺阳
hh_ccs
Commits
cabb3198
提交
cabb3198
authored
2月 07, 2025
作者:
贺阳
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提单导出报关数据,导出的表格,表头TRACKING NO改成CUSTOMS PROVIDER ORDER ID
在第二和第三列新增内容:BIG BAG NO及TRACKING NO 取值: BIG BAG NO为该小包商品对应的大包号 TRACKING NO为该小包商品对应的小包追踪号
上级
214a798c
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
74 行增加
和
70 行删除
+74
-70
export_bl_and_package_xlsx.py
ccs_base/controllers/export_bl_and_package_xlsx.py
+74
-70
没有找到文件。
ccs_base/controllers/export_bl_and_package_xlsx.py
浏览文件 @
cabb3198
...
...
@@ -31,41 +31,43 @@ class ExportBlAndPackageXlsx(http.Controller):
if
good_ids
:
for
good_item
in
good_ids
:
good_index
+=
1
sheet1
.
write
(
good_index
,
0
,
package_item
.
logistic_order_no
or
''
)
# 物流订单号 TRACKING NO.
sheet1
.
write
(
good_index
,
1
,
package_item
.
customer_ref
or
''
)
# CUSTOMER REF
sheet1
.
write
(
good_index
,
2
,
package_item
.
internal_account_number
or
''
)
# Internal Account Number
sheet1
.
write
(
good_index
,
3
,
package_item
.
sender_name
or
''
)
# SENDER NAME
sheet1
.
write
(
good_index
,
4
,
package_item
.
sender_add_1
or
''
)
# SHIPPER ADD 1
sheet1
.
write
(
good_index
,
5
,
package_item
.
sender_add_2
or
''
)
# SHIPPER ADD 2
sheet1
.
write
(
good_index
,
6
,
package_item
.
sender_add_3
or
''
)
# SHIPPER ADD 3
sheet1
.
write
(
good_index
,
7
,
package_item
.
sender_city
or
''
)
# SENDER CITY
sheet1
.
write
(
good_index
,
8
,
package_item
.
sender_state
or
''
)
# Ship State
sheet1
.
write
(
good_index
,
9
,
package_item
.
sender_postcode
or
''
)
# SENDER POSTCODE
sheet1
.
write
(
good_index
,
10
,
package_item
.
sender_country
or
''
)
# SENDER COUNTRY
sheet1
.
write
(
good_index
,
11
,
package_item
.
receiver_name
or
''
)
# RECEIPIENT NAME
sheet1
.
write
(
good_index
,
12
,
package_item
.
receiver_add_1
or
''
)
# RECEIPIENT ADD 1
sheet1
.
write
(
good_index
,
13
,
package_item
.
receiver_add_2
or
''
)
# RECEIPIENT ADD 2
sheet1
.
write
(
good_index
,
14
,
package_item
.
receiver_add_3
or
''
)
# RECEIPIENT ADD 3
sheet1
.
write
(
good_index
,
15
,
package_item
.
receiver_city
or
''
)
# RECEIPIENT CITY
sheet1
.
write
(
good_index
,
16
,
package_item
.
receiver_county
or
''
)
# RECEIPIENT COUNTY
sheet1
.
write
(
good_index
,
17
,
package_item
.
receiver_postcode
or
''
)
# RECEIPIENT POSTCODE
sheet1
.
write
(
good_index
,
18
,
package_item
.
receiver_email
or
''
)
# RECEPIENT EMAIL
sheet1
.
write
(
good_index
,
19
,
package_item
.
receiver_phone
or
''
)
# PHONE NUMBER
sheet1
.
write
(
good_index
,
20
,
package_item
.
gross_weight
or
0
)
# GROSS WEIGHT (KG)
sheet1
.
write
(
good_index
,
21
,
package_item
.
weight_unit
or
0
)
# NET WEIGHT (KG)
sheet1
.
write
(
good_index
,
22
,
package_item
.
currency
or
''
)
# Currency
sheet1
.
write
(
good_index
,
23
,
good_item
.
sku_id
or
''
)
# SKU NUMBER
sheet1
.
write
(
good_index
,
24
,
good_item
.
item_name_en
or
''
)
# ITEM DESCRIPTION
sheet1
.
write
(
good_index
,
25
,
good_item
.
export_hs_code
or
''
)
# ITEM HS CODE
sheet1
.
write
(
good_index
,
26
,
good_item
.
quantity
)
# ITEM QUANTITY
sheet1
.
write
(
good_index
,
27
,
good_item
.
quantity_unit
or
''
)
# UNIT VALUE
sheet1
.
write
(
good_index
,
28
,
good_item
.
item_total_price
)
# TOTAL VALUE
sheet1
.
write
(
good_index
,
29
,
good_item
.
item_vat
or
''
)
# VAT
sheet1
.
write
(
good_index
,
30
,
''
)
# SKU NUMBER
sheet1
.
write
(
good_index
,
31
,
good_item
.
item_link
or
''
)
# PRODUCT LINK
sheet1
.
write
(
good_index
,
32
,
''
)
# LENGTH
sheet1
.
write
(
good_index
,
33
,
''
)
# WIDTH
sheet1
.
write
(
good_index
,
34
,
''
)
# HEIGHT
sheet1
.
write
(
good_index
,
0
,
package_item
.
logistic_order_no
or
''
)
# 物流订单号 CUSTOMS PROVIDER ORDER ID
sheet1
.
write
(
good_index
,
1
,
package_item
.
big_package_id
.
big_package_no
or
''
)
# 小包商品对应的大包号 BIG BAG NO
sheet1
.
write
(
good_index
,
2
,
package_item
.
tracking_no
or
''
)
# 小包追踪号 TRACKING NO
sheet1
.
write
(
good_index
,
3
,
package_item
.
customer_ref
or
''
)
# CUSTOMER REF
sheet1
.
write
(
good_index
,
4
,
package_item
.
internal_account_number
or
''
)
# Internal Account Number
sheet1
.
write
(
good_index
,
5
,
package_item
.
sender_name
or
''
)
# SENDER NAME
sheet1
.
write
(
good_index
,
6
,
package_item
.
sender_add_1
or
''
)
# SHIPPER ADD 1
sheet1
.
write
(
good_index
,
7
,
package_item
.
sender_add_2
or
''
)
# SHIPPER ADD 2
sheet1
.
write
(
good_index
,
8
,
package_item
.
sender_add_3
or
''
)
# SHIPPER ADD 3
sheet1
.
write
(
good_index
,
9
,
package_item
.
sender_city
or
''
)
# SENDER CITY
sheet1
.
write
(
good_index
,
10
,
package_item
.
sender_state
or
''
)
# Ship State
sheet1
.
write
(
good_index
,
11
,
package_item
.
sender_postcode
or
''
)
# SENDER POSTCODE
sheet1
.
write
(
good_index
,
12
,
package_item
.
sender_country
or
''
)
# SENDER COUNTRY
sheet1
.
write
(
good_index
,
13
,
package_item
.
receiver_name
or
''
)
# RECEIPIENT NAME
sheet1
.
write
(
good_index
,
14
,
package_item
.
receiver_add_1
or
''
)
# RECEIPIENT ADD 1
sheet1
.
write
(
good_index
,
15
,
package_item
.
receiver_add_2
or
''
)
# RECEIPIENT ADD 2
sheet1
.
write
(
good_index
,
16
,
package_item
.
receiver_add_3
or
''
)
# RECEIPIENT ADD 3
sheet1
.
write
(
good_index
,
17
,
package_item
.
receiver_city
or
''
)
# RECEIPIENT CITY
sheet1
.
write
(
good_index
,
18
,
package_item
.
receiver_county
or
''
)
# RECEIPIENT COUNTY
sheet1
.
write
(
good_index
,
19
,
package_item
.
receiver_postcode
or
''
)
# RECEIPIENT POSTCODE
sheet1
.
write
(
good_index
,
20
,
package_item
.
receiver_email
or
''
)
# RECEPIENT EMAIL
sheet1
.
write
(
good_index
,
21
,
package_item
.
receiver_phone
or
''
)
# PHONE NUMBER
sheet1
.
write
(
good_index
,
22
,
package_item
.
gross_weight
or
0
)
# GROSS WEIGHT (KG)
sheet1
.
write
(
good_index
,
23
,
package_item
.
weight_unit
or
0
)
# NET WEIGHT (KG)
sheet1
.
write
(
good_index
,
24
,
package_item
.
currency
or
''
)
# Currency
sheet1
.
write
(
good_index
,
25
,
good_item
.
sku_id
or
''
)
# SKU NUMBER
sheet1
.
write
(
good_index
,
26
,
good_item
.
item_name_en
or
''
)
# ITEM DESCRIPTION
sheet1
.
write
(
good_index
,
27
,
good_item
.
export_hs_code
or
''
)
# ITEM HS CODE
sheet1
.
write
(
good_index
,
28
,
good_item
.
quantity
)
# ITEM QUANTITY
sheet1
.
write
(
good_index
,
29
,
good_item
.
quantity_unit
or
''
)
# UNIT VALUE
sheet1
.
write
(
good_index
,
30
,
good_item
.
item_total_price
)
# TOTAL VALUE
sheet1
.
write
(
good_index
,
31
,
good_item
.
item_vat
or
''
)
# VAT
sheet1
.
write
(
good_index
,
32
,
''
)
# SKU NUMBER
sheet1
.
write
(
good_index
,
33
,
good_item
.
item_link
or
''
)
# PRODUCT LINK
sheet1
.
write
(
good_index
,
34
,
''
)
# LENGTH
sheet1
.
write
(
good_index
,
35
,
''
)
# WIDTH
sheet1
.
write
(
good_index
,
36
,
''
)
# HEIGHT
if
good_index
==
int
(
parcel_export_num
):
num
+=
1
sheet1
=
self
.
get_package_title
(
worksheet
,
font_style
,
num
)
...
...
@@ -81,41 +83,43 @@ class ExportBlAndPackageXlsx(http.Controller):
for
i
in
range
(
35
):
sheet1
.
col
(
i
)
.
width
=
500
*
11
sheet1
.
col
(
6
)
.
width
=
600
*
11
sheet1
.
write
(
index
,
0
,
u'TRACKING NO.'
,
font_style
)
sheet1
.
write
(
index
,
1
,
u'CUSTOMER REF'
,
font_style
)
sheet1
.
write
(
index
,
2
,
u'Internal Account Number'
,
font_style
)
sheet1
.
write
(
index
,
3
,
u'SENDER NAME'
,
font_style
)
sheet1
.
write
(
index
,
4
,
u'SHIPPER ADD 1'
,
font_style
)
sheet1
.
write
(
index
,
5
,
u'SHIPPER ADD 2'
,
font_style
)
sheet1
.
write
(
index
,
6
,
u'SHIPPER ADD 3'
,
font_style
)
sheet1
.
write
(
index
,
7
,
u'SENDER CITY'
,
font_style
)
sheet1
.
write
(
index
,
8
,
u'Ship State'
,
font_style
)
sheet1
.
write
(
index
,
9
,
u'SENDER POSTCODE'
,
font_style
)
sheet1
.
write
(
index
,
10
,
u'SENDER COUNTRY'
,
font_style
)
sheet1
.
write
(
index
,
11
,
u'RECEIPIENT NAME'
,
font_style
)
sheet1
.
write
(
index
,
12
,
u'RECEIPIENT ADD 1'
,
font_style
)
sheet1
.
write
(
index
,
13
,
u'RECEIPIENT ADD 2'
,
font_style
)
sheet1
.
write
(
index
,
14
,
u'RECEIPIENT ADD 3'
,
font_style
)
sheet1
.
write
(
index
,
15
,
u'RECEIPIENT CITY'
,
font_style
)
sheet1
.
write
(
index
,
16
,
u'RECEIPIENT COUNTY'
,
font_style
)
sheet1
.
write
(
index
,
17
,
u'RECEIPIENT POSTCODE'
,
font_style
)
sheet1
.
write
(
index
,
18
,
u'RECEPIENT EMAIL'
,
font_style
)
sheet1
.
write
(
index
,
19
,
u'PHONE NUMBER'
,
font_style
)
sheet1
.
write
(
index
,
20
,
u'GROSS WEIGHT (KG)'
,
font_style
)
sheet1
.
write
(
index
,
21
,
u'NET WEIGHT (KG)'
,
font_style
)
sheet1
.
write
(
index
,
22
,
u'Currency'
,
font_style
)
sheet1
.
write
(
index
,
23
,
u'SKU NUMBER'
,
font_style
)
sheet1
.
write
(
index
,
24
,
u'ITEM DESCRIPTION'
,
font_style
)
sheet1
.
write
(
index
,
25
,
u'ITEM HS CODE'
,
font_style
)
sheet1
.
write
(
index
,
26
,
u'ITEM QUANTITY'
,
font_style
)
sheet1
.
write
(
index
,
27
,
u'UNIT VALUE'
,
font_style
)
sheet1
.
write
(
index
,
28
,
u'TOTAL VALUE'
,
font_style
)
sheet1
.
write
(
index
,
29
,
u'VAT'
,
font_style
)
sheet1
.
write
(
index
,
30
,
u'ONLINE SELLING PLACE'
,
font_style
)
sheet1
.
write
(
index
,
31
,
u'PRODUCT LINK'
,
font_style
)
sheet1
.
write
(
index
,
32
,
u'LENGTH'
,
font_style
)
sheet1
.
write
(
index
,
33
,
u'WIDTH'
,
font_style
)
sheet1
.
write
(
index
,
34
,
u'HEIGHT'
,
font_style
)
sheet1
.
write
(
index
,
0
,
u'CUSTOMS PROVIDER ORDER ID'
,
font_style
)
# CUSTOMS PROVIDER ORDER ID
sheet1
.
write
(
index
,
1
,
u'BIG BAG NO'
,
font_style
)
# BIG BAG NO
sheet1
.
write
(
index
,
2
,
u'TRACKING NO'
,
font_style
)
# TRACKING NO
sheet1
.
write
(
index
,
3
,
u'CUSTOMER REF'
,
font_style
)
# CUSTOMER REF
sheet1
.
write
(
index
,
4
,
u'Internal Account Number'
,
font_style
)
# INTERNAL ACCOUNT NUMBER
sheet1
.
write
(
index
,
5
,
u'SENDER NAME'
,
font_style
)
# SENDER NAME
sheet1
.
write
(
index
,
6
,
u'SHIPPER ADD 1'
,
font_style
)
# SHIPPER ADD 1
sheet1
.
write
(
index
,
7
,
u'SHIPPER ADD 2'
,
font_style
)
# SHIPPER ADD 2
sheet1
.
write
(
index
,
8
,
u'SHIPPER ADD 3'
,
font_style
)
# SHIPPER ADD 3
sheet1
.
write
(
index
,
9
,
u'SENDER CITY'
,
font_style
)
# SENDER CITY
sheet1
.
write
(
index
,
10
,
u'Ship State'
,
font_style
)
# SHIP STATE
sheet1
.
write
(
index
,
11
,
u'SENDER POSTCODE'
,
font_style
)
# SENDER POSTCODE
sheet1
.
write
(
index
,
12
,
u'SENDER COUNTRY'
,
font_style
)
# SENDER COUNTRY
sheet1
.
write
(
index
,
13
,
u'RECEIPIENT NAME'
,
font_style
)
# RECEIPIENT NAME
sheet1
.
write
(
index
,
14
,
u'RECEIPIENT ADD 1'
,
font_style
)
# RECEIPIENT ADD 1
sheet1
.
write
(
index
,
15
,
u'RECEIPIENT ADD 2'
,
font_style
)
# RECEIPIENT ADD 2
sheet1
.
write
(
index
,
16
,
u'RECEIPIENT ADD 3'
,
font_style
)
# RECEIPIENT ADD 3
sheet1
.
write
(
index
,
17
,
u'RECEIPIENT CITY'
,
font_style
)
# RECEIPIENT CITY
sheet1
.
write
(
index
,
18
,
u'RECEIPIENT COUNTY'
,
font_style
)
# RECEIPIENT COUNTY
sheet1
.
write
(
index
,
19
,
u'RECEIPIENT POSTCODE'
,
font_style
)
# RECEIPIENT POSTCODE
sheet1
.
write
(
index
,
20
,
u'RECEPIENT EMAIL'
,
font_style
)
# RECEPIENT EMAIL
sheet1
.
write
(
index
,
21
,
u'PHONE NUMBER'
,
font_style
)
# PHONE NUMBER
sheet1
.
write
(
index
,
22
,
u'GROSS WEIGHT (KG)'
,
font_style
)
# GROSS WEIGHT (KG)
sheet1
.
write
(
index
,
23
,
u'NET WEIGHT (KG)'
,
font_style
)
# NET WEIGHT (KG)
sheet1
.
write
(
index
,
24
,
u'Currency'
,
font_style
)
# CURRENCY
sheet1
.
write
(
index
,
25
,
u'SKU NUMBER'
,
font_style
)
# SKU NUMBER
sheet1
.
write
(
index
,
26
,
u'ITEM DESCRIPTION'
,
font_style
)
# ITEM DESCRIPTION
sheet1
.
write
(
index
,
27
,
u'ITEM HS CODE'
,
font_style
)
# ITEM HS CODE
sheet1
.
write
(
index
,
28
,
u'ITEM QUANTITY'
,
font_style
)
# ITEM QUANTITY
sheet1
.
write
(
index
,
29
,
u'UNIT VALUE'
,
font_style
)
# UNIT VALUE
sheet1
.
write
(
index
,
30
,
u'TOTAL VALUE'
,
font_style
)
# TOTAL VALUE
sheet1
.
write
(
index
,
31
,
u'VAT'
,
font_style
)
# VAT
sheet1
.
write
(
index
,
32
,
u'ONLINE SELLING PLACE'
,
font_style
)
# ONLINE SELLING PLACE
sheet1
.
write
(
index
,
33
,
u'PRODUCT LINK'
,
font_style
)
# PRODUCT LINK
sheet1
.
write
(
index
,
34
,
u'LENGTH'
,
font_style
)
# LENGTH
sheet1
.
write
(
index
,
35
,
u'WIDTH'
,
font_style
)
# WIDTH
sheet1
.
write
(
index
,
36
,
u'HEIGHT'
,
font_style
)
# HEIGHT
return
sheet1
# 运单导出包裹清关数据 每个运单导出一个文件 生成压缩包
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论