Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
bba1eb43
Commit
bba1eb43
authored
Aug 11, 2025
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 打印物流面单优化
parent
61b4a0ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
5 deletions
+39
-5
src/components/NavMenu.vue
+39
-5
No files found.
src/components/NavMenu.vue
View file @
bba1eb43
...
...
@@ -214,8 +214,8 @@
<ElSelect
v-model=
"sheetPrinter"
placeholder=
"请选择打印机"
@
change=
"handlePrinterChange"
style=
"width: 200px; margin-right: 10px"
@
change=
"handlePrinterChange"
>
<ElOption
v-for=
"item in printDeviceList"
...
...
@@ -229,8 +229,20 @@
placeholder=
"请输入单号"
style=
"width: 300px; margin-right: 10px"
clearable
@
keyup
.
enter=
"getLogistic"
/>
<el-button
type=
"primary"
@
click=
"getLogistic"
>
查 询
</el-button>
<el-button
type=
"success"
@
click=
"printLogistic"
>
打印面单
</el-button>
<div
style=
"font-size: 20px; margin-top: 20px; color: #666666"
>
<div
style=
"margin-bottom: 10px; display: flex; gap: 20px"
>
<div
style=
"width: 400px"
>
店铺单号: {{ shopNo }}
</div>
<div>
包含产品数:
<span
style=
"color: red"
>
{{ productCount }}
</span>
</div>
</div>
<div>
物流跟踪号: {{ trackingNo }}
</div>
</div>
</el-drawer>
</span>
</template>
...
...
@@ -548,6 +560,11 @@ const handlePrinterChange = (value: string) => {
localStorage
.
setItem
(
'sheetPrinter'
,
JSON
.
stringify
(
value
))
}
const
trackingNo
=
ref
(
''
)
const
shopNo
=
ref
(
''
)
const
documentUrl
=
ref
(
''
)
const
productCount
=
ref
()
// 打印物流面单
const
getLogistic
=
()
=>
{
if
(
!
content
.
value
)
{
...
...
@@ -563,10 +580,15 @@ const getLogistic = () => {
}
// 获取第三个_后面的内容
const
thirdPart
=
parts
[
3
]
productCount
.
value
=
parts
[
2
]
if
(
thirdPart
.
startsWith
(
'USPSC'
))
{
// 美国物流
getLogisticUSApi
(
content
.
value
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
trackingNo
.
value
=
res
.
data
.
trackingNo
shopNo
.
value
=
res
.
data
.
shopNo
documentUrl
.
value
=
res
.
data
.
documentUrl
window
.
open
(
filePath
+
res
.
data
.
documentUrl
,
'_blank'
)
}
})
...
...
@@ -574,6 +596,9 @@ const getLogistic = () => {
// 中国物流
getLogisticCNApi
(
content
.
value
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
trackingNo
.
value
=
res
.
data
.
trackingNo
shopNo
.
value
=
res
.
data
.
shopNo
documentUrl
.
value
=
res
.
data
.
documentUrl
window
.
open
(
FileCnPath
+
res
.
data
.
documentUrl
,
'_blank'
)
}
})
...
...
@@ -582,6 +607,15 @@ const getLogistic = () => {
}
}
// 手动打印面单
const
printLogistic
=
()
=>
{
if
(
!
documentUrl
.
value
)
{
ElMessage
.
warning
(
'请先查询面单'
)
return
}
window
.
open
(
filePath
+
documentUrl
.
value
,
'_blank'
)
}
// 监听路由变化,自动添加标签
watch
(
()
=>
route
.
path
,
...
...
@@ -763,10 +797,10 @@ onUnmounted(() => {
}
::v-deep
(
.get-logistic-drawer.el-drawer.btt
)
{
height
:
12
0px
!important
;
width
:
7
0
0px
!important
;
top
:
calc
(
50%
-
6
0px
)
!important
;
left
:
calc
(
50%
-
35
0px
)
!important
;
height
:
25
0px
!important
;
width
:
7
5
0px
!important
;
top
:
calc
(
50%
-
15
0px
)
!important
;
left
:
calc
(
50%
-
40
0px
)
!important
;
}
.tool-item
{
...
...
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