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
ea325cfe
Commit
ea325cfe
authored
Jul 09, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix_1001802' into 'dev'
Fix 1001802 See merge request
!254
parents
62deaf48
26a1bab1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
42 deletions
+74
-42
src/views/order/podUs/PodMakeOrder.vue
+74
-42
No files found.
src/views/order/podUs/PodMakeOrder.vue
View file @
ea325cfe
...
...
@@ -572,6 +572,14 @@ watch(visible, async (value: boolean) => {
sortingAreaId
.
value
=
hit
.
id
warehouseId
.
value
=
hit
.
warehouseId
isAutoPrint
.
value
=
hit
.
autoPrint
}
else
{
const
defaultArea
=
sortingAreaList
.
value
.
find
(
(
item
)
=>
item
.
defaultWarehouse
===
1
&&
item
.
areaCode
===
'AREA_0'
,
)
||
sortingAreaList
.
value
[
0
]
sortingAreaId
.
value
=
defaultArea
.
id
warehouseId
.
value
=
defaultArea
.
warehouseId
isAutoPrint
.
value
=
defaultArea
.
autoPrint
||
false
}
}
else
{
/* 先找一次,确认本地值是否存在于列表 */
...
...
@@ -634,7 +642,8 @@ watch(
if
(
item
?.
data
)
{
renderItemBox
(
true
)
}
else
{
if
(
boxIndex
.
value
===
podBoxIndex
.
value
)
{
// 0 号箱为单件,不在播种墙列表中,不应清空当前单件数据
if
(
boxIndex
.
value
===
podBoxIndex
.
value
&&
boxIndex
.
value
!==
0
)
{
podOrderDetailsData
.
value
=
{}
boxIndex
.
value
=
null
}
...
...
@@ -668,6 +677,7 @@ watch(
const
podBoxIndex
=
computed
(()
=>
orderStore
.
podBoxIndex
)
let
renderLock
=
false
let
pickFinishedAlertToken
=
0
const
renderItemBox
=
(
bool
:
boolean
)
=>
{
if
(
...
...
@@ -969,21 +979,36 @@ const getPackingData = async (code: string) => {
boxIndex
.
value
=
box
as
number
if
(
boxIndex
.
value
==
0
)
{
podOrderDetailsData
.
value
=
data
as
OrderData
const
orderData
=
data
as
OrderData
orderData
.
productList
?.
forEach
((
el
)
=>
{
if
(
!
el
.
previewImgs
||
!
el
.
previewImgs
.
length
)
{
if
(
el
.
productMark
===
'custom_normal'
||
el
.
productMark
===
'normal'
)
{
el
.
previewImgs
=
[{
url
:
el
.
variantImage
||
''
}]
}
else
{
el
.
previewImgs
=
el
.
imageAry
?
JSON
.
parse
(
el
.
imageAry
)
:
[{
url
:
el
.
variantImage
}]
}
}
})
podOrderDetailsData
.
value
=
orderData
podOrderDetailsData
.
value
.
fromUser
=
userStore
.
user
?.
id
if
(
podOrderDetailsData
.
value
.
productList
?.
length
)
{
const
list
=
podOrderDetailsData
.
value
.
productList
const
list
=
podOrderDetailsData
.
value
.
productList
if
(
list
?.
length
)
{
await
nextTick
()
tableRef
.
value
?.
setCurrentRow
(
list
[
0
])
coverImage
.
value
=
list
[
0
].
previewImgs
?.[
0
]?.
url
||
''
for
(
const
product
of
list
)
{
if
(
product
.
count
===
product
.
purchaseNumber
)
{
product
.
power
=
true
print
(
data
as
O
rderData
,
false
,
()
=>
{
print
(
o
rderData
,
false
,
()
=>
{
renderLock
=
false
})
}
}
nextTick
(()
=>
{
tableRef
.
value
?.
setCurrentRow
(
list
[
0
])
})
}
}
}
catch
(
error
)
{
...
...
@@ -1131,37 +1156,44 @@ const initOrderDetailBox = async (type: 'scan' | 'manual' = 'manual') => {
}
return
item
})
const
currentBox
=
boxIndex
.
value
const
currentBoxItem
=
currentBox
?
boxList
.
find
((
item
)
=>
item
.
box
===
currentBox
&&
item
.
data
)
:
undefined
const
fallbackItem
=
boxList
.
find
((
item
)
=>
item
.
data
)
const
targetItem
=
currentBoxItem
||
fallbackItem
podOrderDetailsData
.
value
=
targetItem
?.
data
||
undefined
boxIndex
.
value
=
targetItem
?.
box
||
null
// 当 boxIndex.value 为 0 时,不更新列表数据,防止单件数据丢失
if
(
boxIndex
.
value
!==
0
)
{
const
currentBox
=
boxIndex
.
value
const
currentBoxItem
=
currentBox
?
boxList
.
find
((
item
)
=>
item
.
box
===
currentBox
&&
item
.
data
)
:
undefined
const
fallbackItem
=
boxList
.
find
((
item
)
=>
item
.
data
)
const
targetItem
=
currentBoxItem
||
fallbackItem
podOrderDetailsData
.
value
=
targetItem
?.
data
||
undefined
boxIndex
.
value
=
targetItem
?.
box
||
null
podOrderDetailsData
.
value
?.
productList
?.
forEach
((
el
)
=>
{
if
(
!
el
.
previewImgs
)
{
if
(
el
.
productMark
===
'custom_normal'
||
el
.
productMark
===
'normal'
)
{
el
.
previewImgs
=
[{
url
:
el
.
variantImage
||
''
}]
}
else
{
el
.
previewImgs
=
el
.
imageAry
?
JSON
.
parse
(
el
.
imageAry
)
:
[{
url
:
el
.
variantImage
}]
podOrderDetailsData
.
value
?.
productList
?.
forEach
((
el
)
=>
{
if
(
!
el
.
previewImgs
)
{
if
(
el
.
productMark
===
'custom_normal'
||
el
.
productMark
===
'normal'
)
{
el
.
previewImgs
=
[{
url
:
el
.
variantImage
||
''
}]
}
else
{
el
.
previewImgs
=
el
.
imageAry
?
JSON
.
parse
(
el
.
imageAry
)
:
[{
url
:
el
.
variantImage
}]
}
}
})
if
(
type
!==
'scan'
)
{
coverImage
.
value
=
podOrderDetailsData
.
value
?.
productList
?.[
0
]?.
previewImgs
?.[
0
].
url
||
''
}
})
if
(
type
!==
'scan'
)
{
coverImage
.
value
=
podOrderDetailsData
.
value
?.
productList
?.[
0
]?.
previewImgs
?.[
0
].
url
||
''
}
if
(
podOrderDetailsData
.
value
&&
podOrderDetailsData
.
value
.
pickingNumber
===
podOrderDetailsData
.
value
.
purchaseNumber
)
{
podOrderDetailsData
.
value
.
printResult
=
'notPrintSuccess'
if
(
podOrderDetailsData
.
value
&&
podOrderDetailsData
.
value
.
pickingNumber
===
podOrderDetailsData
.
value
.
purchaseNumber
)
{
podOrderDetailsData
.
value
.
printResult
=
'notPrintSuccess'
}
}
const
pickFinished
=
boxList
.
filter
((
item
)
=>
{
return
item
.
data
?.
productList
?.
every
((
product
)
=>
product
.
power
)
...
...
@@ -1175,6 +1207,10 @@ const initOrderDetailBox = async (type: 'scan' | 'manual' = 'manual') => {
// 切换箱子至验货完成的箱子
boxChange
.
value
=
true
boxIndex
.
value
=
boxs
[
0
]
as
number
const
token
=
++
pickFinishedAlertToken
if
(
token
>
1
)
{
ElMessageBox
.
close
()
}
try
{
await
ElMessageBox
.
alert
(
`检测到
${
boxs
.
join
(
','
)}
号箱验货完成,请及时处理`
,
...
...
@@ -1183,8 +1219,10 @@ const initOrderDetailBox = async (type: 'scan' | 'manual' = 'manual') => {
confirmButtonText
:
'确定'
,
},
)
if
(
token
!==
pickFinishedAlertToken
)
return
productionOrderRef
.
value
.
focus
()
}
catch
(
error
)
{
if
(
token
!==
pickFinishedAlertToken
)
return
productionOrderRef
.
value
.
focus
()
console
.
error
(
error
)
}
...
...
@@ -1387,6 +1425,7 @@ const print = (data: OrderData, forcePrint = false, callback?: () => void) => {
}
else
{
;(
podOrderDetailsData
.
value
as
OrderData
).
printResult
=
'printFail'
}
return
}
const
factoryNo
=
userStore
.
user
?.
factory
.
id
if
(
!
factoryNo
)
return
...
...
@@ -1556,13 +1595,6 @@ const getSortingAreaList = async () => {
const
res
=
await
getSortingRuleListApi
({})
if
(
res
.
code
!==
200
)
return
sortingAreaList
.
value
=
res
.
data
.
records
const
defaultArea
=
sortingAreaList
.
value
.
find
(
(
item
)
=>
item
.
defaultWarehouse
===
1
&&
item
.
areaCode
===
'AREA_0'
,
)
||
sortingAreaList
.
value
[
0
]
sortingAreaId
.
value
=
defaultArea
.
id
warehouseId
.
value
=
defaultArea
.
warehouseId
isAutoPrint
.
value
=
defaultArea
.
autoPrint
||
false
}
</
script
>
...
...
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