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
5ab52842
Commit
5ab52842
authored
Aug 14, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fear: 快捷生产自动完成上一单勾选缓存
parent
8b9abeac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
src/views/order/components/FastProduction.vue
+15
-8
No files found.
src/views/order/components/FastProduction.vue
View file @
5ab52842
...
...
@@ -553,17 +553,27 @@ const props = withDefaults(
)
const
emit
=
defineEmits
([
'update:detailVisible'
,
'close'
,
'onSuccess'
])
const
AUTO_SURE_CACHE_KEYS
:
Record
<
string
,
string
>
=
{
qualityScan
:
'qualityScanAutoSure'
,
productionScan
:
'productionScanAutoSure'
,
}
const
getAutoSureCacheKey
=
()
=>
AUTO_SURE_CACHE_KEYS
[
props
.
fastKey
]
||
''
// 获取自动完成上一单勾选缓存
const
getCachedQualityAutoSure
=
(
fallback
:
boolean
)
=>
{
const
cached
=
localStorage
.
getItem
(
'qualityScanAutoSure'
)
const
getCachedAutoSure
=
(
fallback
:
boolean
)
=>
{
const
key
=
getAutoSureCacheKey
()
if
(
!
key
)
return
fallback
const
cached
=
localStorage
.
getItem
(
key
)
if
(
cached
===
null
)
return
fallback
return
cached
===
'true'
}
// 缓存自动完成上一单勾选
watch
(
isAutoSure
,
(
val
)
=>
{
if
(
props
.
fastKey
===
'qualityScan'
)
{
localStorage
.
setItem
(
'qualityScanAutoSure'
,
String
(
val
))
const
key
=
getAutoSureCacheKey
()
if
(
key
)
{
localStorage
.
setItem
(
key
,
String
(
val
))
}
})
...
...
@@ -672,10 +682,7 @@ watch(
trackingNumberRef
.
value
&&
trackingNumberRef
.
value
.
focus
()
TrackingNumber
.
value
=
''
isAutoSure
.
value
=
props
.
fastKey
===
'qualityScan'
?
getCachedQualityAutoSure
(
props
.
defaultAutoSure
)
:
props
.
defaultAutoSure
isAutoSure
.
value
=
getCachedAutoSure
(
props
.
defaultAutoSure
)
sendNum
.
value
=
0
if
(
props
.
fastKey
===
'qualityScan'
)
{
initPrintDevice
()
...
...
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