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
e3979dae
Commit
e3979dae
authored
Apr 24, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 根据生产单号前缀判断 orderFrom,替代从 localStorage 读取 countryCode
parent
a06f0c24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/components/searchProdOrder.vue
+8
-2
No files found.
src/components/searchProdOrder.vue
View file @
e3979dae
...
...
@@ -78,12 +78,18 @@ const playAudio = (key: AudioKey, message?: string) => {
console
.
error
(
`No audio found for key:
${
key
}
`
)
}
}
const
getOrderFrom
=
(
factorySubOrderNumber
:
string
):
string
=>
{
if
(
/^CN/i
.
test
(
factorySubOrderNumber
))
return
'CN'
if
(
/^US/i
.
test
(
factorySubOrderNumber
))
return
'US'
if
(
/^OP/i
.
test
(
factorySubOrderNumber
))
return
'NEWP'
return
''
}
const
getPrintData
=
async
()
=>
{
if
(
!
searchData
.
value
)
return
const
user
=
JSON
.
parse
(
localStorage
.
getItem
(
'user'
)
||
'{}
'
)
const
orderFrom
=
getOrderFrom
(
searchData
.
value
.
factorySubOrderNumber
||
'
'
)
const
data
=
await
printProductionQrCode
(
searchData
.
value
.
id
,
user
.
factory
?.
countryCode
.
toLowerCase
()
,
orderFrom
,
)
// const path = 'http://10.168.1.209/local_files/factory' + data.message
const
path
=
filePath
+
data
.
message
...
...
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