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
1dd0c2c1
Commit
1dd0c2c1
authored
Jun 03, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 称重分拣bug修改
parent
24f36f38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
4 deletions
+33
-4
src/views/order/components/WeightDialog.vue
+5
-2
src/views/order/components/weigh.ts
+28
-2
No files found.
src/views/order/components/WeightDialog.vue
View file @
1dd0c2c1
...
@@ -369,13 +369,16 @@ const weightGet = async () => {
...
@@ -369,13 +369,16 @@ const weightGet = async () => {
}
}
const
open
=
()
=>
{
const
open
=
()
=>
{
isweight
.
value
=
true
weight
.
stashToCache
()
weight
.
stashToCache
()
tableData
.
value
=
[]
const
rows
=
[...
weight
.
cachedList
]
weight
.
restoreFromCache
(
rows
)
tableData
.
value
=
rows
isweight
.
value
=
true
selectType
.
value
=
'trackingNumber'
selectType
.
value
=
'trackingNumber'
logisticsCompanyCode
.
value
=
''
logisticsCompanyCode
.
value
=
''
weightText
.
value
=
''
weightText
.
value
=
''
getlogisticsCompanyAllCodelist
()
getlogisticsCompanyAllCodelist
()
nextTick
(()
=>
weighInput
.
value
?.
focus
())
}
}
const
deleteFn
=
(
row
:
IpodCnWeighingParams
)
=>
{
const
deleteFn
=
(
row
:
IpodCnWeighingParams
)
=>
{
...
...
src/views/order/components/weigh.ts
View file @
1dd0c2c1
...
@@ -111,15 +111,41 @@ class Weigh extends Lock {
...
@@ -111,15 +111,41 @@ class Weigh extends Lock {
stashToCache
():
void
{
stashToCache
():
void
{
if
(
this
.
list
.
length
)
{
if
(
this
.
list
.
length
)
{
this
.
cachedList
=
[...
this
.
list
]
const
merged
=
[...
this
.
cachedList
]
for
(
const
item
of
this
.
list
)
{
const
idx
=
merged
.
findIndex
(
(
m
)
=>
m
.
id
&&
item
.
id
&&
m
.
id
===
item
.
id
,
)
if
(
idx
>=
0
)
{
merged
[
idx
]
=
item
}
else
{
merged
.
unshift
(
item
)
}
}
this
.
cachedList
=
merged
}
}
this
.
list
=
[]
this
.
list
=
[]
this
.
weightInput
=
true
this
.
weightInput
=
true
}
}
restoreFromCache
(
rows
:
WeighItem
[]):
void
{
this
.
list
=
[...
rows
]
this
.
weightInput
=
!
this
.
hasPendingWeights
()
}
syncCachedList
(
rows
:
WeighItem
[]):
void
{
this
.
cachedList
=
[...
rows
]
}
removeFromCache
(
id
?:
string
):
void
{
if
(
!
id
)
return
this
.
cachedList
=
this
.
cachedList
.
filter
((
el
)
=>
el
.
id
!==
id
)
}
updatedList
(
data
:
WeighItem
[])
{
updatedList
(
data
:
WeighItem
[])
{
this
.
weightInput
=
true
this
.
list
=
[...
data
]
this
.
list
=
[...
data
]
this
.
syncCachedList
(
data
)
this
.
weightInput
=
!
this
.
hasPendingWeights
()
}
}
private
deduplicate
(
private
deduplicate
(
...
...
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