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
0
Merge Requests
0
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
72aef730
Commit
72aef730
authored
Jul 13, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 操作单号查询需支持二维码扫描识别出来的单号 #1010763
parent
291580cc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
src/views/order/factoryOrderNew/hooks/useOrderSearchForm.ts
+35
-2
src/views/order/factoryOrderNew/index.vue
+2
-0
No files found.
src/views/order/factoryOrderNew/hooks/useOrderSearchForm.ts
View file @
72aef730
...
...
@@ -63,18 +63,50 @@ export function useOrderSearchForm(
searchForm
.
value
.
shipmentType
=
''
}
/** 扫码枪扫完一单后追加英文逗号,便于连续扫多个操作单号 */
const
handleOperationNoScanEnter
=
(
event
:
KeyboardEvent
)
=>
{
event
.
preventDefault
()
const
val
=
(
searchForm
.
value
.
operationNo
||
''
).
trim
()
if
(
!
val
||
val
.
endsWith
(
','
))
return
searchForm
.
value
.
operationNo
=
`
${
val
}
,`
}
const
getQueryPayload
=
()
=>
{
const
{
productMarkList
:
rawProductMarks
,
tagsIdArr
,
...
rest
}
=
searchForm
.
value
const
{
productMarkList
:
rawProductMarks
,
tagsIdArr
,
operationNo
,
...
rest
}
=
searchForm
.
value
const
markQuery
=
normalizeProductMarkListForQuery
(
rawProductMarks
)
const
tagsId
=
Array
.
isArray
(
tagsIdArr
)
&&
tagsIdArr
.
length
>
0
?
tagsIdArr
.
join
(
','
)
:
undefined
const
processedOperationNo
=
(()
=>
{
const
originalValue
=
operationNo
||
''
if
(
!
originalValue
)
return
''
const
values
=
originalValue
.
split
(
/
[
,,;;
]
/
).
filter
((
v
)
=>
v
.
trim
())
const
processedValues
=
values
.
map
((
value
)
=>
{
const
trimmedValue
=
value
.
trim
()
const
underscoreCount
=
(
trimmedValue
.
match
(
/_/g
)
||
[]).
length
if
(
underscoreCount
>=
3
)
{
const
parts
=
trimmedValue
.
split
(
'_'
)
return
parts
[
3
]
}
return
trimmedValue
})
return
processedValues
.
join
(
','
)
})()
const
raw
:
Record
<
string
,
unknown
>
=
{
...
rest
,
...
markQuery
,
...(
tagsId
!==
undefined
?
{
tagsId
}
:
{}),
operationNo
:
processedOperationNo
,
startTime
:
dateRange
.
value
?.[
0
]
||
null
,
endTime
:
dateRange
.
value
?.[
1
]
||
null
,
}
...
...
@@ -99,6 +131,7 @@ export function useOrderSearchForm(
toggleMulti
,
changeReplaceShipment
,
getQueryPayload
,
handleOperationNoScanEnter
,
reset
,
}
}
src/views/order/factoryOrderNew/index.vue
View file @
72aef730
...
...
@@ -165,6 +165,7 @@
placeholder
=
"多个操作单号,分隔"
clearable
style
=
"width: 140px"
@
keydown
.
enter
.
prevent
=
"handleOperationNoScanEnter"
/>
<
/ElFormItem
>
...
...
@@ -1394,6 +1395,7 @@ const {
toggleMulti
,
changeReplaceShipment
,
getQueryPayload
,
handleOperationNoScanEnter
,
reset
,
}
=
useOrderSearchForm
(
()
=>
refreshCurrentViewProxy
.
value
(),
...
...
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